Skip to content

Commit 34fdca0

Browse files
committed
[FIX][DOC] Fix broken links in ml-guide.md
and some minor changes in ScalaDoc. Author: Xiangrui Meng <[email protected]> Closes #3601 from mengxr/SPARK-4575-fix and squashes the following commits: c559768 [Xiangrui Meng] minor code update ce94da8 [Xiangrui Meng] Java Bean -> JavaBean 0b5c182 [Xiangrui Meng] fix links in ml-guide (cherry picked from commit 7e758d7) Signed-off-by: Xiangrui Meng <[email protected]>
1 parent 266a814 commit 34fdca0

File tree

4 files changed

+5
-7
lines changed

4 files changed

+5
-7
lines changed

docs/ml-guide.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ E.g., a learning algorithm is an `Estimator` which trains on a dataset and produ
3131

3232
* **[`Pipeline`](ml-guide.html#pipeline)**: A `Pipeline` chains multiple `Transformer`s and `Estimator`s together to specify an ML workflow.
3333

34-
* **[`Param`](ml-guide.html#param)**: All `Transformer`s and `Estimator`s now share a common API for specifying parameters.
34+
* **[`Param`](ml-guide.html#parameters)**: All `Transformer`s and `Estimator`s now share a common API for specifying parameters.
3535

3636
## ML Dataset
3737

@@ -134,7 +134,7 @@ Each stage's `transform()` method updates the dataset and passes it to the next
134134
Spark ML `Estimator`s and `Transformer`s use a uniform API for specifying parameters.
135135

136136
A [`Param`](api/scala/index.html#org.apache.spark.ml.param.Param) is a named parameter with self-contained documentation.
137-
A [`ParamMap`](api/scala/index.html#org.apache.spark.ml.param.ParamMap)] is a set of (parameter, value) pairs.
137+
A [`ParamMap`](api/scala/index.html#org.apache.spark.ml.param.ParamMap) is a set of (parameter, value) pairs.
138138

139139
There are two main ways to pass parameters to an algorithm:
140140

@@ -148,7 +148,7 @@ This is useful if there are two algorithms with the `maxIter` parameter in a `Pi
148148
# Code Examples
149149

150150
This section gives code examples illustrating the functionality discussed above.
151-
There is not yet documentation for specific algorithms in Spark ML. For more info, please refer to the [API Documentation](api/scala/index.html). Spark ML algorithms are currently wrappers for MLlib algorithms, and the [MLlib programming guide](mllib-guide.html) has details on specific algorithms.
151+
There is not yet documentation for specific algorithms in Spark ML. For more info, please refer to the [API Documentation](api/scala/index.html#org.apache.spark.ml.package). Spark ML algorithms are currently wrappers for MLlib algorithms, and the [MLlib programming guide](mllib-guide.html) has details on specific algorithms.
152152

153153
## Example: Estimator, Transformer, and Param
154154

@@ -492,7 +492,7 @@ The `ParamMap` which produces the best evaluation metric (averaged over the `$k$
492492
`CrossValidator` finally fits the `Estimator` using the best `ParamMap` and the entire dataset.
493493

494494
The following example demonstrates using `CrossValidator` to select from a grid of parameters.
495-
To help construct the parameter grid, we use the [`ParamGridBuilder`](api/scala/index.html#org.apache.spark.ml.tuning.ParamGridGuilder) utility.
495+
To help construct the parameter grid, we use the [`ParamGridBuilder`](api/scala/index.html#org.apache.spark.ml.tuning.ParamGridBuilder) utility.
496496

497497
Note that cross-validation over a grid of parameters is expensive.
498498
E.g., in the example below, the parameter grid has 3 values for `hashingTF.numFeatures` and 2 values for `lr.regParam`, and `CrossValidator` uses 2 folds. This multiplies out to `$(3 \times 2) \times 2 = 12$` different models being trained.

examples/src/main/java/org/apache/spark/examples/ml/JavaCrossValidatorExample.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@
2323

2424
import org.apache.spark.SparkConf;
2525
import org.apache.spark.api.java.JavaSparkContext;
26-
import org.apache.spark.ml.Model;
2726
import org.apache.spark.ml.Pipeline;
2827
import org.apache.spark.ml.PipelineStage;
2928
import org.apache.spark.ml.classification.LogisticRegression;

examples/src/main/java/org/apache/spark/examples/ml/JavaSimpleParamsExample.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ public static void main(String[] args) {
4747
JavaSQLContext jsql = new JavaSQLContext(jsc);
4848

4949
// Prepare training data.
50-
// We use LabeledPoint, which is a case class. Spark SQL can convert RDDs of Java Beans
50+
// We use LabeledPoint, which is a JavaBean. Spark SQL can convert RDDs of JavaBeans
5151
// into SchemaRDDs, where it uses the bean metadata to infer the schema.
5252
List<LabeledPoint> localTraining = Lists.newArrayList(
5353
new LabeledPoint(1.0, Vectors.dense(0.0, 1.1, 0.1)),

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

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -220,7 +220,6 @@ class ParamMap private[ml] (private val map: mutable.Map[Param[Any], Any]) exten
220220

221221
/**
222222
* Puts a list of param pairs (overwrites if the input params exists).
223-
* Not usable from Java
224223
*/
225224
@varargs
226225
def put(paramPairs: ParamPair[_]*): this.type = {

0 commit comments

Comments
 (0)