From 295dc8b5f10fba572482e2799dcdc6b21326485f Mon Sep 17 00:00:00 2001 From: Xiangrui Meng Date: Mon, 5 May 2014 15:42:01 -0700 Subject: [PATCH] update loadLibSVMFile doc --- .../org/apache/spark/mllib/util/MLUtils.scala | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/mllib/src/main/scala/org/apache/spark/mllib/util/MLUtils.scala b/mllib/src/main/scala/org/apache/spark/mllib/util/MLUtils.scala index 0b5b58d9a838b..e598b6cb171a8 100644 --- a/mllib/src/main/scala/org/apache/spark/mllib/util/MLUtils.scala +++ b/mllib/src/main/scala/org/apache/spark/mllib/util/MLUtils.scala @@ -134,9 +134,8 @@ object MLUtils { loadLibSVMFile(sc, path, LabelParser.getInstance(multiclass), numFeatures, minPartitions) /** - * Loads labeled data in the LIBSVM format into an RDD[LabeledPoint], - * with the given label parser, number of features specified explicitly, - * and the default number of partitions. + * Loads labeled data in the LIBSVM format into an RDD[LabeledPoint], with the default number of + * partitions. */ def loadLibSVMFile( sc: SparkContext, @@ -146,9 +145,8 @@ object MLUtils { loadLibSVMFile(sc, path, multiclass, numFeatures, sc.defaultMinPartitions) /** - * Loads labeled data in the LIBSVM format into an RDD[LabeledPoint], - * with the given label parser, number of features determined automatically, - * and the default number of partitions. + * Loads labeled data in the LIBSVM format into an RDD[LabeledPoint], with the number of features + * determined automatically and the default number of partitions. */ def loadLibSVMFile( sc: SparkContext, @@ -157,8 +155,8 @@ object MLUtils { loadLibSVMFile(sc, path, multiclass, -1, sc.defaultMinPartitions) /** - * Loads binary labeled data in the LIBSVM format into an RDD[LabeledPoint], - * with number of features determined automatically and the default number of partitions. + * Loads binary labeled data in the LIBSVM format into an RDD[LabeledPoint], with number of + * features determined automatically and the default number of partitions. */ def loadLibSVMFile(sc: SparkContext, path: String): RDD[LabeledPoint] = loadLibSVMFile(sc, path, multiclass = false, -1, sc.defaultMinPartitions) @@ -168,7 +166,7 @@ object MLUtils { * @param data an RDD of LabeledPoint to be saved * @param dir directory to save the data * - * @see [[org.apache.spark.mllib.util.MLUtils#loadLibSVMData]] + * @see [[org.apache.spark.mllib.util.MLUtils#loadLibSVMFile]] */ def saveAsLibSVMFile(data: RDD[LabeledPoint], dir: String) { // TODO: allow to specify label precision and feature precision.