Why do I receive "Undefined function or variable" error when calling the functions "predictorImportance" and "oobPermutedPredictorImportance"
5 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
MathWorks Support Team
el 14 de Mayo de 2019
Respondida: MathWorks Support Team
el 14 de Mayo de 2019
I have Statistics and Machine Learning Toolbox installed. Why do I receive "Undefined function or variable" error message when calling the functions "predictorImportance" and "oobPermutedPredictorImportance" after MATLAB starts?
Respuesta aceptada
MathWorks Support Team
el 14 de Mayo de 2019
The function "predictorImportance" is a method of the "RegressionTree" class. When MATLAB starts, the "RegressionTree" classes are not loaded so the methods of these classes are not available at this point. Hence, one may get an error message like "Undefined function or variable" if he calls that function right after MATLAB starts. If a "RegressionTree" object is created (for example, by calling the function "fitrtree") before "predictorImportance" is executed, then running "predictorImportance" will not result in this type of error.
Similarly, the function "oobPermutedPredictorImportance" is a method of the "RegressionBaggedEnsemble" class. One needs to create a "RegressionBaggedEnsemble" object first before calling this function. One way to create such an object is to call the function "fitrensemble". Calling "oobPermutedPredictorImportance" without first creating a "RegressionBaggedEnsemble" object may result in this type of error.
0 comentarios
Más respuestas (0)
Ver también
Categorías
Más información sobre Gaussian Process Regression en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!