-
Notifications
You must be signed in to change notification settings - Fork 15
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Still have bases with interactions when setting max_degree = 1 #111
Comments
Hi @SeraphinaShi thanks for filing the issue and sorry about the delay! Could you please send your session info and a reproducible example so I can replicate this issue on my laptop? |
Yeah of course! Here are the reproducible codes: set.seed(123) U_Y <- runif(n, 0, 1) W <- rnorm(n, 0, 1) A <- 2 - 0.5*W + U_A X <- cbind(W, A) fit_obj <- fit_hal(X = X, Y = Y, family = "binomial", summary(fit_obj) Here is my session info:
Matrix products: default locale: time zone: America/Los_Angeles attached base packages: other attached packages: loaded via a namespace (and not attached): |
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 ]
The text was updated successfully, but these errors were encountered: