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
-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 ]
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:
-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 ]