Skip to content

Commit d2afcb0

Browse files
committed
remove offset from shared param
1 parent d071b95 commit d2afcb0

File tree

2 files changed

+11
-16
lines changed

2 files changed

+11
-16
lines changed

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

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -373,21 +373,6 @@ private[ml] trait HasWeightCol extends Params {
373373
final def getWeightCol: String = $(weightCol)
374374
}
375375

376-
/**
377-
* Trait for shared param offsetCol.
378-
*/
379-
private[ml] trait HasOffsetCol extends Params {
380-
381-
/**
382-
* Param for offset column name. If this is not set or empty, we treat all instance offsets as 0.0.
383-
* @group param
384-
*/
385-
final val offsetCol: Param[String] = new Param[String](this, "offsetCol", "offset column name. If this is not set or empty, we treat all instance offsets as 0.0")
386-
387-
/** @group getParam */
388-
final def getOffsetCol: String = $(offsetCol)
389-
}
390-
391376
/**
392377
* Trait for shared param solver (default: "auto").
393378
*/

mllib/src/main/scala/org/apache/spark/ml/regression/GeneralizedLinearRegression.scala

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ import org.apache.spark.sql.types.{DataType, DoubleType, StructType}
4141
*/
4242
private[regression] trait GeneralizedLinearRegressionBase extends PredictorParams
4343
with HasFitIntercept with HasMaxIter with HasTol with HasRegParam with HasWeightCol
44-
with HasSolver with HasOffsetCol with Logging {
44+
with HasSolver with Logging {
4545

4646
import GeneralizedLinearRegression._
4747

@@ -94,6 +94,16 @@ private[regression] trait GeneralizedLinearRegressionBase extends PredictorParam
9494
@Since("2.0.0")
9595
def getLinkPredictionCol: String = $(linkPredictionCol)
9696

97+
/**
98+
* Param for offset column name. If this is not set or empty, we treat all instance offsets as 0.0.
99+
* @group param
100+
*/
101+
final val offsetCol: Param[String] = new Param[String](this, "offsetCol", "offset column name. " +
102+
"If this is not set or empty, we treat all instance offsets as 0.0")
103+
104+
/** @group getParam */
105+
def getOffsetCol: String = $(offsetCol)
106+
97107
/** Checks whether we should output link prediction. */
98108
private[regression] def hasLinkPredictionCol: Boolean = {
99109
isDefined(linkPredictionCol) && $(linkPredictionCol).nonEmpty

0 commit comments

Comments
 (0)