Github user srowen commented on a diff in the pull request:
https://github.com/apache/spark/pull/16515#discussion_r95140529
--- Diff:
examples/src/main/python/mllib/binary_classification_metrics_example.py ---
@@ -18,25 +18,20 @@
Binary Classification Metrics Example.
"""
from __future__ import print_function
-from pyspark.sql import SparkSession
+from pyspark import SparkContext
# $example on$
from pyspark.mllib.classification import LogisticRegressionWithLBFGS
from pyspark.mllib.evaluation import BinaryClassificationMetrics
-from pyspark.mllib.regression import LabeledPoint
+from pyspark.mllib.util import MLUtils
# $example off$
if __name__ == "__main__":
- spark = SparkSession\
- .builder\
- .appName("BinaryClassificationMetricsExample")\
- .getOrCreate()
+ sc = SparkContext(appName="BinaryClassificationMetricsExample")
--- End diff --
Is the point that this is an .mllib example rather than .ml so should use
the older API?
---
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]