Learn R Programming

ppsr (version 0.0.5)

score_model: Calculates out-of-sample model performance of a statistical model

Description

Calculates out-of-sample model performance of a statistical model

Usage

score_model(train, test, model, x, y, metric)

Value

numeric vector of length one, evaluation score for predictions using naive model

Arguments

train

df, training data, containing variable y

test

df, test data, containing variable y

model

parsnip model object, with mode preset

x

character, column name of predictor variable

y

character, column name of target variable

metric

character, name of evaluation metric being used, see available_evaluation_metrics()