baseline_fun: Baseline function

Description Usage Arguments Value Examples

View source: R/baseline_fun.R

Description

Gives the scoring metrics of LinearRegression or LogisticRegression.

Usage

1
baseline_fun(X, y, type = "regression")

Arguments

X

The features of the training set

y

The target of the training set

type

What kind of supervised machine learning to use, regression or classification

Value

The list of the result of 5-fold cross validation for the chosen model.

Examples

1
2
3
4
5
data(mtcars)
mtcars$vs <- factor(mtcars$vs)
x <- mtcars[1:2]
y <- mtcars[8]
model_cla <- baseline_fun(x, y, type = 'classification')

UBC-MDS/easymlr documentation built on March 22, 2021, 1:46 p.m.