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, showPlot)
- [bestSelectedInput, bestRecogRate, allSelectedInput, allRecogRate, elapsedTime]=inputSelectSequential(...)
Description
[bestSelectedInput, bestRecogRate, allSelectedInput, allRecogRate, elapsedTime]=inputSelectSequential(DS, inputNum, classifier, param, showPlot) 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
- showPlot: 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 all 4 inputs...
Selecting input 1:
Model 1/10: selected={sepal length} => Recog. rate = 58.67%
Model 2/10: selected={sepal width} => Recog. rate = 48.00%
Model 3/10: selected={petal length} => Recog. rate = 88.00%
Model 4/10: selected={petal width} => Recog. rate = 88.00%
Currently selected inputs: petal length => Recog. rate = 88.0%
Selecting input 2:
Model 5/10: selected={petal length, sepal length} => Recog. rate = 90.67%
Model 6/10: selected={petal length, sepal width} => Recog. rate = 90.67%
Model 7/10: selected={petal length, petal width} => Recog. rate = 95.33%
Currently selected inputs: petal length, petal width => Recog. rate = 95.3%
Selecting input 3:
Model 8/10: selected={petal length, petal width, sepal length} => Recog. rate = 95.33%
Model 9/10: selected={petal length, petal width, sepal width} => Recog. rate = 95.33%
Currently selected inputs: petal length, petal width, sepal length => Recog. rate = 95.3%
Selecting input 4:
Model 10/10: selected={petal length, petal width, sepal length, sepal width} => Recog. rate = 96.00%
Currently selected inputs: petal length, petal width, sepal length, sepal width => Recog. rate = 96.0%
Overall maximal recognition rate = 96.0%.
Selected 4 inputs (out of 4): petal length, petal width, sepal length, sepal width
Use SVMC classifier for input selection
DS=prData('iris'); figure; inputSelectSequential(DS, inf, 'nbc');
Construct 10 "nbc" models, each with up to 4 inputs selected from all 4 inputs...
Selecting input 1:
Model 1/10: selected={sepal length} => Recog. rate = 72.67%
Model 2/10: selected={sepal width} => Recog. rate = 55.33%
Model 3/10: selected={petal length} => Recog. rate = 95.33%
Model 4/10: selected={petal width} => Recog. rate = 95.33%
Currently selected inputs: petal length => Recog. rate = 95.3%
Selecting input 2:
Model 5/10: selected={petal length, sepal length} => Recog. rate = 90.00%
Model 6/10: selected={petal length, sepal width} => Recog. rate = 91.33%
Model 7/10: selected={petal length, petal width} => Recog. rate = 96.00%
Currently selected inputs: petal length, petal width => Recog. rate = 96.0%
Selecting input 3:
Model 8/10: selected={petal length, petal width, sepal length} => Recog. rate = 96.00%
Model 9/10: selected={petal length, petal width, sepal width} => Recog. rate = 96.00%
Currently selected inputs: petal length, petal width, sepal length => Recog. rate = 96.0%
Selecting input 4:
Model 10/10: selected={petal length, petal width, sepal length, sepal width} => Recog. rate = 95.33%
Currently selected inputs: petal length, petal width, sepal length, sepal width => Recog. rate = 95.3%
Overall maximal recognition rate = 96.0%.
Selected 2 inputs (out of 4): petal length, petal width