Predictor Importance code for SVM and GPR trained regression models.

6 visualizaciones (últimos 30 días)
SK
SK el 25 de Abr. de 2020
Comentada: SK el 29 de Abr. de 2020
Hi, using Statistics and Machine Learning Toolbox I have successfully trained two models using SVM and GPR Regression algos (attached here as daSVM and daGPR.. I am trying to find out which variables these two models have defined as most important by weight; or how these variables are ranked by importance. I have previously used the following code below to find out the Predictor Importance for Ensemble Regression model using BAGging algorithms (could not attach the BAG model for its size is too large), but the code below does not work for Gaussian Process Regression models and for Support Vector Machine models. I need a code that will print Predictor Importance and their weights for these two models attached (GPR and SVM). Thank you in advance for your help!
The code that I use for Ensemble BAGging algo:
Load daBAG.mat;
daBAG.RegressionEnsemble
Names = daBAG.RegressionEnsemble.PredictorNames
x = cell(2,96)
x(1,:)= Names
x(2,:)= num2cell(predictorImportance(daBAG.RegressionEnsemble))
x = x;

Respuestas (1)

Shishir Singhal
Shishir Singhal el 29 de Abr. de 2020
  2 comentarios
SK
SK el 29 de Abr. de 2020
Hi, thanks for your answer Shishir. I am getting the following error when I use your suggested function 'fscnca' to get the classifier weights for SVM Regression model below (daSVM.mat). Please advise me on how to fix this error.
>> load('daSVM.mat', 'daSVM')
>> daSVM = fscnca(daSVM.RegressionSVM.X,daSVM.RegressionSVM.Y)
Error using classreg.learning.fsutils.FeatureSelectionNCAModel.validateX (line 772)
X must be a numeric real matrix.
Error in FeatureSelectionNCAClassification/setupXYW (line 374)
X = FeatureSelectionNCAClassification.validateX(X);
Error in classreg.learning.fsutils.FeatureSelectionNCAModel/doFit (line 626)
[X,privY,privW,yLabels,yLabelsOrig] = setupXYW(this,X,Y,Weights);
Error in FeatureSelectionNCAClassification (line 147)
this = doFit(this,X,Y,varargin{:});
Error in fscnca (line 187)
this = FeatureSelectionNCAClassification(X,Y,varargin{:});
SK
SK el 29 de Abr. de 2020
same error if i use 'fsrnca' function for Regression. Please advise...
daSVM = fsrnca(daSVM.RegressionSVM.X,daSVM.RegressionSVM.Y)
Error using classreg.learning.fsutils.FeatureSelectionNCAModel.validateX (line 772)
X must be a numeric real matrix.
Error in FeatureSelectionNCARegression/setupXYW (line 267)
X = FeatureSelectionNCARegression.validateX(X);
Error in classreg.learning.fsutils.FeatureSelectionNCAModel/doFit (line 626)
[X,privY,privW,yLabels,yLabelsOrig] = setupXYW(this,X,Y,Weights);
Error in FeatureSelectionNCARegression (line 101)
this = doFit(this,X,Y,varargin{:});
Error in fsrnca (line 182)
this = FeatureSelectionNCARegression(X,Y,varargin{:});

Iniciar sesión para comentar.

Categorías

Más información sobre Dimensionality Reduction and Feature Extraction en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by