find_ncomp: Finding ncomp for pls model

Description Usage Arguments Details

Description

Automatically determine ncomp from pls model after performing cross-validation

Usage

1
find_ncomp(plsmodel_cv, threshold = 0.05)

Arguments

plsmodel_cv

plsmodel from pls package after performing cross-validation

threshold

threshold (see details)

Details

This function extracts RMSECV from pls model and pick the suitable ncomp by the following criteria: (1) if the graph is continuously upward, the first component will be selected, (2) if the decrease in RMSECV value is less than the specified threshold (default threshold = 0.05), the previous ncomp will be selected.


chengvt/cheng documentation built on May 13, 2019, 3:52 p.m.