@@ -53,11 +53,11 @@ Scala imports `scala.collection.immutable.Vector` by default, so you have to imp
5353<div data-lang =" java " markdown =" 1 " >
5454
5555The base class of local vectors is
56- [ ` Vector ` ] ( api/scala/index.html# org. apache. spark. mllib. linalg. Vector ) , and we provide two
57- implementations: [ ` DenseVector ` ] ( api/scala/index.html# org. apache. spark. mllib. linalg. DenseVector ) and
58- [ ` SparseVector ` ] ( api/scala/index.html# org. apache. spark. mllib. linalg. SparseVector ) . We recommend
56+ [ ` Vector ` ] ( api/java/ org/ apache/ spark/ mllib/ linalg/ Vector.html ) , and we provide two
57+ implementations: [ ` DenseVector ` ] ( api/java/ org/ apache/ spark/ mllib/ linalg/ DenseVector.html ) and
58+ [ ` SparseVector ` ] ( api/java/ org/ apache/ spark/ mllib/ linalg/ SparseVector.html ) . We recommend
5959using the factory methods implemented in
60- [ ` Vectors ` ] ( api/scala/index.html# org. apache. spark. mllib. linalg. Vector ) to create local vectors.
60+ [ ` Vectors ` ] ( api/java/ org/ apache/ spark/ mllib/ linalg/ Vector.html ) to create local vectors.
6161
6262{% highlight java %}
6363import org.apache.spark.mllib.linalg.Vector;
@@ -134,7 +134,7 @@ val neg = LabeledPoint(0.0, Vectors.sparse(3, Array(0, 2), Array(1.0, 3.0)))
134134<div data-lang =" java " markdown =" 1 " >
135135
136136A labeled point is represented by
137- [ ` LabeledPoint ` ] ( api/scala/index.html# org. apache. spark. mllib. regression. LabeledPoint ) .
137+ [ ` LabeledPoint ` ] ( api/java/ org/ apache/ spark/ mllib/ regression/ LabeledPoint.html ) .
138138
139139{% highlight java %}
140140import org.apache.spark.mllib.linalg.Vectors;
@@ -197,7 +197,7 @@ val training: RDD[LabeledPoint] = MLUtils.loadLibSVMFile(sc, "mllib/data/sample_
197197</div >
198198
199199<div data-lang =" java " markdown =" 1 " >
200- [ ` MLUtils.loadLibSVMFile ` ] ( api/scala/index.html# org. apache. spark. mllib. util. MLUtils$ ) reads training
200+ [ ` MLUtils.loadLibSVMFile ` ] ( api/java/ org/ apache/ spark/ mllib/ util/ MLUtils.html ) reads training
201201examples stored in LIBSVM format.
202202
203203{% highlight java %}
@@ -244,10 +244,10 @@ val dm: Matrix = Matrices.dense(3, 2, Array(1.0, 3.0, 5.0, 2.0, 4.0, 6.0))
244244<div data-lang =" java " markdown =" 1 " >
245245
246246The base class of local matrices is
247- [ ` Matrix ` ] ( api/scala/index.html# org. apache. spark. mllib. linalg. Matrix ) , and we provide one
248- implementation: [ ` DenseMatrix ` ] ( api/scala/index.html# org. apache. spark. mllib. linalg. DenseMatrix ) .
247+ [ ` Matrix ` ] ( api/java/ org/ apache/ spark/ mllib/ linalg/ Matrix.html ) , and we provide one
248+ implementation: [ ` DenseMatrix ` ] ( api/java/ org/ apache/ spark/ mllib/ linalg/ DenseMatrix.html ) .
249249Sparse matrix will be added in the next release. We recommend using the factory methods implemented
250- in [ ` Matrices ` ] ( api/scala/index.html# org. apache. spark. mllib. linalg. Matrices ) to create local
250+ in [ ` Matrices ` ] ( api/java/ org/ apache/ spark/ mllib/ linalg/ Matrices.html ) to create local
251251matrices.
252252
253253{% highlight java %}
@@ -303,7 +303,7 @@ val n = mat.numCols()
303303
304304<div data-lang =" java " markdown =" 1 " >
305305
306- A [ ` RowMatrix ` ] ( api/scala/index.html# org. apache. spark. mllib. linalg. distributed. RowMatrix ) can be
306+ A [ ` RowMatrix ` ] ( api/java/ org/ apache/ spark/ mllib/ linalg/ distributed/ RowMatrix.html ) can be
307307created from a ` JavaRDD<Vector> ` instance. Then we can compute its column summary statistics.
308308
309309{% highlight java %}
@@ -391,9 +391,9 @@ val rowMat: RowMatrix = mat.toRowMatrix()
391391<div data-lang =" java " markdown =" 1 " >
392392
393393An
394- [ ` IndexedRowMatrix ` ] ( api/scala/index.html# org. apache. spark. mllib. linalg. distributed. IndexedRowMatrix )
394+ [ ` IndexedRowMatrix ` ] ( api/java/ org/ apache/ spark/ mllib/ linalg/ distributed/ IndexedRowMatrix.html )
395395can be created from an ` JavaRDD<IndexedRow> ` instance, where
396- [ ` IndexedRow ` ] ( api/scala/index.html# org. apache. spark. mllib. linalg. distributed. IndexedRow ) is a
396+ [ ` IndexedRow ` ] ( api/java/ org/ apache/ spark/ mllib/ linalg/ distributed/ IndexedRow.html ) is a
397397wrapper over ` (long, Vector) ` . An ` IndexedRowMatrix ` can be converted to a ` RowMatrix ` by dropping
398398its row indices.
399399
@@ -453,13 +453,13 @@ val indexedRowMatrix = mat.toIndexedRowMatrix()
453453<div data-lang =" java " markdown =" 1 " >
454454
455455A
456- [ ` CoordinateMatrix ` ] ( api/scala/index.html# org. apache. spark. mllib. linalg. distributed. CoordinateMatrix )
456+ [ ` CoordinateMatrix ` ] ( api/java/ org/ apache/ spark/ mllib/ linalg/ distributed/ CoordinateMatrix.html )
457457can be created from a ` JavaRDD<MatrixEntry> ` instance, where
458- [ ` MatrixEntry ` ] ( api/scala/index.html# org. apache. spark. mllib. linalg. distributed. MatrixEntry ) is a
458+ [ ` MatrixEntry ` ] ( api/java/ org/ apache/ spark/ mllib/ linalg/ distributed/ MatrixEntry.html ) is a
459459wrapper over ` (long, long, double) ` . A ` CoordinateMatrix ` can be converted to a ` IndexedRowMatrix `
460460with sparse rows by calling ` toIndexedRowMatrix ` .
461461
462- {% highlight scala %}
462+ {% highlight java %}
463463import org.apache.spark.api.java.JavaRDD;
464464import org.apache.spark.mllib.linalg.distributed.CoordinateMatrix;
465465import org.apache.spark.mllib.linalg.distributed.IndexedRowMatrix;
0 commit comments