score: Calculate predictive power score for x on y

View source: R/score.R

scoreR Documentation

Calculate predictive power score for x on y

Description

Calculate predictive power score for x on y

Usage

score(
  df,
  x,
  y,
  algorithm = "tree",
  metrics = list(regression = "MAE", classification = "F1_weighted"),
  cv_folds = 5,
  seed = 1,
  verbose = TRUE
)

Arguments

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 available_algorithms()

metrics

named list of eval_* functions used for regression and classification problems, see available_evaluation_metrics()

cv_folds

float, number of cross-validation folds

seed

float, seed to ensure reproducibility/stability

verbose

boolean, whether to print notifications

Value

a named list, potentially containing

x

the name of the predictor variable

y

the name of the target variable

result_type

text showing how to interpret the resulting score

pps

the predictive power score

metric

the evaluation metric used to compute the PPS

baseline_score

the score of a naive model on the evaluation metric

model_score

the score of the predictive model on the evaluation metric

cv_folds

how many cross-validation folds were used

seed

the seed that was set

algorithm

text shwoing what algorithm was used

model_type

text showing whether classification or regression was used

Examples

score(iris, x = 'Petal.Length', y = 'Species')

ppsr documentation built on June 22, 2024, 7:15 p.m.

Related to score in ppsr...