Github user mengxr commented on a diff in the pull request:
https://github.com/apache/spark/pull/8225#discussion_r37247874
--- Diff: docs/mllib-isotonic-regression.md ---
@@ -160,4 +160,40 @@ model.save(sc.sc(), "myModelPath");
IsotonicRegressionModel sameModel = IsotonicRegressionModel.load(sc.sc(),
"myModelPath");
{% endhighlight %}
</div>
+
+<div data-lang="python" markdown="1">
+Data are read from a file where each line has a format label,feature
+i.e. 4710.28,500.00. The data are split to training and testing set.
+Model is created using the training set and a mean squared error is
calculated from the predicted
+labels and real labels in the test set.
+
+{% highlight python %}
+import math
+from pyspark.mllib.regression import IsotonicRegression
+from pyspark.mllib.regression import IsotonicRegressionModel
--- End diff --
`from pyspark.mllib.regression import IsotonicRegression,
IsotonicRegressionModel`
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]