prediction_df {treeheatr} | R Documentation |
Apply the predicted tree on either new test data or training data.
Description
Select features with p-value (computed from decision tree) < 'p_thres' or all features if 'show_all_feats == TRUE'.
Usage
prediction_df(fit, task, clust_samps, clust_target)
Arguments
fit |
constparty object of the decision tree. |
task |
Character string indicating the type of problem, either 'classification' (categorical outcome) or 'regression' (continuous outcome). |
clust_samps |
Logical. If TRUE, hierarchical clustering would be performed among samples within each leaf node. |
clust_target |
Logical. If TRUE, target/label is included in hierarchical clustering of samples within each leaf node and might yield a more interpretable heatmap. |
Value
A dataframe of prediction values with scaled columns and clustered samples.
[Package treeheatr version 0.2.1 Index]