Description Usage Arguments Value
View source: R/hhcartr_predictors.R
This internal function is a front-end to function make_predictions for making predictions on CCP generated subtrees.
1 2 3 4 5 6 7 8 9 10 11 | pruning_make_predictions(
loop_count,
j,
alpha_df,
current_tree,
test,
useIdentity,
classify,
colname = "collapse_this_node",
pred_type = "fatbears"
)
|
loop_count |
The current fold number. |
j |
The current tree number. |
alpha_df |
A dataframe containing the CCP generated subtrees. |
current_tree |
The current decision tree in the hhcartr internal format. |
test |
The test dataset. |
useIdentity |
Whether the training data has been transformed with the householder transform. |
classify |
Default is TRUE. Set TRUE for a classification problem and FALSE for a regression problem. |
colname |
The column name in alpha_df that contains the list of internal node numbers that will be collapsed in the current subtree. The default value is "collapse_this_node". |
pred_type |
Is pruning_make_predictions being called with CCP generated subtrees or fatbears generated subtrees. Can have a value of either "ccp" or "fatbears". The default value is "fatbears". |
Returns a list of (new_df, subtree_accuracy_predictions_df).
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.