custom_full_glmnet: Custom GLMNET Function for simplicity

Description Usage Arguments Value

View source: R/custom_full_glmnet.R

Description

Uses 'glmnet' package. Uses lambda.min from cv.glmnet for doing predictions on the test data. Returns the prediction results. For seeing Weighted Mean Absolute Error and Mean Absolute Error, set output to TRUE.

Usage

1
2
3
4
5
6
7
8
9
custom_full_glmnet(
  train,
  trainres,
  test,
  testres,
  perf = "mae",
  output = FALSE,
  seed = 42
)

Arguments

train

'x' for 'glmnet'

trainres

'y' for 'glmnet'

test

matrix of test data for returning predictions

testres

observations of the test data for printing WMAPE results

perf

type.measure for cv.glmnet. Default = 'mae'

output

set 'TRUE' for printing WMAPE results. Default = FALSE

seed

for setting seed. Default = 42

Value

The predictions of the glmnet model applied on the test data


canhakan/canhakan1 documentation built on Dec. 19, 2021, 1:48 p.m.