Skip to content

Commit fa21d9b

Browse files
committed
update extends indentation
1 parent f1091b3 commit fa21d9b

File tree

7 files changed

+22
-14
lines changed

7 files changed

+22
-14
lines changed

mllib/src/main/scala/org/apache/spark/ml/Pipeline.scala

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,8 @@ class Pipeline extends Estimator[PipelineModel] {
130130
class PipelineModel(
131131
override val parent: Pipeline,
132132
override val fittingParamMap: ParamMap,
133-
val transformers: Array[Transformer]) extends Model[PipelineModel] with Logging {
133+
val transformers: Array[Transformer])
134+
extends Model[PipelineModel] with Logging {
134135

135136
/**
136137
* Gets the model produced by the input estimator. Throws an NoSuchElementException is the input

mllib/src/main/scala/org/apache/spark/ml/Transformer.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ abstract class Transformer extends PipelineStage with Params {
8484
* result as a new column.
8585
*/
8686
abstract class UnaryTransformer[IN, OUT: TypeTag, T <: UnaryTransformer[IN, OUT, T]]
87-
extends Transformer with HasInputCol with HasOutputCol with Logging {
87+
extends Transformer with HasInputCol with HasOutputCol with Logging {
8888

8989
def setInputCol(value: String): T = { set(inputCol, value); this.asInstanceOf[T] }
9090
def setOutputCol(value: String): T = { set(outputCol, value); this.asInstanceOf[T] }

mllib/src/main/scala/org/apache/spark/ml/classification/LogisticRegression.scala

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,8 @@ class LogisticRegression extends Estimator[LogisticRegressionModel] with Logisti
113113
class LogisticRegressionModel private[ml] (
114114
override val parent: LogisticRegression,
115115
override val fittingParamMap: ParamMap,
116-
val weights: Vector) extends Model[LogisticRegressionModel] with LogisticRegressionParams {
116+
val weights: Vector)
117+
extends Model[LogisticRegressionModel] with LogisticRegressionParams {
117118

118119
def setThreshold(value: Double): this.type = { set(threshold, value); this }
119120
def setFeaturesCol(value: String): this.type = { set(featuresCol, value); this }

mllib/src/main/scala/org/apache/spark/ml/evaluation/BinaryClassificationEvaluator.scala

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,13 +21,12 @@ import org.apache.spark.ml._
2121
import org.apache.spark.ml.param._
2222
import org.apache.spark.mllib.evaluation.BinaryClassificationMetrics
2323
import org.apache.spark.sql.{DoubleType, Row, SchemaRDD}
24-
import org.apache.spark.storage.StorageLevel
2524

2625
/**
2726
* Evaluator for binary classification, which expects two input columns: score and label.
2827
*/
2928
class BinaryClassificationEvaluator extends Evaluator with Params
30-
with HasScoreCol with HasLabelCol {
29+
with HasScoreCol with HasLabelCol {
3130

3231
/** param for metric name in evaluation */
3332
val metricName: Param[String] = new Param(this, "metricName",

mllib/src/main/scala/org/apache/spark/ml/feature/StandardScaler.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,8 +71,8 @@ class StandardScaler extends Estimator[StandardScalerModel] with StandardScalerP
7171
class StandardScalerModel private[ml] (
7272
override val parent: StandardScaler,
7373
override val fittingParamMap: ParamMap,
74-
scaler: feature.StandardScalerModel) extends Model[StandardScalerModel]
75-
with StandardScalerParams {
74+
scaler: feature.StandardScalerModel)
75+
extends Model[StandardScalerModel] with StandardScalerParams {
7676

7777
def setInputCol(value: String): this.type = { set(inputCol, value); this }
7878
def setOutputCol(value: String): this.type = { set(outputCol, value); this }

mllib/src/main/scala/org/apache/spark/ml/param/params.scala

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,8 @@ class Param[T] (
3737
val parent: Params,
3838
val name: String,
3939
val doc: String,
40-
val defaultValue: Option[T] = None) extends Serializable {
40+
val defaultValue: Option[T] = None)
41+
extends Serializable {
4142

4243
/**
4344
* Creates a param pair with the given value (for Java).
@@ -62,31 +63,36 @@ class Param[T] (
6263

6364
/** Specialized version of [[Param[Double]]] for Java. */
6465
class DoubleParam(parent: Params, name: String, doc: String, defaultValue: Option[Double] = None)
65-
extends Param[Double](parent, name, doc, defaultValue) {
66+
extends Param[Double](parent, name, doc, defaultValue) {
67+
6668
override def w(value: Double): ParamPair[Double] = super.w(value)
6769
}
6870

6971
/** Specialized version of [[Param[Int]]] for Java. */
7072
class IntParam(parent: Params, name: String, doc: String, defaultValue: Option[Int] = None)
71-
extends Param[Int](parent, name, doc, defaultValue) {
73+
extends Param[Int](parent, name, doc, defaultValue) {
74+
7275
override def w(value: Int): ParamPair[Int] = super.w(value)
7376
}
7477

7578
/** Specialized version of [[Param[Float]]] for Java. */
7679
class FloatParam(parent: Params, name: String, doc: String, defaultValue: Option[Float] = None)
77-
extends Param[Float](parent, name, doc, defaultValue) {
80+
extends Param[Float](parent, name, doc, defaultValue) {
81+
7882
override def w(value: Float): ParamPair[Float] = super.w(value)
7983
}
8084

8185
/** Specialized version of [[Param[Long]]] for Java. */
8286
class LongParam(parent: Params, name: String, doc: String, defaultValue: Option[Long] = None)
83-
extends Param[Long](parent, name, doc, defaultValue) {
87+
extends Param[Long](parent, name, doc, defaultValue) {
88+
8489
override def w(value: Long): ParamPair[Long] = super.w(value)
8590
}
8691

8792
/** Specialized version of [[Param[Boolean]]] for Java. */
8893
class BooleanParam(parent: Params, name: String, doc: String, defaultValue: Option[Boolean] = None)
89-
extends Param[Boolean](parent, name, doc, defaultValue) {
94+
extends Param[Boolean](parent, name, doc, defaultValue) {
95+
9096
override def w(value: Boolean): ParamPair[Boolean] = super.w(value)
9197
}
9298

mllib/src/main/scala/org/apache/spark/ml/tuning/CrossValidator.scala

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,8 @@ class CrossValidator extends Estimator[CrossValidatorModel] with CrossValidatorP
111111
class CrossValidatorModel private[ml] (
112112
override val parent: CrossValidator,
113113
override val fittingParamMap: ParamMap,
114-
val bestModel: Model[_]) extends Model[CrossValidatorModel] with CrossValidatorParams {
114+
val bestModel: Model[_])
115+
extends Model[CrossValidatorModel] with CrossValidatorParams {
115116

116117
override def transform(dataset: SchemaRDD, paramMap: ParamMap): SchemaRDD = {
117118
bestModel.transform(dataset, paramMap)

0 commit comments

Comments
 (0)