Skip to content

Commit 0054684

Browse files
committed
add doc to LRModel's constructor
1 parent a89763b commit 0054684

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

mllib/src/main/scala/org/apache/spark/mllib/classification/LogisticRegression.scala

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,9 @@ class LogisticRegressionModel (
4444
val numClasses: Int)
4545
extends GeneralizedLinearModel(weights, intercept) with ClassificationModel with Serializable {
4646

47+
/**
48+
* Constructs a [[LogisticRegressionModel]] with weights and intercept for binary classification.
49+
*/
4750
def this(weights: Vector, intercept: Double) = this(weights, intercept, weights.size, 2)
4851

4952
private var threshold: Option[Double] = Some(0.5)

0 commit comments

Comments
 (0)