bic: BIC scorer function

Description Usage Arguments Details Value Author(s) Examples

Description

BIC stands for Bayesian Information Criterion. Like AIC, it also estimates the quality of a model. When fitting models, it is possible to increase model fitness by adding more parameters. Doing this may results in model overfit. Both AIC and BIC helps to resolve this problem by using a penalty term for the number of parameters in the model. This term is bigger in BIC than in AIC.

Usage

1
bic(y, y_pred, p)

Arguments

y

True target variable(s) - array-like of shape = (n_samples) or (n_samples, n_outputs)

y_pred

is a list of numbers and p which is an int

p

Number of predictive variable(s) used in the model - int

Details

BIC = n X log(residual sum of squares/n) + K X log(n)

Value

double

Author(s)

Simran Sethi

Examples

1
2
3
4
5
library(regscoreR)
y <-c(1,2,3,4)
y_pred <- c(5,6,7,8)
p <- 3
regscoreR::bic(y, y_pred, p)

UBC-MDS/regscoreR documentation built on May 25, 2019, 1:36 p.m.