-
-
Notifications
You must be signed in to change notification settings - Fork 8
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 #132
Docs #132
Changes from 11 commits
4205296
5cb0039
f26f83c
3d018c3
c45bfbc
e01bfbb
56faaba
f1551be
6e55f7d
8032f7b
5207148
681ed5b
f006715
70f9573
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,16 +14,28 @@ | |
#' @template seealso_filter | ||
#' @export | ||
#' @examples | ||
#' task = mlr3::tsk("mtcars") | ||
#' filter = flt("carscore") | ||
#' filter$calculate(task) | ||
#' head(as.data.table(filter), 3) | ||
#' if (requireNamespace("care")) { | ||
#' task = mlr3::tsk("mtcars") | ||
#' filter = flt("carscore") | ||
#' filter$calculate(task) | ||
#' head(as.data.table(filter), 3) | ||
#' } | ||
#' | ||
#' ## changing filter settings | ||
#' filter = flt("carscore") | ||
#' filter$param_set$values = list("diagonal" = TRUE) | ||
#' filter$calculate(task) | ||
#' head(as.data.table(filter), 3) | ||
#' | ||
#' if (requireNamespace("mlr3pipelines") && requireNamespace("care")) { | ||
#' library("mlr3pipelines") | ||
#' task = mlr3::tsk("mtcars") | ||
#' | ||
#' graph = po("filter", filter = flt("carscore"), filter.cutoff = 0.2) %>>% | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'd avoid setting I see you're setting a different value in each example. Should we calculate a random dynamic value and add a comment that this value should be tuned in practice? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Adding a comment that this value should be tuned: 👍 I don't think a random value is helping, this is just confusing. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Agree, this might not be obvious. Maybe the combination of a hardcoded value across all examples and a comment about the tuning need might be the best middle way. |
||
#' po("learner", mlr3::lrn("regr.rpart")) | ||
#' | ||
#' graph$train(task) | ||
#' } | ||
FilterCarScore = R6Class("FilterCarScore", | ||
inherit = Filter, | ||
|
||
|
This file was deleted.
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'd favor using
mlr3misc::require_namespaces(c("mlr3pipelines", "praznik"))
in cases with n > 1.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.
Fine for me.
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.
but it needs argument
quietly = TRUE
then 😞