Skip to content

Commit 8f49cf5

Browse files
committed
Add defaults to the scaladoc for params in ml/
1 parent 00d9af5 commit 8f49cf5

File tree

12 files changed

+17
-0
lines changed

12 files changed

+17
-0
lines changed

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ private[ml] trait MultilayerPerceptronParams extends PredictorParams
3232
with HasSeed with HasMaxIter with HasTol {
3333
/**
3434
* Layer sizes including input size and output size.
35+
* Default: Array(1, 1)
3536
* @group param
3637
*/
3738
final val layers: IntArrayParam = new IntArrayParam(this, "layers",
@@ -50,6 +51,7 @@ private[ml] trait MultilayerPerceptronParams extends PredictorParams
5051
* Data is stacked within partitions. If block size is more than remaining data in
5152
* a partition then it is adjusted to the size of this data.
5253
* Recommended size is between 10 and 1000.
54+
* Default: 128
5355
* @group expertParam
5456
*/
5557
final val blockSize: IntParam = new IntParam(this, "blockSize",

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ class BinaryClassificationEvaluator(override val uid: String)
3838

3939
/**
4040
* param for metric name in evaluation
41+
* Default: areaUnderROC
4142
* @group param
4243
*/
4344
val metricName: Param[String] = {

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ class MulticlassClassificationEvaluator (override val uid: String)
3838
/**
3939
* param for metric name in evaluation (supports `"f1"` (default), `"precision"`, `"recall"`,
4040
* `"weightedPrecision"`, `"weightedRecall"`)
41+
* Default: f1
4142
* @group param
4243
*/
4344
val metricName: Param[String] = {

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ final class RegressionEvaluator(override val uid: String)
4141
* Because we will maximize evaluation value (ref: `CrossValidator`),
4242
* when we evaluate a metric that is needed to minimize (e.g., `"rmse"`, `"mse"`, `"mae"`),
4343
* we take and output the negative of this metric.
44+
* Default: rmse
4445
* @group param
4546
*/
4647
val metricName: Param[String] = {

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ final class Binarizer(override val uid: String)
4141
* Param for threshold used to binarize continuous features.
4242
* The features greater than the threshold, will be binarized to 1.0.
4343
* The features equal to or less than the threshold, will be binarized to 0.0.
44+
* Default: 0.0
4445
* @group param
4546
*/
4647
val threshold: DoubleParam =

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ private[feature] trait IDFBase extends Params with HasInputCol with HasOutputCol
3535

3636
/**
3737
* The minimum of documents in which a term should appear.
38+
* Default: 0
3839
* @group param
3940
*/
4041
final val minDocFreq = new IntParam(

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,7 @@ class StopWordsRemover(override val uid: String)
9898

9999
/**
100100
* the stop words set to be filtered out
101+
* Default: StopWords.English
101102
* @group param
102103
*/
103104
val stopWords: StringArrayParam = new StringArrayParam(this, "stopWords", "stop words")
@@ -110,6 +111,7 @@ class StopWordsRemover(override val uid: String)
110111

111112
/**
112113
* whether to do a case sensitive comparison over the stop words
114+
* Default: false
113115
* @group param
114116
*/
115117
val caseSensitive: BooleanParam = new BooleanParam(this, "caseSensitive",

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -214,6 +214,7 @@ class IndexToString private[ml] (
214214
* Param for array of labels.
215215
* Optional labels to be provided by the user, if not supplied column
216216
* metadata is read for labels.
217+
* Default: Empty array, resulting in metadata used for labels.
217218
* @group param
218219
*/
219220
final val labels: StringArrayParam = new StringArrayParam(this, "labels",

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ private[ml] trait VectorIndexerParams extends Params with HasInputCol with HasOu
4343
* Must be >= 2.
4444
*
4545
* (default = 20)
46+
* @group param
4647
*/
4748
val maxCategories = new IntParam(this, "maxCategories",
4849
"Threshold for the number of values a categorical feature can take (>= 2)." +

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ final class VectorSlicer(override val uid: String)
4949
/**
5050
* An array of indices to select features from a vector column.
5151
* There can be no overlap with [[names]].
52+
* Default: Empty array
5253
* @group param
5354
*/
5455
val indices = new IntArrayParam(this, "indices",
@@ -67,6 +68,7 @@ final class VectorSlicer(override val uid: String)
6768
* An array of feature names to select features from a vector column.
6869
* These names must be specified by ML [[org.apache.spark.ml.attribute.Attribute]]s.
6970
* There can be no overlap with [[indices]].
71+
* Default: Empty Array
7072
* @group param
7173
*/
7274
val names = new StringArrayParam(this, "names",

0 commit comments

Comments
 (0)