@@ -26,11 +26,11 @@ of the vector.
2626<div data-lang =" scala " markdown =" 1 " >
2727
2828The base class of local vectors is
29- [ ` Vector ` ] ( api/mllib /index.html#org.apache.spark.mllib.linalg.Vector ) , and we provide two
30- implementations: [ ` DenseVector ` ] ( api/mllib /index.html#org.apache.spark.mllib.linalg.DenseVector ) and
31- [ ` SparseVector ` ] ( api/mllib /index.html#org.apache.spark.mllib.linalg.SparseVector ) . We recommend
29+ [ ` Vector ` ] ( api/scala /index.html#org.apache.spark.mllib.linalg.Vector ) , and we provide two
30+ implementations: [ ` DenseVector ` ] ( api/scala /index.html#org.apache.spark.mllib.linalg.DenseVector ) and
31+ [ ` SparseVector ` ] ( api/scala /index.html#org.apache.spark.mllib.linalg.SparseVector ) . We recommend
3232using the factory methods implemented in
33- [ ` Vectors ` ] ( api/mllib /index.html#org.apache.spark.mllib.linalg.Vector ) to create local vectors.
33+ [ ` Vectors ` ] ( api/scala /index.html#org.apache.spark.mllib.linalg.Vector ) to create local vectors.
3434
3535{% highlight scala %}
3636import org.apache.spark.mllib.linalg.{Vector, Vectors}
@@ -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/mllib /index.html#org.apache.spark.mllib.linalg.Vector ) , and we provide two
57- implementations: [ ` DenseVector ` ] ( api/mllib /index.html#org.apache.spark.mllib.linalg.DenseVector ) and
58- [ ` SparseVector ` ] ( api/mllib /index.html#org.apache.spark.mllib.linalg.SparseVector ) . We recommend
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
5959using the factory methods implemented in
60- [ ` Vectors ` ] ( api/mllib /index.html#org.apache.spark.mllib.linalg.Vector ) to create local vectors.
60+ [ ` Vectors ` ] ( api/scala /index.html#org.apache.spark.mllib.linalg.Vector ) to create local vectors.
6161
6262{% highlight java %}
6363import org.apache.spark.mllib.linalg.Vector;
@@ -117,7 +117,7 @@ For multiclass classification, labels should be class indices staring from zero:
117117<div data-lang =" scala " markdown =" 1 " >
118118
119119A labeled point is represented by the case class
120- [ ` LabeledPoint ` ] ( api/mllib /index.html#org.apache.spark.mllib.regression.LabeledPoint ) .
120+ [ ` LabeledPoint ` ] ( api/scala /index.html#org.apache.spark.mllib.regression.LabeledPoint ) .
121121
122122{% highlight scala %}
123123import org.apache.spark.mllib.linalg.Vectors
@@ -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/mllib /index.html#org.apache.spark.mllib.regression.LabeledPoint ) .
137+ [ ` LabeledPoint ` ] ( api/scala /index.html#org.apache.spark.mllib.regression.LabeledPoint ) .
138138
139139{% highlight java %}
140140import org.apache.spark.mllib.linalg.Vectors;
@@ -184,7 +184,7 @@ After loading, the feature indices are converted to zero-based.
184184<div class =" codetabs " >
185185<div data-lang =" scala " markdown =" 1 " >
186186
187- [ ` MLUtils.loadLibSVMFile ` ] ( api/mllib /index.html#org.apache.spark.mllib.util.MLUtils$ ) reads training
187+ [ ` MLUtils.loadLibSVMFile ` ] ( api/scala /index.html#org.apache.spark.mllib.util.MLUtils$ ) reads training
188188examples stored in LIBSVM format.
189189
190190{% highlight scala %}
@@ -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/mllib /index.html#org.apache.spark.mllib.util.MLUtils$ ) reads training
200+ [ ` MLUtils.loadLibSVMFile ` ] ( api/scala /index.html#org.apache.spark.mllib.util.MLUtils$ ) reads training
201201examples stored in LIBSVM format.
202202
203203{% highlight java %}
@@ -227,10 +227,10 @@ We are going to add sparse matrix in the next release.
227227<div data-lang =" scala " markdown =" 1 " >
228228
229229The base class of local matrices is
230- [ ` Matrix ` ] ( api/mllib /index.html#org.apache.spark.mllib.linalg.Matrix ) , and we provide one
231- implementation: [ ` DenseMatrix ` ] ( api/mllib /index.html#org.apache.spark.mllib.linalg.DenseMatrix ) .
230+ [ ` Matrix ` ] ( api/scala /index.html#org.apache.spark.mllib.linalg.Matrix ) , and we provide one
231+ implementation: [ ` DenseMatrix ` ] ( api/scala /index.html#org.apache.spark.mllib.linalg.DenseMatrix ) .
232232Sparse matrix will be added in the next release. We recommend using the factory methods implemented
233- in [ ` Matrices ` ] ( api/mllib /index.html#org.apache.spark.mllib.linalg.Matrices ) to create local
233+ in [ ` Matrices ` ] ( api/scala /index.html#org.apache.spark.mllib.linalg.Matrices ) to create local
234234matrices.
235235
236236{% highlight scala %}
@@ -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/mllib /index.html#org.apache.spark.mllib.linalg.Matrix ) , and we provide one
248- implementation: [ ` DenseMatrix ` ] ( api/mllib /index.html#org.apache.spark.mllib.linalg.DenseMatrix ) .
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 ) .
249249Sparse matrix will be added in the next release. We recommend using the factory methods implemented
250- in [ ` Matrices ` ] ( api/mllib /index.html#org.apache.spark.mllib.linalg.Matrices ) to create local
250+ in [ ` Matrices ` ] ( api/scala /index.html#org.apache.spark.mllib.linalg.Matrices ) to create local
251251matrices.
252252
253253{% highlight java %}
@@ -284,7 +284,7 @@ limited by the integer range but it should be much smaller in practice.
284284<div class =" codetabs " >
285285<div data-lang =" scala " markdown =" 1 " >
286286
287- A [ ` RowMatrix ` ] ( api/mllib /index.html#org.apache.spark.mllib.linalg.distributed.RowMatrix ) can be
287+ A [ ` RowMatrix ` ] ( api/scala /index.html#org.apache.spark.mllib.linalg.distributed.RowMatrix ) can be
288288created from an ` RDD[Vector] ` instance. Then we can compute its column summary statistics.
289289
290290{% highlight scala %}
@@ -303,7 +303,7 @@ val n = mat.numCols()
303303
304304<div data-lang =" java " markdown =" 1 " >
305305
306- A [ ` RowMatrix ` ] ( api/mllib /index.html#org.apache.spark.mllib.linalg.distributed.RowMatrix ) can be
306+ A [ ` RowMatrix ` ] ( api/scala /index.html#org.apache.spark.mllib.linalg.distributed.RowMatrix ) can be
307307created from a ` JavaRDD<Vector> ` instance. Then we can compute its column summary statistics.
308308
309309{% highlight java %}
@@ -334,7 +334,7 @@ which could be faster if the rows are sparse.
334334<div data-lang =" scala " markdown =" 1 " >
335335
336336` RowMatrix#computeColumnSummaryStatistics ` returns an instance of
337- [ ` MultivariateStatisticalSummary ` ] ( api/mllib /index.html#org.apache.spark.mllib.stat.MultivariateStatisticalSummary ) ,
337+ [ ` MultivariateStatisticalSummary ` ] ( api/scala /index.html#org.apache.spark.mllib.stat.MultivariateStatisticalSummary ) ,
338338which contains the column-wise max, min, mean, variance, and number of nonzeros, as well as the
339339total count.
340340
@@ -366,9 +366,9 @@ an RDD of indexed rows, which each row is represented by its index (long-typed)
366366<div data-lang =" scala " markdown =" 1 " >
367367
368368An
369- [ ` IndexedRowMatrix ` ] ( api/mllib /index.html#org.apache.spark.mllib.linalg.distributed.IndexedRowMatrix )
369+ [ ` IndexedRowMatrix ` ] ( api/scala /index.html#org.apache.spark.mllib.linalg.distributed.IndexedRowMatrix )
370370can be created from an ` RDD[IndexedRow] ` instance, where
371- [ ` IndexedRow ` ] ( api/mllib /index.html#org.apache.spark.mllib.linalg.distributed.IndexedRow ) is a
371+ [ ` IndexedRow ` ] ( api/scala /index.html#org.apache.spark.mllib.linalg.distributed.IndexedRow ) is a
372372wrapper over ` (Long, Vector) ` . An ` IndexedRowMatrix ` can be converted to a ` RowMatrix ` by dropping
373373its row indices.
374374
@@ -391,9 +391,9 @@ val rowMat: RowMatrix = mat.toRowMatrix()
391391<div data-lang =" java " markdown =" 1 " >
392392
393393An
394- [ ` IndexedRowMatrix ` ] ( api/mllib /index.html#org.apache.spark.mllib.linalg.distributed.IndexedRowMatrix )
394+ [ ` IndexedRowMatrix ` ] ( api/scala /index.html#org.apache.spark.mllib.linalg.distributed.IndexedRowMatrix )
395395can be created from an ` JavaRDD<IndexedRow> ` instance, where
396- [ ` IndexedRow ` ] ( api/mllib /index.html#org.apache.spark.mllib.linalg.distributed.IndexedRow ) is a
396+ [ ` IndexedRow ` ] ( api/scala /index.html#org.apache.spark.mllib.linalg.distributed.IndexedRow ) is a
397397wrapper over ` (long, Vector) ` . An ` IndexedRowMatrix ` can be converted to a ` RowMatrix ` by dropping
398398its row indices.
399399
@@ -427,9 +427,9 @@ dimensions of the matrix are huge and the matrix is very sparse.
427427<div data-lang =" scala " markdown =" 1 " >
428428
429429A
430- [ ` CoordinateMatrix ` ] ( api/mllib /index.html#org.apache.spark.mllib.linalg.distributed.CoordinateMatrix )
430+ [ ` CoordinateMatrix ` ] ( api/scala /index.html#org.apache.spark.mllib.linalg.distributed.CoordinateMatrix )
431431can be created from an ` RDD[MatrixEntry] ` instance, where
432- [ ` MatrixEntry ` ] ( api/mllib /index.html#org.apache.spark.mllib.linalg.distributed.MatrixEntry ) is a
432+ [ ` MatrixEntry ` ] ( api/scala /index.html#org.apache.spark.mllib.linalg.distributed.MatrixEntry ) is a
433433wrapper over ` (Long, Long, Double) ` . A ` CoordinateMatrix ` can be converted to a ` IndexedRowMatrix `
434434with sparse rows by calling ` toIndexedRowMatrix ` . In this release, we do not provide other
435435computation for ` CoordinateMatrix ` .
@@ -453,9 +453,9 @@ val indexedRowMatrix = mat.toIndexedRowMatrix()
453453<div data-lang =" java " markdown =" 1 " >
454454
455455A
456- [ ` CoordinateMatrix ` ] ( api/mllib /index.html#org.apache.spark.mllib.linalg.distributed.CoordinateMatrix )
456+ [ ` CoordinateMatrix ` ] ( api/scala /index.html#org.apache.spark.mllib.linalg.distributed.CoordinateMatrix )
457457can be created from a ` JavaRDD<MatrixEntry> ` instance, where
458- [ ` MatrixEntry ` ] ( api/mllib /index.html#org.apache.spark.mllib.linalg.distributed.MatrixEntry ) is a
458+ [ ` MatrixEntry ` ] ( api/scala /index.html#org.apache.spark.mllib.linalg.distributed.MatrixEntry ) is a
459459wrapper over ` (long, long, double) ` . A ` CoordinateMatrix ` can be converted to a ` IndexedRowMatrix `
460460with sparse rows by calling ` toIndexedRowMatrix ` .
461461
0 commit comments