You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@spark.apache.org by db...@apache.org on 2015/06/26 10:19:20 UTC
spark git commit: [SPARK-8613] [ML] [TRIVIAL] add param to disable
linear feature scaling
Repository: spark
Updated Branches:
refs/heads/master 9fed6abfd -> c9e05a315
[SPARK-8613] [ML] [TRIVIAL] add param to disable linear feature scaling
Add a param to disable linear feature scaling (to be implemented later in linear & logistic regression). Done as a seperate PR so we can use same param & not conflict while working on the sub-tasks.
Author: Holden Karau <ho...@pigscanfly.ca>
Closes #7024 from holdenk/SPARK-8522-Disable-Linear_featureScaling-Spark-8613-Add-param and squashes the following commits:
ce8931a [Holden Karau] Regenerate the sharedParams code
fa6427e [Holden Karau] update text for standardization param.
7b24a2b [Holden Karau] generate the new standardization param
3c190af [Holden Karau] Add the standardization param to sharedparamscodegen
Project: http://git-wip-us.apache.org/repos/asf/spark/repo
Commit: http://git-wip-us.apache.org/repos/asf/spark/commit/c9e05a31
Tree: http://git-wip-us.apache.org/repos/asf/spark/tree/c9e05a31
Diff: http://git-wip-us.apache.org/repos/asf/spark/diff/c9e05a31
Branch: refs/heads/master
Commit: c9e05a315a96fbf3026a2b3c6934dd2dec420099
Parents: 9fed6ab
Author: Holden Karau <ho...@pigscanfly.ca>
Authored: Fri Jun 26 01:19:05 2015 -0700
Committer: DB Tsai <db...@netflix.com>
Committed: Fri Jun 26 01:19:05 2015 -0700
----------------------------------------------------------------------
.../ml/param/shared/SharedParamsCodeGen.scala | 3 +++
.../spark/ml/param/shared/sharedParams.scala | 17 +++++++++++++++++
2 files changed, 20 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/spark/blob/c9e05a31/mllib/src/main/scala/org/apache/spark/ml/param/shared/SharedParamsCodeGen.scala
----------------------------------------------------------------------
diff --git a/mllib/src/main/scala/org/apache/spark/ml/param/shared/SharedParamsCodeGen.scala b/mllib/src/main/scala/org/apache/spark/ml/param/shared/SharedParamsCodeGen.scala
index 8ffbcf0..b0a6af1 100644
--- a/mllib/src/main/scala/org/apache/spark/ml/param/shared/SharedParamsCodeGen.scala
+++ b/mllib/src/main/scala/org/apache/spark/ml/param/shared/SharedParamsCodeGen.scala
@@ -53,6 +53,9 @@ private[shared] object SharedParamsCodeGen {
ParamDesc[Int]("checkpointInterval", "checkpoint interval (>= 1)",
isValid = "ParamValidators.gtEq(1)"),
ParamDesc[Boolean]("fitIntercept", "whether to fit an intercept term", Some("true")),
+ ParamDesc[Boolean]("standardization", "whether to standardize the training features" +
+ " prior to fitting the model sequence. Note that the coefficients of models are" +
+ " always returned on the original scale.", Some("true")),
ParamDesc[Long]("seed", "random seed", Some("this.getClass.getName.hashCode.toLong")),
ParamDesc[Double]("elasticNetParam", "the ElasticNet mixing parameter, in range [0, 1]." +
" For alpha = 0, the penalty is an L2 penalty. For alpha = 1, it is an L1 penalty.",
http://git-wip-us.apache.org/repos/asf/spark/blob/c9e05a31/mllib/src/main/scala/org/apache/spark/ml/param/shared/sharedParams.scala
----------------------------------------------------------------------
diff --git a/mllib/src/main/scala/org/apache/spark/ml/param/shared/sharedParams.scala b/mllib/src/main/scala/org/apache/spark/ml/param/shared/sharedParams.scala
index a0c8ccd..bbe0893 100644
--- a/mllib/src/main/scala/org/apache/spark/ml/param/shared/sharedParams.scala
+++ b/mllib/src/main/scala/org/apache/spark/ml/param/shared/sharedParams.scala
@@ -234,6 +234,23 @@ private[ml] trait HasFitIntercept extends Params {
}
/**
+ * (private[ml]) Trait for shared param standardization (default: true).
+ */
+private[ml] trait HasStandardization extends Params {
+
+ /**
+ * Param for whether to standardize the training features prior to fitting the model sequence. Note that the coefficients of models are always returned on the original scale..
+ * @group param
+ */
+ final val standardization: BooleanParam = new BooleanParam(this, "standardization", "whether to standardize the training features prior to fitting the model sequence. Note that the coefficients of models are always returned on the original scale.")
+
+ setDefault(standardization, true)
+
+ /** @group getParam */
+ final def getStandardization: Boolean = $(standardization)
+}
+
+/**
* (private[ml]) Trait for shared param seed (default: this.getClass.getName.hashCode.toLong).
*/
private[ml] trait HasSeed extends Params {
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@spark.apache.org
For additional commands, e-mail: commits-help@spark.apache.org