-
- Downloads
[SPARK-5133] [ML] Added featureImportance to RandomForestClassifier and Regressor
Added featureImportance to RandomForestClassifier and Regressor. This follows the scikit-learn implementation here: [https://github.com/scikit-learn/scikit-learn/blob/a95203b249c1cf392f86d001ad999e29b2392739/sklearn/tree/_tree.pyx#L3341] CC: yanboliang Would you mind taking a look? Thanks! Author: Joseph K. Bradley <joseph@databricks.com> Author: Feynman Liang <fliang@databricks.com> Closes #7838 from jkbradley/dt-feature-importance and squashes the following commits: 72a167a [Joseph K. Bradley] fixed unit test 86cea5f [Joseph K. Bradley] Modified RF featuresImportances to return Vector instead of Map 5aa74f0 [Joseph K. Bradley] finally fixed unit test for real 33df5db [Joseph K. Bradley] fix unit test 42a2d3b [Joseph K. Bradley] fix unit test fe94e72 [Joseph K. Bradley] modified feature importance unit tests cc693ee [Feynman Liang] Add classifier tests 79a6f87 [Feynman Liang] Compare dense vectors in test 21d01fc [Feynman Liang] Added failing SKLearn test ac0b254 [Joseph K. Bradley] Added featureImportance to RandomForestClassifier/Regressor. Need to add unit tests
Showing
- mllib/src/main/scala/org/apache/spark/ml/classification/RandomForestClassifier.scala 25 additions, 5 deletions...ache/spark/ml/classification/RandomForestClassifier.scala
- mllib/src/main/scala/org/apache/spark/ml/regression/RandomForestRegressor.scala 27 additions, 6 deletions...rg/apache/spark/ml/regression/RandomForestRegressor.scala
- mllib/src/main/scala/org/apache/spark/ml/tree/Node.scala 16 additions, 3 deletionsmllib/src/main/scala/org/apache/spark/ml/tree/Node.scala
- mllib/src/main/scala/org/apache/spark/ml/tree/impl/RandomForest.scala 92 additions, 0 deletions...in/scala/org/apache/spark/ml/tree/impl/RandomForest.scala
- mllib/src/main/scala/org/apache/spark/ml/tree/treeModels.scala 6 additions, 0 deletions.../src/main/scala/org/apache/spark/ml/tree/treeModels.scala
- mllib/src/test/java/org/apache/spark/ml/classification/JavaRandomForestClassifierSuite.java 2 additions, 0 deletions...rk/ml/classification/JavaRandomForestClassifierSuite.java
- mllib/src/test/java/org/apache/spark/ml/regression/JavaRandomForestRegressorSuite.java 2 additions, 0 deletions...e/spark/ml/regression/JavaRandomForestRegressorSuite.java
- mllib/src/test/scala/org/apache/spark/ml/classification/RandomForestClassifierSuite.scala 30 additions, 1 deletion...spark/ml/classification/RandomForestClassifierSuite.scala
- mllib/src/test/scala/org/apache/spark/ml/impl/TreeTests.scala 18 additions, 0 deletions...b/src/test/scala/org/apache/spark/ml/impl/TreeTests.scala
- mllib/src/test/scala/org/apache/spark/ml/regression/RandomForestRegressorSuite.scala 26 additions, 1 deletion...ache/spark/ml/regression/RandomForestRegressorSuite.scala
- mllib/src/test/scala/org/apache/spark/ml/tree/impl/RandomForestSuite.scala 107 additions, 0 deletions...ala/org/apache/spark/ml/tree/impl/RandomForestSuite.scala
Loading
Please register or sign in to comment