Skip to content

Commit cbd9d08

Browse files
committed
Limit parameter desciptions to 74 columns
1 parent 6cb46ca commit cbd9d08

File tree

1 file changed

+29
-19
lines changed

1 file changed

+29
-19
lines changed

python/pyspark/mllib/classification.py

Lines changed: 29 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -96,14 +96,16 @@ class LogisticRegressionModel(LinearClassificationModel):
9696
:param weights:
9797
Weights computed for every feature.
9898
:param intercept:
99-
Intercept computed for this model. (Only used in Binary Logistic Regression. In Multinomial
100-
Logistic Regression, the intercepts will not be a single value, so the intercepts will be part
101-
of the weights.)
99+
Intercept computed for this model. (Only used in Binary Logistic
100+
Regression. In Multinomial Logistic Regression, the intercepts will
101+
not bea single value, so the intercepts will be part of the
102+
weights.)
102103
:param numFeatures:
103104
The dimension of the features.
104105
:param numClasses:
105-
The number of possible outcomes for k classes classification problem in Multinomial Logistic
106-
Regression. By default, it is binary logistic regression so numClasses will be set to 2.
106+
The number of possible outcomes for k classes classification problem
107+
in Multinomial Logistic Regression. By default, it is binary
108+
logistic regression so numClasses will be set to 2.
107109
108110
>>> data = [
109111
... LabeledPoint(0.0, [0.0, 1.0]),
@@ -297,11 +299,13 @@ def train(cls, data, iterations=100, step=1.0, miniBatchFraction=1.0,
297299
- None for no regularization
298300
(default: "l2")
299301
:param intercept:
300-
Boolean parameter which indicates the use or not of the augmented representation for
301-
training data (i.e., whether bias features are activated or not).
302+
Boolean parameter which indicates the use or not of the
303+
augmented representation for training data (i.e., whether bias
304+
features are activated or not).
302305
(default: False)
303306
:param validateData:
304-
Boolean parameter which indicates if the algorithm should validate data before training.
307+
Boolean parameter which indicates if the algorithm should
308+
validate data before training.
305309
(default: True)
306310
:param convergenceTol:
307311
A condition which decides iteration termination.
@@ -345,8 +349,9 @@ def train(cls, data, iterations=100, initialWeights=None, regParam=0.01, regType
345349
- None for no regularization
346350
(default: "l2")
347351
:param intercept:
348-
Boolean parameter which indicates the use or not of the augmented representation for
349-
training data (i.e., whether bias features are activated or not).
352+
Boolean parameter which indicates the use or not of the
353+
augmented representation for training data (i.e., whether bias
354+
features are activated or not).
350355
(default: False)
351356
:param corrections:
352357
The number of corrections used in the LBFGS update.
@@ -355,10 +360,12 @@ def train(cls, data, iterations=100, initialWeights=None, regParam=0.01, regType
355360
The convergence tolerance of iterations for L-BFGS.
356361
(default: 1e-4)
357362
:param validateData:
358-
Boolean parameter which indicates if the algorithm should validate data before training.
363+
Boolean parameter which indicates if the algorithm should
364+
validate data before training.
359365
(default: True)
360366
:param numClasses:
361-
The number of classes (i.e., outcomes) a label can take in Multinomial Logistic Regression.
367+
The number of classes (i.e., outcomes) a label can take in
368+
Multinomial Logistic Regression.
362369
(default: 2)
363370
364371
>>> data = [
@@ -522,11 +529,13 @@ def train(cls, data, iterations=100, step=1.0, regParam=0.01,
522529
- None for no regularization
523530
(default: "l2")
524531
:param intercept:
525-
Boolean parameter which indicates the use or not of the augmented representation for
526-
training data (i.e. whether bias features are activated or not).
532+
Boolean parameter which indicates the use or not of the
533+
augmented representation for training data (i.e. whether bias
534+
features are activated or not).
527535
(default: False)
528536
:param validateData:
529-
Boolean parameter which indicates if the algorithm should validate data before training.
537+
Boolean parameter which indicates if the algorithm should
538+
validate data before training.
530539
(default: True)
531540
:param convergenceTol:
532541
A condition which decides iteration termination.
@@ -551,7 +560,8 @@ class NaiveBayesModel(Saveable, Loader):
551560
:param pi:
552561
Log of class priors, whose dimension is C, number of labels.
553562
:param theta:
554-
Log of class conditional probabilities, whose dimension is C-by-D, where D is number of features.
563+
Log of class conditional probabilities, whose dimension is C-by-D,
564+
where D is number of features.
555565
556566
>>> data = [
557567
... LabeledPoint(0.0, [0.0, 0.0]),
@@ -666,9 +676,9 @@ def train(cls, data, lambda_=1.0):
666676
@inherit_doc
667677
class StreamingLogisticRegressionWithSGD(StreamingLinearAlgorithm):
668678
"""
669-
Train or predict a logistic regression model on streaming data. Training uses
670-
Stochastic Gradient Descent to update the model based on each new batch of
671-
incoming data from a DStream.
679+
Train or predict a logistic regression model on streaming data.
680+
Training uses Stochastic Gradient Descent to update the model based on
681+
each new batch of incoming data from a DStream.
672682
673683
Each batch of data is assumed to be an RDD of LabeledPoints.
674684
The number of data points per batch can vary, but the number

0 commit comments

Comments
 (0)