-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
testing and snapshot updates for tidymodels/parsnip#1162
- Loading branch information
Showing
12 changed files
with
101 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
# boost_tree - xgboost case weights | ||
|
||
Code | ||
print(wt_fit$fit$call) | ||
Output | ||
xgboost::xgb.train(params = list(eta = 0.3, max_depth = 6, gamma = 0, | ||
colsample_bytree = 1, colsample_bynode = 1, min_child_weight = 1, | ||
subsample = 1), data = x$data, nrounds = 15, watchlist = x$watchlist, | ||
verbose = 0, nthread = 1, objective = "binary:logistic") | ||
|
||
# decision_tree - rpart case weights | ||
|
||
Code | ||
print(wt_fit$fit$call) | ||
Output | ||
rpart::rpart(formula = Class ~ ., data = data, weights = weights) | ||
|
||
# logistic_reg - stan case weights | ||
|
||
Code | ||
print(wt_fit$fit$call) | ||
Output | ||
rstanarm::stan_glm(formula = Class ~ ., family = stats::binomial, | ||
data = data, weights = weights, seed = ~1, refresh = 0) | ||
|
||
# mars - earth case weights | ||
|
||
Code | ||
print(wt_fit$fit$call) | ||
Output | ||
earth(formula = Class ~ ., data = data, weights = weights, keepxy = TRUE, | ||
glm = ~list(family = stats::binomial)) | ||
|
||
# mlp - nnet case weights | ||
|
||
Case weights are not enabled by the underlying model implementation. | ||
|
||
# rand_forest - ranger case weights | ||
|
||
Code | ||
print(wt_fit$fit$call) | ||
Output | ||
ranger::ranger(x = maybe_data_frame(x), y = y, num.threads = 1, | ||
verbose = FALSE, seed = sample.int(10^5, 1), probability = TRUE, | ||
case.weights = weights) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
# Correct values | ||
|
||
Code | ||
print(rec) | ||
Message | ||
-- Recipe ---------------------------------------------------------------------- | ||
-- Inputs | ||
Number of variables by role | ||
outcome: 1 | ||
predictor: 4 | ||
-- Operations | ||
* Non-negative matrix factorization for: all_predictors() | ||
|
||
# No NNF | ||
|
||
Code | ||
print(rec) | ||
Message | ||
-- Recipe ---------------------------------------------------------------------- | ||
-- Inputs | ||
Number of variables by role | ||
outcome: 1 | ||
predictor: 4 | ||
-- Training information | ||
Training data contained 150 data points and no incomplete rows. | ||
-- Operations | ||
* No non-negative matrix factorization was extracted from: Sepal.Length, | ||
Sepal.Width, Petal.Length, Petal.Width | Trained | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters