[MINOR][ML] Use coefficients replace weights
Use ```coefficients``` replace ```weights```, I wish they are the last two. mengxr Author: Yanbo Liang <ybliang8@gmail.com> Closes #10065 from yanboliang/coefficients.
This commit is contained in:
parent
688e521c28
commit
d576e76bba
|
@ -49,7 +49,7 @@ class LogisticRegression(JavaEstimator, HasFeaturesCol, HasLabelCol, HasPredicti
|
|||
... Row(label=0.0, weight=2.0, features=Vectors.sparse(1, [], []))]).toDF()
|
||||
>>> lr = LogisticRegression(maxIter=5, regParam=0.01, weightCol="weight")
|
||||
>>> model = lr.fit(df)
|
||||
>>> model.weights
|
||||
>>> model.coefficients
|
||||
DenseVector([5.5...])
|
||||
>>> model.intercept
|
||||
-2.68...
|
||||
|
|
|
@ -40,7 +40,7 @@ class LinearRegression(JavaEstimator, HasFeaturesCol, HasLabelCol, HasPrediction
|
|||
Linear regression.
|
||||
|
||||
The learning objective is to minimize the squared error, with regularization.
|
||||
The specific squared error loss function used is: L = 1/2n ||A weights - y||^2^
|
||||
The specific squared error loss function used is: L = 1/2n ||A coefficients - y||^2^
|
||||
|
||||
This support multiple types of regularization:
|
||||
- none (a.k.a. ordinary least squares)
|
||||
|
|
Loading…
Reference in a new issue