covartech / PRT

Pattern Recognition Toolbox for MATLAB
http://covartech.github.io/
MIT License
145 stars 70 forks source link

prtFeatSelSfs should optionally optimize for any #features < #features you selected #72

Open peterTorrione opened 6 years ago

peterTorrione commented 6 years ago

Currently, if you build a prtFeatSelSfs with nFeatures = 10, and the performance goes : [1 2 3 4 5 4 3 2 1 0], dsOut = featSel.run(ds) will always give you the dsOut with 10 features despite 5 features being better.

Propose: add parameter "selectBestNumberFeatures = false". During RUNif the best performance was achieved with fewer than nFeatures, then just select that # features.