Github user WeichenXu123 commented on a diff in the pull request: https://github.com/apache/spark/pull/13381#discussion_r66961848 --- Diff: examples/src/main/python/mllib/isotonic_regression_example.py --- @@ -23,18 +23,22 @@ from pyspark import SparkContext # $example on$ import math -from pyspark.mllib.regression import IsotonicRegression, IsotonicRegressionModel +from pyspark.mllib.regression import LabeledPoint, IsotonicRegression, IsotonicRegressionModel # $example off$ if __name__ == "__main__": sc = SparkContext(appName="PythonIsotonicRegressionExample") # $example on$ - data = sc.textFile("data/mllib/sample_isotonic_regression_data.txt") + # Load and parse the data + def parsePoint(line): + values = [float(x) for x in line.replace(',', ' ').replace(':', ' ').split(' ')] + return (values[0], values[2], 1.0) + data = sc.textFile("data/mllib/sample_isotonic_regression_libsvm_data.txt") --- End diff -- @yanboliang Done.
--- 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 infrastruct...@apache.org or file a JIRA ticket with INFRA. --- --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org