File tree Expand file tree Collapse file tree 1 file changed +2
-2
lines changed
mllib/src/main/scala/org/apache/spark/mllib/regression Expand file tree Collapse file tree 1 file changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -119,7 +119,7 @@ abstract class GeneralizedLinearAlgorithm[M <: GeneralizedLinearModel]
119119 */
120120 def run (input : RDD [LabeledPoint ]) : M = {
121121 val nfeatures : Int = input.first().features.length
122- val initialWeights = Array .fill (nfeatures)( 1.0 )
122+ val initialWeights = new Array [ Double ] (nfeatures)
123123 run(input, initialWeights)
124124 }
125125
@@ -134,7 +134,7 @@ abstract class GeneralizedLinearAlgorithm[M <: GeneralizedLinearModel]
134134 throw new SparkException (" Input validation failed." )
135135 }
136136
137- // Add a extra variable consisting of all 1.0's for the intercept.
137+ // Prepend an extra variable consisting of all 1.0's for the intercept.
138138 val data = if (addIntercept) {
139139 input.map(labeledPoint => (labeledPoint.label, labeledPoint.features.+: (1.0 )))
140140 } else {
You can’t perform that action at this time.
0 commit comments