Binary Classification Example Error: Unknown argument 'data/mllib/sample_binary_classification_data.txt'

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Binary Classification Example Error: Unknown argument 'data/mllib/sample_binary_classification_data.txt'

dataginjaninja
This post has NOT been accepted by the mailing list yet.
This post was updated on .
I get command line code to make the example work, but that code triggers the help due to "unknown argument" and gives the exact example commands back to me. I tried using the full path, but still no luck.


/opt/spark-1.0.0$ bin/spark-submit --class org.apache.spark.examples.mllib.BinaryClassification \
>   examples/target/scala-*/spark-examples-*.jar \
>   --algorithm LR --regType L2 --regParam 1.0 \
>   data/mllib/sample_binary_classification_data.txt
Spark assembly has been built with Hive, including Datanucleus jars on classpath
Error: Unknown argument 'data/mllib/sample_binary_classification_data.txt'
BinaryClassification: an example app for binary classification.
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

For example, the following command runs this app on a synthetic dataset:

 bin/spark-submit --class org.apache.spark.examples.mllib.BinaryClassification \
  examples/target/scala-*/spark-examples-*.jar \
  --algorithm LR --regType L2 --regParam 1.0 \
  data/mllib/sample_binary_classification_data.txt


When I run the example with run-example I get

/opt/spark-1.0.0$ bin/run-example org.apache.spark.examples.mllib.BinaryClassification   examples/target/scala-*/spark-examples-*.jar   --algorithm LR --regType L2 --regParam 1.0   data/mllib/sample_binary_classification_data.txt
bin/run-example: line 38: [: /opt/spark-1.0.0/examples/target/scala-2.10/spark-examples-1.0.0-hadoop2.3.0-cdh5.0.0.jar: binary operator expected
Failed to find Spark examples assembly in /opt/spark-1.0.0/lib or /opt/spark-1.0.0/examples/target
You need to build Spark before running this program


I know Spark was built given I use it all the time...any ideas of what is wrong? I am not the one who does the building of spark so any clues to give to the person who will be trying to rebuild if necessary are helpful. Thank you