Skip to content
Snippets Groups Projects
Commit adc70058 authored by Shivaram Venkataraman's avatar Shivaram Venkataraman
Browse files

Fix broken build by removing addIntercept

parent 016787de
No related branches found
No related tags found
No related merge requests found
...@@ -47,8 +47,7 @@ class LinearRegressionModel( ...@@ -47,8 +47,7 @@ class LinearRegressionModel(
class LinearRegressionWithSGD private ( class LinearRegressionWithSGD private (
var stepSize: Double, var stepSize: Double,
var numIterations: Int, var numIterations: Int,
var miniBatchFraction: Double, var miniBatchFraction: Double)
var addIntercept: Boolean)
extends GeneralizedLinearAlgorithm[LinearRegressionModel] extends GeneralizedLinearAlgorithm[LinearRegressionModel]
with Serializable { with Serializable {
...@@ -61,7 +60,7 @@ class LinearRegressionWithSGD private ( ...@@ -61,7 +60,7 @@ class LinearRegressionWithSGD private (
/** /**
* Construct a LinearRegression object with default parameters * Construct a LinearRegression object with default parameters
*/ */
def this() = this(1.0, 100, 1.0, true) def this() = this(1.0, 100, 1.0)
def createModel(weights: Array[Double], intercept: Double) = { def createModel(weights: Array[Double], intercept: Double) = {
new LinearRegressionModel(weights, intercept) new LinearRegressionModel(weights, intercept)
...@@ -94,7 +93,7 @@ object LinearRegressionWithSGD { ...@@ -94,7 +93,7 @@ object LinearRegressionWithSGD {
initialWeights: Array[Double]) initialWeights: Array[Double])
: LinearRegressionModel = : LinearRegressionModel =
{ {
new LinearRegressionWithSGD(stepSize, numIterations, miniBatchFraction, true).run(input, new LinearRegressionWithSGD(stepSize, numIterations, miniBatchFraction).run(input,
initialWeights) initialWeights)
} }
...@@ -115,7 +114,7 @@ object LinearRegressionWithSGD { ...@@ -115,7 +114,7 @@ object LinearRegressionWithSGD {
miniBatchFraction: Double) miniBatchFraction: Double)
: LinearRegressionModel = : LinearRegressionModel =
{ {
new LinearRegressionWithSGD(stepSize, numIterations, miniBatchFraction, true).run(input) new LinearRegressionWithSGD(stepSize, numIterations, miniBatchFraction).run(input)
} }
/** /**
......
...@@ -48,8 +48,7 @@ class RidgeRegressionWithSGD private ( ...@@ -48,8 +48,7 @@ class RidgeRegressionWithSGD private (
var stepSize: Double, var stepSize: Double,
var numIterations: Int, var numIterations: Int,
var regParam: Double, var regParam: Double,
var miniBatchFraction: Double, var miniBatchFraction: Double)
var addIntercept: Boolean)
extends GeneralizedLinearAlgorithm[RidgeRegressionModel] extends GeneralizedLinearAlgorithm[RidgeRegressionModel]
with Serializable { with Serializable {
...@@ -71,7 +70,7 @@ class RidgeRegressionWithSGD private ( ...@@ -71,7 +70,7 @@ class RidgeRegressionWithSGD private (
/** /**
* Construct a RidgeRegression object with default parameters * Construct a RidgeRegression object with default parameters
*/ */
def this() = this(1.0, 100, 1.0, 1.0, true) def this() = this(1.0, 100, 1.0, 1.0)
def createModel(weights: Array[Double], intercept: Double) = { def createModel(weights: Array[Double], intercept: Double) = {
val weightsMat = new DoubleMatrix(weights.length + 1, 1, (Array(intercept) ++ weights):_*) val weightsMat = new DoubleMatrix(weights.length + 1, 1, (Array(intercept) ++ weights):_*)
...@@ -134,7 +133,7 @@ object RidgeRegressionWithSGD { ...@@ -134,7 +133,7 @@ object RidgeRegressionWithSGD {
initialWeights: Array[Double]) initialWeights: Array[Double])
: RidgeRegressionModel = : RidgeRegressionModel =
{ {
new RidgeRegressionWithSGD(stepSize, numIterations, regParam, miniBatchFraction, true).run( new RidgeRegressionWithSGD(stepSize, numIterations, regParam, miniBatchFraction).run(
input, initialWeights) input, initialWeights)
} }
...@@ -157,8 +156,7 @@ object RidgeRegressionWithSGD { ...@@ -157,8 +156,7 @@ object RidgeRegressionWithSGD {
miniBatchFraction: Double) miniBatchFraction: Double)
: RidgeRegressionModel = : RidgeRegressionModel =
{ {
new RidgeRegressionWithSGD(stepSize, numIterations, regParam, miniBatchFraction, true).run( new RidgeRegressionWithSGD(stepSize, numIterations, regParam, miniBatchFraction).run(input)
input)
} }
/** /**
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment