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

    https://github.com/apache/spark/pull/16694#discussion_r98141074
  
    --- Diff: python/pyspark/ml/classification.py ---
    @@ -60,6 +61,137 @@ def numClasses(self):
     
     
     @inherit_doc
    +class LinearSVC(JavaEstimator, HasFeaturesCol, HasLabelCol, 
HasPredictionCol, HasMaxIter,
    +                HasRegParam, HasTol, HasRawPredictionCol, HasFitIntercept, 
HasStandardization,
    +                HasThreshold, HasWeightCol, HasAggregationDepth, 
JavaMLWritable, JavaMLReadable):
    +    """
    +    Linear SVM Classifier 
(https://en.wikipedia.org/wiki/Support_vector_machine#Linear_SVM)
    +    This binary classifier optimizes the Hinge Loss using the OWLQN 
optimizer.
    +
    +    >>> from pyspark.sql import Row
    +    >>> from pyspark.ml.linalg import Vectors
    +    >>> bdf = sc.parallelize([
    +    ...     Row(label=1.0, weight=2.0, features=Vectors.dense(1.0)),
    --- End diff --
    
    I'd simplify this example since it is going to be part of the documentation:
    * Remove "weight"
    * Just use dense vectors to make the doc clearer.  Sparse vectors are 
tested elsewhere for Python and should be tested in Scala for LinearSVC (for 
which I'll make a JIRA).
    * Make the feature vectors be length 2 or 3


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

Reply via email to