Skip to content

Commit 9fc48ed

Browse files
author
DB Tsai
committed
rebase
1 parent 2178b63 commit 9fc48ed

File tree

2 files changed

+35
-39
lines changed

2 files changed

+35
-39
lines changed

mllib/src/main/scala/org/apache/spark/ml/param/shared/SharedParamsCodeGen.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ private[shared] object SharedParamsCodeGen {
4646
ParamDesc[String]("outputCol", "output column name"),
4747
ParamDesc[Int]("checkpointInterval", "checkpoint interval"),
4848
ParamDesc[Boolean]("fitIntercept", "whether to fit an intercept term", Some("true")),
49-
ParamDesc[Long]("seed", "random seed", Some("Utils.random.nextLong()")))
49+
ParamDesc[Long]("seed", "random seed", Some("Utils.random.nextLong()")),
5050
ParamDesc[Double]("elasticNetParam", "the ElasticNet mixing parameter"),
5151
ParamDesc[Double]("tol", "the convergence tolerance for iterative algorithms"))
5252

mllib/src/main/scala/org/apache/spark/ml/param/shared/sharedParams.scala

Lines changed: 34 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ package org.apache.spark.ml.param.shared
1919

2020
import org.apache.spark.annotation.DeveloperApi
2121
import org.apache.spark.ml.param._
22-
import org.apache.spark.util.Utils
2322

2423
// DO NOT MODIFY THIS FILE! It was generated by SharedParamsCodeGen.
2524

@@ -42,43 +41,6 @@ trait HasRegParam extends Params {
4241
final def getRegParam: Double = getOrDefault(regParam)
4342
}
4443

45-
/**
46-
* :: DeveloperApi ::
47-
* Trait for shared param elasticNetParam.
48-
*/
49-
@DeveloperApi
50-
trait HasElasticNetParam extends HasRegParam {
51-
52-
/**
53-
* param for elastic net regularization parameter
54-
* @group param
55-
*/
56-
final val elasticNetParam: DoubleParam =
57-
new DoubleParam(this, "elasticNetParam", "the ElasticNet mixing parameter")
58-
59-
/** @group getParam */
60-
def getElasticNetParam: Double = getOrDefault(elasticNetParam)
61-
}
62-
63-
/**
64-
* :: DeveloperApi ::
65-
* Trait for shared param tol.
66-
*/
67-
@DeveloperApi
68-
trait HasTol extends Params {
69-
70-
/**
71-
* param for the convergence tolerance in the iterative algorithms;
72-
* smaller value will lead to higher accuracy with the cost of more iterations
73-
* @group param
74-
*/
75-
final val tol: DoubleParam =
76-
new DoubleParam(this, "tol", "the convergence tolerance for iterative algorithms")
77-
78-
/** @group getParam */
79-
def getTol: Double = getOrDefault(tol)
80-
}
81-
8244
/**
8345
* :: DeveloperApi ::
8446
* Trait for shared param maxIter.
@@ -313,4 +275,38 @@ trait HasSeed extends Params {
313275
/** @group getParam */
314276
final def getSeed: Long = getOrDefault(seed)
315277
}
278+
279+
/**
280+
* :: DeveloperApi ::
281+
* Trait for shared param elasticNetParam.
282+
*/
283+
@DeveloperApi
284+
trait HasElasticNetParam extends Params {
285+
286+
/**
287+
* Param for the ElasticNet mixing parameter.
288+
* @group param
289+
*/
290+
final val elasticNetParam: DoubleParam = new DoubleParam(this, "elasticNetParam", "the ElasticNet mixing parameter")
291+
292+
/** @group getParam */
293+
final def getElasticNetParam: Double = getOrDefault(elasticNetParam)
294+
}
295+
296+
/**
297+
* :: DeveloperApi ::
298+
* Trait for shared param tol.
299+
*/
300+
@DeveloperApi
301+
trait HasTol extends Params {
302+
303+
/**
304+
* Param for the convergence tolerance for iterative algorithms.
305+
* @group param
306+
*/
307+
final val tol: DoubleParam = new DoubleParam(this, "tol", "the convergence tolerance for iterative algorithms")
308+
309+
/** @group getParam */
310+
final def getTol: Double = getOrDefault(tol)
311+
}
316312
// scalastyle:on

0 commit comments

Comments
 (0)