Github user mengxr commented on a diff in the pull request:

    https://github.com/apache/spark/pull/1515#discussion_r15196775
  
    --- Diff: examples/src/main/scala/org/apache/spark/examples/SparkLR.scala 
---
    @@ -47,12 +48,23 @@ object SparkLR {
         Array.tabulate(N)(generatePoint)
       }
     
    +  def showWarning() {
    +    System.err.println(
    +      """WARNING: THIS IS A NAIVE IMPLEMENTATION OF LOGISTIC REGRESSION 
AND IS GIVEN AS AN EXAMPLE!
    +        |PLEASE USE THE LogisticRegression METHOD FOUND IN 
org.apache.spark.mllib.classification FOR
    +        |MORE CONVENTIONAL USE
    +      """.stripMargin)
    +  }
    +
       def main(args: Array[String]) {
    +    showWarning()
    +
         val sparkConf = new SparkConf().setAppName("SparkLR")
         val sc = new SparkContext(sparkConf)
         val numSlices = if (args.length > 0) args(0).toInt else 2
         val points = sc.parallelize(generateData, numSlices).cache()
     
    +
    --- End diff --
    
    remove extra empty line


---
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.
---

Reply via email to