Skip to content

Commit

Permalink
Merge pull request #112 from tlverse/reduce-knots
Browse files Browse the repository at this point in the history
reduce defaults for knot points
  • Loading branch information
nhejazi authored Nov 19, 2024
2 parents 92bd08d + 1bb0131 commit 9f2450a
Show file tree
Hide file tree
Showing 6 changed files with 37 additions and 9 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -68,5 +68,5 @@ LinkingTo:
Rcpp,
RcppEigen
VignetteBuilder: knitr
RoxygenNote: 7.2.3
RoxygenNote: 7.3.1
Roxygen: list(markdown = TRUE)
12 changes: 8 additions & 4 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,19 +1,23 @@
# hal9001 0.4.6
* Fixed predict method to address changes required by Matrix 1.6.2
* Reduced default number of knots used for zero-order and first-order basis
expansions as follows:
* `base_num_knots_0` set to 20, used to be 200
* `base_num_knots_1` set to 10, used to be 50

# hal9001 0.4.5
* Added multivariate outcome prediction

# hal9001 0.4.4
* Fixed bug with `prediction_bounds` (a `fit_hal` argument in `fit_control`
list), which would error when it was specified as a numeric vector. Also,
* Fixed bug with `prediction_bounds` (a `fit_hal` argument in `fit_control`
list), which would error when it was specified as a numeric vector. Also,
added a check to assert this argument is correctly specified, and tests
to ensure a numeric vector of bounds is provided.
* Simplified `fit_control` list arguments in `fit_hal`. Users can still specify
additional arguments to `cv.glmnet` and `glmnet` in this list.
* Defined `weights` as a formal argument in `fit_hal`, opposed to an optional
argument in `fit_control`, to facilitate specification and avoid confusion.
This increases flexibility with SuperLearner wrapper `SL.hal9001` as well;
argument in `fit_control`, to facilitate specification and avoid confusion.
This increases flexibility with SuperLearner wrapper `SL.hal9001` as well;
`fit_control` can now be customized with `SL.hal9001`.

# hal9001 0.4.3
Expand Down
1 change: 1 addition & 0 deletions R/formula_hal9001.R
Original file line number Diff line number Diff line change
Expand Up @@ -251,6 +251,7 @@ print.formula_hal9001 <- function(x, ...) {
cat(paste0("A hal9001 formula object of the form: ~ ", x$formula_term))
}

#' Formula Helpers
#'
#' @param var_names A \code{character} vector of variable names representing a single type of interaction
# " (e.g. var_names = c("W1", "W2", "W3") encodes three way interactions between W1, W2 and W3.
Expand Down
7 changes: 4 additions & 3 deletions R/hal.R
Original file line number Diff line number Diff line change
Expand Up @@ -179,11 +179,12 @@ fit_hal <- function(X,
num_knots = num_knots_generator(
max_degree = max_degree,
smoothness_orders = smoothness_orders,
base_num_knots_0 = 200,
base_num_knots_1 = 50
base_num_knots_0 = 20,
base_num_knots_1 = 10
),
reduce_basis = NULL,
family = c("gaussian", "binomial", "poisson", "cox", "mgaussian"),
family = c("gaussian", "binomial", "poisson", "cox",
"mgaussian"),
lambda = NULL,
id = NULL,
weights = NULL,
Expand Down
2 changes: 1 addition & 1 deletion man/fit_hal.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

22 changes: 22 additions & 0 deletions man/formula_helpers.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 9f2450a

Please sign in to comment.