I\'m trying to extract the feature importances of a random forest object I have trained using PySpark. However, I do not see an example of doing this anywhere in the documen
I believe that this now works. You can call:
from pyspark.ml.classification import RandomForestClassifier
rf = RandomForestClassifier()
model = rf.fit(data)
print model.featureImportances
Running fit on a RandomForestClassifier returns a RandomForestClassificationModel which has the desired featureImportances calculated. I hope that this helps : )