Selectvars

From Eigenvector Research Documentation Wiki
Revision as of 17:34, 14 December 2017 by imported>Benjamin (Created page with "===Purpose=== SELECTVARS selects variables that are predictive. ===Synopsis=== :results = selectvars(X,Y,maxlv,options) ===Description=== Perform model-based variable select...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Purpose

SELECTVARS selects variables that are predictive.

Synopsis

results = selectvars(X,Y,maxlv,options)

Description

Perform model-based variable selection using PLS and iteratively a X by comparing RMSECV values, analyzing the scores, and removing the variables with the lowest influence with respect to prediction.

Inputs are (X,Y) the X and Y data, (maxlv) the maximum number of latent variables to be used, (options) is the options structure for selectvars.

Inputs

  • X = X-block may be either a matrix or a dataset object.
  • Y = Y-block may be either a matrix or a dataset object.
  • maxlv = the maximum number of latent variables to be used in the PLS models within.
  • options = options structure for selectvars. (optional).

Outputs

The output is a results structure with the following fields:

  • use: The final selected indices which gave the best model.
  • fit: The RMSECV for the selected indices.
  • lvs: The number of latent variables which gave the best fit.
  • intervals: A cell array containing the indices used in each interval.
  • rmsecv: The rmsecv in the last selection cycle for all intervals.
  • numlv: The number of latent variables used in the model which gave the RMSECV values returned in numcv.
  • figh: Figure handle of the plot that is produced if options.plots = ‘final’.

Options

  • options = options structure containing the fields:
  • plots: [{‘final’}|’off’], governs level of plotting.
  • method: [{‘vip’}|’sratios’], defines the method of choice as a metric for variable selection for the regression models:
  • vip mode: uses Variable Importance in Projection algorithm.
  • sratios mode: uses Selectivity Ratios.
  • FractionToRemove: (default = 0.1) Determines the fraction size to remove with each iteration.
  • RelativeImprovementToContinue: (default = 0) Relative improvement with each itheration that is required before the variable selection iteration process stops. For example, when 0.05 a 5% improvement is required. When 0, the search for a better model continues as long as the current RMSECV is not worse than the prior.
  • cvsplit': [method, splits] (default = [‘vet’ 66]) determines crossval method [{‘vet’}|’loo’|’con’|’rnd’] and the number of splits.
  • cvopts: options structure for CROSSVAL function.
  • plsopts: options structure for PLS function.
  • maxiter: (default = 20) the maximum number of iterations before terminating the iteration loop.
  • waitbar: [{‘on’} | ‘off’] Governs the use of a waitbar to show progress.

See Also

gaselctr, genalg, ipls, rpls, sratio, vip, Interval PLS (IPLS) for Variable Selection