Hi Asim,
The "featureImportances" is only exposed at ML not MLlib.
You need to update your code to use RandomForestClassifier of ML to train
and get one RandomForestClassificationModel. Then you can call
RandomForestClassificationModel.featureImportances
Hi Asim,
I think it's not necessary to back port featureImportances to
mllib.tree.RandomForest. You can use ml.RandomForestClassifier and
ml.RandomForestRegressor directly.
Yanbo
2015-12-17 19:39 GMT+08:00 Asim Jalis :
> Yanbo,
>
> Thanks for the reply.
>
> Is there a JIRA
Yanbo,
Thanks for the reply.
Is there a JIRA for exposing featureImportances on
org.apache.spark.mllib.tree.RandomForest?, or could you create one? I am
unable to create an issue on JIRA against Spark.
Thanks.
Asim
On Thu, Dec 17, 2015 at 12:07 AM, Yanbo Liang wrote:
>
I wanted to use get feature importances related to a Random Forest as
described in this JIRA: https://issues.apache.org/jira/browse/SPARK-5133
However, I don’t see how to call this. I don't see any methods exposed on
org.apache.spark.mllib.tree.RandomForest
How can I get featureImportances when