@@ -53,11 +53,11 @@ Scala imports `scala.collection.immutable.Vector` by default, so you have to imp
53
53
<div data-lang =" java " markdown =" 1 " >
54
54
55
55
The 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
59
59
using 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.
61
61
62
62
{% highlight java %}
63
63
import 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)))
134
134
<div data-lang =" java " markdown =" 1 " >
135
135
136
136
A 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 ) .
138
138
139
139
{% highlight java %}
140
140
import org.apache.spark.mllib.linalg.Vectors;
@@ -197,7 +197,7 @@ val training: RDD[LabeledPoint] = MLUtils.loadLibSVMFile(sc, "mllib/data/sample_
197
197
</div >
198
198
199
199
<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
201
201
examples stored in LIBSVM format.
202
202
203
203
{% 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))
244
244
<div data-lang =" java " markdown =" 1 " >
245
245
246
246
The 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 ) .
249
249
Sparse 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
251
251
matrices.
252
252
253
253
{% highlight java %}
@@ -303,7 +303,7 @@ val n = mat.numCols()
303
303
304
304
<div data-lang =" java " markdown =" 1 " >
305
305
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
307
307
created from a ` JavaRDD<Vector> ` instance. Then we can compute its column summary statistics.
308
308
309
309
{% highlight java %}
@@ -391,9 +391,9 @@ val rowMat: RowMatrix = mat.toRowMatrix()
391
391
<div data-lang =" java " markdown =" 1 " >
392
392
393
393
An
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 )
395
395
can 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
397
397
wrapper over ` (long, Vector) ` . An ` IndexedRowMatrix ` can be converted to a ` RowMatrix ` by dropping
398
398
its row indices.
399
399
@@ -453,13 +453,13 @@ val indexedRowMatrix = mat.toIndexedRowMatrix()
453
453
<div data-lang =" java " markdown =" 1 " >
454
454
455
455
A
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 )
457
457
can 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
459
459
wrapper over ` (long, long, double) ` . A ` CoordinateMatrix ` can be converted to a ` IndexedRowMatrix `
460
460
with sparse rows by calling ` toIndexedRowMatrix ` .
461
461
462
- {% highlight scala %}
462
+ {% highlight java %}
463
463
import org.apache.spark.api.java.JavaRDD;
464
464
import org.apache.spark.mllib.linalg.distributed.CoordinateMatrix;
465
465
import org.apache.spark.mllib.linalg.distributed.IndexedRowMatrix;
0 commit comments