score_naive {ppsr}R Documentation

Calculate out-of-sample model performance of naive baseline model The calculation that's being performed depends on the type of model For regression models, the mean is used as prediction For classification, a model predicting random values and a model predicting modal values are used and the best model is taken as baseline score

Description

Calculate out-of-sample model performance of naive baseline model The calculation that's being performed depends on the type of model For regression models, the mean is used as prediction For classification, a model predicting random values and a model predicting modal values are used and the best model is taken as baseline score

Usage

score_naive(train, test, x, y, type, metric)

Arguments

train

df, training data, containing variable y

test

df, test data, containing variable y

x

character, column name of predictor variable

y

character, column name of target variable

type

character, type of model

metric

character, evaluation metric being used

Value

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


[Package ppsr version 0.0.5 Index]