score | R Documentation |
Calculate predictive power score for x on y
score(
df,
x,
y,
algorithm = "tree",
metrics = list(regression = "MAE", classification = "F1_weighted"),
cv_folds = 5,
seed = 1,
verbose = TRUE
)
df |
data.frame containing columns for x and y |
x |
string, column name of predictor variable |
y |
string, column name of target variable |
algorithm |
string, see |
metrics |
named list of |
cv_folds |
float, number of cross-validation folds |
seed |
float, seed to ensure reproducibility/stability |
verbose |
boolean, whether to print notifications |
a named list, potentially containing
the name of the predictor variable
the name of the target variable
text showing how to interpret the resulting score
the predictive power score
the evaluation metric used to compute the PPS
the score of a naive model on the evaluation metric
the score of the predictive model on the evaluation metric
how many cross-validation folds were used
the seed that was set
text shwoing what algorithm was used
text showing whether classification or regression was used
score(iris, x = 'Petal.Length', y = 'Species')
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.