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

    https://github.com/apache/spark/pull/4564#discussion_r24648384
  
    --- Diff: python/pyspark/ml/classification.py ---
    @@ -32,22 +32,46 @@ class LogisticRegression(JavaEstimator, HasFeaturesCol, 
HasLabelCol, HasPredicti
     
         >>> from pyspark.sql import Row
         >>> from pyspark.mllib.linalg import Vectors
    -    >>> dataset = sqlCtx.inferSchema(sc.parallelize([ \
    -            Row(label=1.0, features=Vectors.dense(1.0)), \
    -            Row(label=0.0, features=Vectors.sparse(1, [], []))]))
    -    >>> lr = LogisticRegression() \
    -            .setMaxIter(5) \
    -            .setRegParam(0.01)
    -    >>> model = lr.fit(dataset)
    +    >>> df = sqlCtx.inferSchema(sc.parallelize([
    --- End diff --
    
    Wait for #4557, then you could user new API for convert RDD into DataFrame:
    ```
    dataset = rdd.toDF()
    ```


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

Reply via email to