You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@spark.apache.org by VISHNU SUBRAMANIAN <jo...@gmail.com> on 2016/03/14 13:31:31 UTC
Printing MLpipeline model in Python.
HI All,
I am using Spark 1.6 and Pyspark.
I am trying to build a Randomforest classifier model using mlpipeline and
in python.
When I am trying to print the model I get the below value.
RandomForestClassificationModel (uid=rfc_be9d4f681b92) with 10 trees
When I use MLLIB RandomForest model with toDebugString I get all the rules
used for building the model.
Tree 0:
If (feature 53 <= 0.0)
If (feature 49 <= 0.0)
If (feature 3 <= 1741.0)
If (feature 47 <= 0.0)
Predict: 0.0
Else (feature 47 > 0.0)
Predict: 0.0
Else (feature 3 > 1741.0)
If (feature 47 <= 0.0)
Predict: 1.0
Else (feature 47 > 0.0)
How can I achieve the same thing using MLpipelines model.
Thanks in Advance.
Vishnu