FeatureSelection

scalation.modeling.FeatureSelection
See theFeatureSelection companion object

The FeatureSelection trait establishes a framework for feature selection, i.e., selecting the features (e.g., variable x_j, cross term x_j x_k, or functional form x_j^2) to include in the model.

Attributes

Companion
object
Graph
Supertypes
class Object
trait Matchable
class Any
Known subtypes
trait Classifier
class BaggingTrees
class RandomForest
class HiddenMarkov
class NaiveBayes
class NaiveBayesR
class NullModel
class SimpleLDA
class TANBayes
class VAR
class VARX
class ARX
class ARX_Quad
class ARX_SR
class ARY
class ARY_Quad
class SARY
trait PredictorMV
class CNN_1D
class NeuralNet_2L
class NeuralNet_3L
class NeuralNet_XL
class RegressionMV
trait Predictor
class ELM_3L1
class NullModel
class Perceptron
class QuantileReg
class Regression
Show all

Members list

Value members

Abstract methods

def backwardElimAll(first: Int = ..., cross: String = ...)(using qk: Int): (LinkedHashSet[Int], ArrayBuffer[VectorD])

Perform BACKWARD ELIMINATION to find the LEAST predictive features/variables to REMOVE from the full model, returning the features/variables left and the new Quality of Fit (QoF) measures/metrics for all steps.

Perform BACKWARD ELIMINATION to find the LEAST predictive features/variables to REMOVE from the full model, returning the features/variables left and the new Quality of Fit (QoF) measures/metrics for all steps.

Value parameters

cross

indicator to include the cross-validation/validation QoF measure (defaults to "many")

first

first variable to consider for elimination

qk

index of Quality of Fit (QoF) to use for comparing quality

Attributes

See also

Fit for index of QoF measures/metrics.

def beamSelAll(cross: String = ..., bk: Int = ...)(using qk: Int): (LinkedHashSet[Int], ArrayBuffer[VectorD])

Perform BEAM SEARCH SELECTION to find a GOOD COMBINATION of predictive features/variables to have in the model, returning the top k sets of features/variables selected and the new Quality of Fit (QoF) measures/metrics for all steps. At each step, iterate over the models in the beam (top k) and create candidates by adding features (phase 1) and then removing features (phase 2). From all the candidates, keep the best k and start a new iteration. Stops when there is no improvement in any of top k or the maximum number of features is reached.

Perform BEAM SEARCH SELECTION to find a GOOD COMBINATION of predictive features/variables to have in the model, returning the top k sets of features/variables selected and the new Quality of Fit (QoF) measures/metrics for all steps. At each step, iterate over the models in the beam (top k) and create candidates by adding features (phase 1) and then removing features (phase 2). From all the candidates, keep the best k and start a new iteration. Stops when there is no improvement in any of top k or the maximum number of features is reached.

Value parameters

bk

the beam width holding the top k models (defaults to 3)

cross

indicator to include the cross-validation/validation QoF measure (defaults to "many")

qk

index of Quality of Fit (QoF) to use for comparing quality

Attributes

See also

Fit for index of QoF measures/metrics.

def forwardSelAll(cross: String = ...)(using qk: Int): (LinkedHashSet[Int], ArrayBuffer[VectorD])

Perform FORWARD SELECTION to find the MOST predictive features/variables to ADD into the model, returning the features/variables added and the new Quality of Fit (QoF) measures/metrics for all steps.

Perform FORWARD SELECTION to find the MOST predictive features/variables to ADD into the model, returning the features/variables added and the new Quality of Fit (QoF) measures/metrics for all steps.

Value parameters

cross

indicator to include the cross-validation/validation QoF measure (defaults to "many")

qk

index of Quality of Fit (QoF) to use for comparing quality

Attributes

See also

Fit for index of QoF measures/metrics.

def stepwiseSelAll(cross: String = ..., swap: Boolean = ...)(using qk: Int): (LinkedHashSet[Int], ArrayBuffer[VectorD])

Perform STEPWISE SELECTION to find a GOOD COMBINATION of predictive features/variables to have in the model, returning the features/variables selected and the new Quality of Fit (QoF) measures/metrics for all steps. At each step, it calls forward and backward and takes the best of the two actions. Stops when neither action yields improvement.

Perform STEPWISE SELECTION to find a GOOD COMBINATION of predictive features/variables to have in the model, returning the features/variables selected and the new Quality of Fit (QoF) measures/metrics for all steps. At each step, it calls forward and backward and takes the best of the two actions. Stops when neither action yields improvement.

Value parameters

cross

indicator to include the cross-validation/validation QoF measure (defaults to "many")

qk

index of Quality of Fit (QoF) to use for comparing quality

swap

whether to allow a swap step (swap out a feature for a new feature in one step)

Attributes

See also

Fit for index of QoF measures/metrics.

Concrete methods

def selectFeatures(tech: SelectionTech, cross: String = ..., first: Int = ..., swap: Boolean = ...)(using qk: Int): (LinkedHashSet[Int], ArrayBuffer[VectorD])

Perform feature selection to find the most predictive features/variables to have in the model, returning the features/variables added and the new Quality of Fit (QoF) measures/metrics for all steps.

Perform feature selection to find the most predictive features/variables to have in the model, returning the features/variables added and the new Quality of Fit (QoF) measures/metrics for all steps.

Value parameters

cross

indicator to include the cross-validation/validation QoF measure (defaults to "many")

first

first variable to consider for elimination (default (1) assume intercept x_0 will be in any model)

qk

index of Quality of Fit (QoF) to use for comparing quality

swap

whether to allow a swap step (swap out a feature for a new feature in one step)

tech

the feature selection technique to apply

Attributes

See also

Fit for index of QoF measures/metrics.