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
score_naive(train, test, x, y, type, metric)
numeric vector of length one, evaluation score for predictions using naive model
df, training data, containing variable y
df, test data, containing variable y
character, column name of predictor variable
character, column name of target variable
character, type of model
character, evaluation metric being used