I have been trying to run one simple example to check Weka GUI interface as I am planning to develop Support Vector Machine(SVM) using Weka API/WLSVM in my Java code. There are three steps I am following to make arff from text datasets (Training & Testing). You can assistant me to run it in Java code.
- text file to .arff file converter.
- Applied StringToWordVector Filter.
- Applied Batch Filter on training and test datasets.
1. text file to .arff file converter.
This step works fine on Simple CLI using following command
Error: java weka.core.converters.TextDirectoryLoader -dir Testing_Text > Testing.arff
but when I run it on MAC bash it gives following error, how can I resolve this issue?
Could not find or load main class weka.core.converters.TextDirectoryLoader
2. Applied StringToWordVector Filter
I applied this filter using Weka GUI Interface separately first training and then on testing datasets.
3. Applied Batch Filter on training and testing dataset.
When I try to apply batch filter it gives error: Input file formats differ on Simple CLI using following command.
java weka.filters.unsupervised.attribute.Standardize -b -i Training_STWV.arff -o train_std.arff -r TestingDiff_STWV.arff -s test_std.arff
Input file formats differ.
Kindly guide me, I am stuck to run Support Vector Machine(SVM) classifier using Weka.
The standard procedure on the Mac is, to change into the directory (e.g.
weka-3.6.8/) and runCheck if that works.
If it does, check that in your own example, you have the classpath properly set (
-jar weka.jar).