apache/spark — pull request #584 by mengxr (2014-04-28 23:29:00+00:00)
Title: [SPARK-1636][MLLIB] Move main methods to examples

* `NaiveBayes` -> `SparseNaiveBayes`
* `KMeans` -> `DenseKMeans`
* `SVMWithSGD` and `LogisticRegerssionWithSGD` -> `BinaryClassification`
* `ALS` -> `MovieLensALS`
* `LinearRegressionWithSGD`, `LassoWithSGD`, and `RidgeRegressionWithSGD` -> `LinearRegression`
* `DecisionTree` -> `DecisionTreeRunner`

scopt is used for command-line parameters except `DecisionTreeRunner`.

Example help message:

~~~
BinaryClassification: an example app for binary classification.
Usage: BinaryClassification [options]

--numIterations
number of iterations
--stepSize
initial step size, default: 1.0
--algorithm
algorithm (SVM,LR), default: LR
--regType
regularization type (L1,L2), default: L2
--regParam
regularization parameter, default: 0.1

input paths to labeled examples in LIBSVM format
~~~