inputSelectSequential
Input selection via sequential forward selection
Contents
Syntax
- bestSelectedInput=inputSelectSequential(DS)
- bestSelectedInput=inputSelectSequential(DS, inputNum)
- bestSelectedInput=inputSelectSequential(DS, inputNum, classifier, param)
- bestSelectedInput=inputSelectSequential(DS, inputNum, classifier, param, plotOpt)
- [bestSelectedInput, bestRecogRate, allSelectedInput, allRecogRate, elapsedTime]=inputSelectSequential(...)
Description
[bestSelectedInput, bestRecogRate, allSelectedInput, allRecogRate, elapsedTime]=inputSelectSequential(DS, inputNum, classifier, param, plotOpt) performs input selection via sequential forward selection.
- Input:
- DS: design set
- inputNum: up to inputNum inputs are selected
- classifier: classifier for input selection
- param: parameters for classifier
- plotOpt: 0 for not plotting (default: 1)
- Output:
- bestSelectedInput: overall selected input index
- bestRecogRate: recognition rate based on the final selected input
- allSelectedInput: all selected input during the process
- allRecogRate: all recognition rate
- elapseTime: elapsed time
Example
Use KNNC classifier for input selection
DS=prData('iris');
figure; inputSelectSequential(DS);
Construct 10 knnc models, each with up to 4 inputs selected from 4 candidates... Selecting input 1: Model 1/10: selected={sepal length} => Recog. rate = 58.7% Model 2/10: selected={sepal width} => Recog. rate = 48.0% Model 3/10: selected={petal length} => Recog. rate = 88.0% Model 4/10: selected={petal width} => Recog. rate = 88.0% Currently selected inputs: petal length Selecting input 2: Model 5/10: selected={petal length, sepal length} => Recog. rate = 90.7% Model 6/10: selected={petal length, sepal width} => Recog. rate = 90.7% Model 7/10: selected={petal length, petal width} => Recog. rate = 95.3% Currently selected inputs: petal length, petal width Selecting input 3: Model 8/10: selected={petal length, petal width, sepal length} => Recog. rate = 95.3% Model 9/10: selected={petal length, petal width, sepal width} => Recog. rate = 95.3% Currently selected inputs: petal length, petal width, sepal length Selecting input 4: Model 10/10: selected={petal length, petal width, sepal length, sepal width} => Recog. rate = 96.0% Currently selected inputs: petal length, petal width, sepal length, sepal width Overall maximal recognition rate = 96.0%. Selected 4 inputs (out of 4): petal length, petal width, sepal length, sepal width
![](inputSelectSequential_help_01.png)
Use SVMC classifier for input selection
DS=prData('iris'); figure; inputSelectSequential(DS, inf, 'svmc');
Construct 10 svmc models, each with up to 4 inputs selected from 4 candidates... Selecting input 1: Model 1/10: selected={sepal length} => Recog. rate = 71.3% Model 2/10: selected={sepal width} => Recog. rate = 46.0% Model 3/10: selected={petal length} => Recog. rate = 93.3% Model 4/10: selected={petal width} => Recog. rate = 95.3% Currently selected inputs: petal width Selecting input 2: Model 5/10: selected={petal width, sepal length} => Recog. rate = 94.0% Model 6/10: selected={petal width, sepal width} => Recog. rate = 90.7% Model 7/10: selected={petal width, petal length} => Recog. rate = 94.0% Currently selected inputs: petal width, sepal length Selecting input 3: Model 8/10: selected={petal width, sepal length, sepal width} => Recog. rate = 88.0% Model 9/10: selected={petal width, sepal length, petal length} => Recog. rate = 88.7% Currently selected inputs: petal width, sepal length, petal length Selecting input 4: Model 10/10: selected={petal width, sepal length, petal length, sepal width} => Recog. rate = 85.3% Currently selected inputs: petal width, sepal length, petal length, sepal width Overall maximal recognition rate = 95.3%. Selected 1 inputs (out of 4): petal width
![](inputSelectSequential_help_02.png)