From 27cdde2ff87346fb54318532a476bf85f5837da7 Mon Sep 17 00:00:00 2001 From: Xin Ren Date: Wed, 7 Oct 2015 15:00:19 +0100 Subject: [SPARK-10669] [DOCS] Link to each language's API in codetabs in ML docs: spark.mllib In the Markdown docs for the spark.mllib Programming Guide, we have code examples with codetabs for each language. We should link to each language's API docs within the corresponding codetab, but we are inconsistent about this. For an example of what we want to do, see the "ChiSqSelector" section in https://github.com/apache/spark/blob/64743870f23bffb8d96dcc8a0181c1452782a151/docs/mllib-feature-extraction.md This JIRA is just for spark.mllib, not spark.ml. Please let me know if more work is needed, thanks a lot. Author: Xin Ren Closes #8977 from keypointt/SPARK-10669. --- docs/mllib-dimensionality-reduction.md | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'docs/mllib-dimensionality-reduction.md') diff --git a/docs/mllib-dimensionality-reduction.md b/docs/mllib-dimensionality-reduction.md index 05f51168d8..ac3526908a 100644 --- a/docs/mllib-dimensionality-reduction.md +++ b/docs/mllib-dimensionality-reduction.md @@ -62,6 +62,8 @@ MLlib provides SVD functionality to row-oriented matrices, provided in the
+Refer to the [`SingularValueDecomposition` Scala docs](api/scala/index.html#org.apache.spark.mllib.linalg.SingularValueDecomposition) for details on the API. + {% highlight scala %} import org.apache.spark.mllib.linalg.Matrix import org.apache.spark.mllib.linalg.distributed.RowMatrix @@ -80,6 +82,8 @@ The same code applies to `IndexedRowMatrix` if `U` is defined as an `IndexedRowMatrix`.
+Refer to the [`SingularValueDecomposition` Java docs](api/java/org/apache/spark/mllib/linalg/SingularValueDecomposition.html) for details on the API. + {% highlight java %} import java.util.LinkedList; @@ -145,6 +149,8 @@ MLlib supports PCA for tall-and-skinny matrices stored in row-oriented format an The following code demonstrates how to compute principal components on a `RowMatrix` and use them to project the vectors into a low-dimensional space. +Refer to the [`RowMatrix` Scala docs](api/scala/index.html#org.apache.spark.mllib.linalg.distributed.RowMatrix) for details on the API. + {% highlight scala %} import org.apache.spark.mllib.linalg.Matrix import org.apache.spark.mllib.linalg.distributed.RowMatrix @@ -161,6 +167,8 @@ val projected: RowMatrix = mat.multiply(pc) The following code demonstrates how to compute principal components on source vectors and use them to project the vectors into a low-dimensional space while keeping associated labels: +Refer to the [`PCA` Scala docs](api/scala/index.html#org.apache.spark.mllib.feature.PCA) for details on the API. + {% highlight scala %} import org.apache.spark.mllib.regression.LabeledPoint import org.apache.spark.mllib.feature.PCA @@ -182,6 +190,8 @@ The following code demonstrates how to compute principal components on a `RowMat and use them to project the vectors into a low-dimensional space. The number of columns should be small, e.g, less than 1000. +Refer to the [`RowMatrix` Java docs](api/java/org/apache/spark/mllib/linalg/distributed/RowMatrix.html) for details on the API. + {% highlight java %} import java.util.LinkedList; -- cgit v1.2.3