Created
December 19, 2018 04:06
-
-
Save GKarmakar/589ad57025456a9ed40fee0678319e74 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| from pyspark.ml.classification import RandomForestClassifier | |
| RandomForestEstimator = RandomForestClassifier(featuresCol="rawFeatures", labelCol="churn") | |
| RandomForestModel = RandomForestClassifier.fit(preprocessedStageTraining3) | |
| predictionsRandomForestTrainingDF = RandomForestModel .transform(predictionsTrainingDF) | |
| predictionsRandomForestTestDF = RandomForestModel .transform(predictionsTestDF) | |
| display_train_and_test_f1_score("Random Forest", predictionsRandomForestTrainingDF, predictionsRandomForestTestDF) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment