Skip to content

Commit

Permalink
Update SVM.scala
Browse files Browse the repository at this point in the history
  • Loading branch information
tanyinyan committed Mar 18, 2015
1 parent ef437cb commit 26558da
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,8 @@ object SVMWithSGD {
* @param miniBatchFraction Fraction of data to be used per iteration.
* @param initialWeights Initial set of weights to be used. Array should be equal in size to
* the number of features in the data.
* @param useFeatureScaling Set if the algorithm should use feature scaling to improve the convergence during optimization.
* @param useFeatureScaling Set if the algorithm should use feature scaling to improve the
* convergence during optimization.
*/
def train(
input: RDD[LabeledPoint],
Expand All @@ -178,7 +179,8 @@ object SVMWithSGD {
miniBatchFraction: Double,
initialWeights: Vector,
useFeatureScaling: Boolean): SVMModel = {
new SVMWithSGD(stepSize, numIterations, regParam, miniBatchFraction).setFeatureScaling(useFeatureScaling)
new SVMWithSGD(stepSize, numIterations, regParam, miniBatchFraction)
.setFeatureScaling(useFeatureScaling)
.run(input, initialWeights)
}

Expand Down

0 comments on commit 26558da

Please sign in to comment.