-
-
Notifications
You must be signed in to change notification settings - Fork 51
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
docs: rewrite examples #305
Conversation
Thanks a lot already! Please make sure that the problems identified by rcmdcheck are addressed |
R/learner_gbm_regr_gbm.R
Outdated
#' task = tsk("boston_housing") | ||
#' | ||
#' | ||
#' # Train the learner on the training ids |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this trains the task on all ids
R/learner_lme4_classif_glmer.R
Outdated
#' # Define a Task | ||
#' task = as_task_classif(faraway::toenail, target = "outcome") | ||
#' | ||
#' # Train the learner on the training ids |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this uses all ids
R/learner_lme4_classif_glmer.R
Outdated
#' print(learner) | ||
#' | ||
#' # Define a Task | ||
#' task = as_task_classif(faraway::toenail, target = "outcome") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why not a standard task? is the faraway package available?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've tried some standard tests but they're not available for this learner, so I use the dataset in the example of function glmer instead.
R/learner_mboost_regr_gamboost.R
Outdated
#' @examples | ||
#' if (requireNamespace("mboost", quietly = TRUE)) { | ||
#' # Define the Learner and set parameter values | ||
#' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove empty lines
Note that you can (probably) use |
Co-authored-by: Sebastian Fischer <[email protected]>
@Brandonxzl the CI is still not passing, please fix the line length :) |
because the line length is still an issue, you can use |
R/learner_lme4_regr_lmer.R
Outdated
@@ -15,7 +15,34 @@ | |||
#' `r format_bib("bates2010lme4")` | |||
#' | |||
#' @template seealso_learner | |||
#' @template example | |||
#' @examples | |||
#' if (requireNamespace(c("lme4", "faraway"), quietly = TRUE)) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why is faraway neeed here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
for building the task specified for this learner:
Define a Task
#' task = mlr3::as_task_regr(lme4::sleepstudy, target = "Reaction")
R/learner_mboost_regr_gamboost.R
Outdated
#' learner$train(task) | ||
#' | ||
#' # print the model | ||
#' print(learner$model) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If I can train a learner it should be possible to make predictions as well
R/learner_mboost_surv_gamboost.R
Outdated
#' @template example | ||
#' @examples | ||
#' if (mlr3misc::require_namespaces(c("mlr3extralearners", "mboost", "pracma"), quietly = TRUE)) { | ||
#' # Define the Learner and set parameter values |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no parameter values are set.
Also, mboost and pracma are not required when I just want to construct the learner
No description provided.