Skip to content

Still have bases with interactions when setting max_degree = 1 #111

Description

@SeraphinaShi

Where I met the issue:

I have the following:
X: (W, A), a n*2 numeric matrix
Y: binary outcome, numeric vector with length n.

Then I fit HAL with the codes:
fit_obj <- fit_hal(X = X, Y = Y, family = "binomial",
return_x_basis = TRUE,
num_knots = hal9001:::num_knots_generator(
max_degree = 1,
smoothness_orders = 1
))

I still have interactions. First few rows of the output:

summary(fit_obj)
Summary of non-zero coefficients is based on lambda of 0.002024853

        coef                                                                term

-5.575820e+00 (Intercept)
1.710380e+00 [ I(A >= 0)(A - 0)^1 ]
-3.430264e-01 [ I(W >= -0.804)
(W - -0.804)^1 ] * [ I(A >= 0.396)*(A - 0.396)^1 ]

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions