Effacer les filtres
Effacer les filtres

How to compute Gini impurity in random forest (treebagger)?

4 vues (au cours des 30 derniers jours)
alex
alex le 9 Mar 2019
Hello. I am doing classification using treebagger random forest. I should compute the gini index or gini impurity to understand each feature importance in classification. Can any one help me with that? thanks. Here is my random forest classifier code:
nTrees=50;
B2 = TreeBagger(nTrees,train_data,train_label, 'Method', 'classification');
predChar2 = B2.predict(test_data);
predictedClass2 = str2double(predChar2);

Réponses (0)

Community Treasure Hunt

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

Start Hunting!

Translated by