aboutsummaryrefslogtreecommitdiff
path: root/mllib
diff options
context:
space:
mode:
authorShivaram Venkataraman <shivaram@eecs.berkeley.edu>2013-08-30 00:16:32 -0700
committerShivaram Venkataraman <shivaram@eecs.berkeley.edu>2013-08-30 00:16:32 -0700
commitadc700582b52c730a4dbf2a45d4cc794be43cfe5 (patch)
treeccd7afd19ed2e85dc0f91cd620c30bc0e1307b45 /mllib
parent016787de321519c1e06daaf3e195a7e7e6a9e0b2 (diff)
downloadspark-adc700582b52c730a4dbf2a45d4cc794be43cfe5.tar.gz
spark-adc700582b52c730a4dbf2a45d4cc794be43cfe5.tar.bz2
spark-adc700582b52c730a4dbf2a45d4cc794be43cfe5.zip
Fix broken build by removing addIntercept
Diffstat (limited to 'mllib')
-rw-r--r--mllib/src/main/scala/spark/mllib/regression/LinearRegression.scala9
-rw-r--r--mllib/src/main/scala/spark/mllib/regression/RidgeRegression.scala10
2 files changed, 8 insertions, 11 deletions
diff --git a/mllib/src/main/scala/spark/mllib/regression/LinearRegression.scala b/mllib/src/main/scala/spark/mllib/regression/LinearRegression.scala
index 5b3743f2fa..885ff5a30d 100644
--- a/mllib/src/main/scala/spark/mllib/regression/LinearRegression.scala
+++ b/mllib/src/main/scala/spark/mllib/regression/LinearRegression.scala
@@ -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)
}
/**
diff --git a/mllib/src/main/scala/spark/mllib/regression/RidgeRegression.scala b/mllib/src/main/scala/spark/mllib/regression/RidgeRegression.scala
index ccf7364806..cb1303dd99 100644
--- a/mllib/src/main/scala/spark/mllib/regression/RidgeRegression.scala
+++ b/mllib/src/main/scala/spark/mllib/regression/RidgeRegression.scala
@@ -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)
}
/**