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(
class LinearRegressionWithSGD private (
var stepSize: Double,
var numIterations: Int,
var miniBatchFraction: Double,
var addIntercept: Boolean)
var miniBatchFraction: Double)
extends GeneralizedLinearAlgorithm[LinearRegressionModel]
with Serializable {
......@@ -61,7 +60,7 @@ class LinearRegressionWithSGD private (
/**
* 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) = {
new LinearRegressionModel(weights, intercept)
......@@ -94,7 +93,7 @@ object LinearRegressionWithSGD {
initialWeights: Array[Double])
: LinearRegressionModel =
{
new LinearRegressionWithSGD(stepSize, numIterations, miniBatchFraction, true).run(input,
new LinearRegressionWithSGD(stepSize, numIterations, miniBatchFraction).run(input,
initialWeights)
}
......@@ -115,7 +114,7 @@ object LinearRegressionWithSGD {
miniBatchFraction: Double)
: LinearRegressionModel =
{
new LinearRegressionWithSGD(stepSize, numIterations, miniBatchFraction, true).run(input)
new LinearRegressionWithSGD(stepSize, numIterations, miniBatchFraction).run(input)
}
/**
......
......@@ -48,8 +48,7 @@ class RidgeRegressionWithSGD private (
var stepSize: Double,
var numIterations: Int,
var regParam: Double,
var miniBatchFraction: Double,
var addIntercept: Boolean)
var miniBatchFraction: Double)
extends GeneralizedLinearAlgorithm[RidgeRegressionModel]
with Serializable {
......@@ -71,7 +70,7 @@ class RidgeRegressionWithSGD private (
/**
* 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) = {
val weightsMat = new DoubleMatrix(weights.length + 1, 1, (Array(intercept) ++ weights):_*)
......@@ -134,7 +133,7 @@ object RidgeRegressionWithSGD {
initialWeights: Array[Double])
: RidgeRegressionModel =
{
new RidgeRegressionWithSGD(stepSize, numIterations, regParam, miniBatchFraction, true).run(
new RidgeRegressionWithSGD(stepSize, numIterations, regParam, miniBatchFraction).run(
input, initialWeights)
}
......@@ -157,8 +156,7 @@ object RidgeRegressionWithSGD {
miniBatchFraction: Double)
: RidgeRegressionModel =
{
new RidgeRegressionWithSGD(stepSize, numIterations, regParam, miniBatchFraction, true).run(
input)
new RidgeRegressionWithSGD(stepSize, numIterations, regParam, miniBatchFraction).run(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