What is the MPG in Random Forest Regression ?

2 vues (au cours des 30 derniers jours)
Sanchit
Sanchit le 23 Juil 2023
Modifié(e) : the cyclist le 24 Juil 2023
t = templateTree('NumVariablesToSample','all',...
'PredictorSelection','interaction-curvature','Surrogate','on');
rng(1); % For reproducibility
Mdl = fitrensemble(Z,MPG,'Method','Bag','NumLearningCycles',200, ...
'Learners',t);
What is the MPG in above code?
Please let me know.
Thanks.
Sanchit

Réponses (1)

the cyclist
the cyclist le 24 Juil 2023
Modifié(e) : the cyclist le 24 Juil 2023
That code looks similar to example code from the documentation for fitrensemble or templateTree.
In those examples, MPG is one of the variables in the data table. (In your code Z would be that table.) It's the miles per gallon for cars in the example carsmall dataset.
MPG should have quotes around it, in general.
Mdl = fitrensemble(Z,'MPG', ...

Catégories

En savoir plus sur Tables dans Help Center et File Exchange

Produits


Version

R2023a

Community Treasure Hunt

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

Start Hunting!

Translated by