Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

New to MATLAB?

Select machine learning features in Matlab

Asked by Ke Dang

Ke Dang (view profile)

on 29 Mar 2012
Accepted Answer by Ilya

Ilya (view profile)

Hi All, Thank you for your time. I want to ask a question in below:

Given a training set, a test set, a list of features and a result set using all features in the machine learning, I would liek to know:

1. Some way to know how to select the set of features that would produce best result 2. What features contributed most to the classification 3. What features did not contribute to the classification

Is there a function that can do it in Matlab?


Ke Dang

Ke Dang (view profile)


No products are associated with this question.

1 Answer

Answer by Ilya

Ilya (view profile)

on 29 Mar 2012
Edited by Ilya

Ilya (view profile)

on 20 Sep 2012
Accepted answer

Here are Statistics Toolbox utilities you should look into:

  1. sequentialfs
  2. relieff
  3. predictorImportance method of ClassificationTree, or its older version, varimportance method of classregtree
  4. Ensembles of decision trees. In particular, TreeBagger has several properties for estimation of predictor importance, especially DeltaCritDecisionSplit and OOBPermutedVarDeltaError
  5. Discriminant analysis with thresholding available in 12a from ClassificationDiscriminant. See DeltaPredictor property.

If you can recast your classification problem as a (generalized) linear regression model, functions lasso and lassoglm would help. Also, LinearModel.stepwise and GeneralizedLinearModel.stepwise, if you have a sufficiently recent version of MATLAB.

As you see, there are plenty of options. Without knowing more about your data, it's hard to say what might work best for you.

1 Comment

Ke Dang

Ke Dang (view profile)

on 3 Apr 2012

Thanks. It is quite useful. I will try to test them.


Ilya (view profile)

Contact us