I couldn't find the classification.SVM class.

   - Most probably the command is something of the order of:
   - bin/spark-submit --class
      org.apache.spark.examples.mllib.BinaryClassification
      examples/target/scala-*/spark-examples-*.jar --algorithm SVM  train.csv
   - For more details try
      - ./bin/run-example mllib.BinaryClassification <spark url>
         - Usage: BinaryClassification [options] <input>
         -   --numIterations <value>       number of iterations
         -   --stepSize <value>        initial step size, default: 1.0
         -   --algorithm <value>         algorithm (SVM,LR), default: LR
         -   --regType <value>         regularization type (L1,L2),
         default: L2
         -   --regParam <value>         regularization parameter, default:
         0.1
         -   <input>         input paths to labeled examples in LIBSVM
         format

HTH.

Cheers

<k/>

P.S: I am using 1.0.0 rc10. Even for earlier release, just run the
classification class and it will tell you what the parameters are. Most
probably SVM is an algorithm parameter not a class by itself.


On Thu, May 22, 2014 at 2:12 PM, yxzhao <yxz...@ualr.edu> wrote:

> Thanks Stephen,
> I used the following commnad line to run the SVM, but it seems that the
> path is not correct. What the right path or command line should be? Thanks.
> *./bin/run-example org.apache.spark.mllib.classification.SVM
> spark://100.1.255.193:7077 <http://100.1.255.193:7077> train.csv 20*
> Exception in thread "main" java.lang.NoClassDefFoundError:
> org/apache/spark/mllib/classification/SVM
> Caused by: java.lang.ClassNotFoundException:
> org.apache.spark.mllib.classification.SVM
> at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
> at java.security.AccessController.doPrivileged(Native Method)
> at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
> at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
> at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
> at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
> Could not find the main class: org.apache.spark.mllib.classification.SVM.
>  Program will exit.
>
>
>
>
>
>
>
> On Thu, May 22, 2014 at 3:05 PM, Stephen Boesch [via Apache Spark User
> List] <[hidden email] <http://user/SendEmail.jtp?type=node&node=6287&i=0>>
> wrote:
> >
> > There is a bin/run-example.sh <example-class> [<args>]
> >
> >
> > 2014-05-22 12:48 GMT-07:00 yxzhao <[hidden email]>:
> >>
> >> I want to run the LR, SVM, and NaiveBayes algorithms implemented in the
> >> following directory on my data set. But I did not find the sample
> command
> >> line to run them. Anybody help? Thanks.
> >>
> >>
> spark-0.9.0-incubating/mllib/src/main/scala/org/apache/spark/mllib/classification
> >>
> >>
> >>
> >> --
> >> View this message in context:
> >>
> http://apache-spark-user-list.1001560.n3.nabble.com/How-to-Run-Machine-Learning-Examples-tp6277.html
> >> Sent from the Apache Spark User List mailing list archive at Nabble.com.
> >
> >
> >
> >
> > ________________________________
> > If you reply to this email, your message will be added to the discussion
> > below:
> >
> http://apache-spark-user-list.1001560.n3.nabble.com/How-to-Run-Machine-Learning-Examples-tp6277p6278.html
> > To unsubscribe from How to Run Machine Learning Examples, click here.
> > NAML
>
>
>
> ------------------------------
> View this message in context: Re: How to Run Machine Learning 
> Examples<http://apache-spark-user-list.1001560.n3.nabble.com/How-to-Run-Machine-Learning-Examples-tp6277p6287.html>
>
> Sent from the Apache Spark User List mailing list 
> archive<http://apache-spark-user-list.1001560.n3.nabble.com/>at Nabble.com.
>

Reply via email to