I am an absolute beginner. Never made a classifier or anything in weka using Java I have used the interface before. Basically I am kind of lost I've looked at the filter class for weka and played around with it a little. My documents are text documents and I need to separate them into 2 categories.
I'm not sure how I define the categories or how I load the documents into an IDE to be classified
:-(
Any help/tutorials or pointers would be greatly appreciated.
In Weka (GUI) go to Tools -> PackageManager and install LibSVM/LibLinear (both are SVM). Alternatively you can use . jar files of these algorithms and use through your java code. Save this answer.
After downloading the archive and extracting it you'll find the weka. jar file. The JAR file contains all the class files required i.e. weka API. Now we can find all the information about the classes and methods in the Weka Java API documentation.
Weka is a collection of machine learning algorithms for data mining tasks. It contains tools for data preparation, classification, regression, clustering, association rules mining, and visualization.
I found this java tutorial very helpful, although there are very few resources online available (that I have found)
http://www.cs.waikato.ac.nz/ml/weka/index_documentation.html
hope this helps
Using weka for the first time is a pain, but you will need to go through it.
Also, I tried out weka, but I had to dump it due to JVM out of memory exceptions. I wrote my own small clustering algo using Ruby, it's performance was way better.
Any way, here is how to use SVM in WEKA:
You can follow this tutorial of how to use SVM in weka: www.stat.nctu.edu.tw/~misg/WekaInC.ppt
Now, you will need data in ARFF format (and I recommend you use this, as per my exp, it helps, data looks more structured from WEKA's prespective). So, you can do that using XML2ARFF-Converter which I wrote for my self. You can modify it to read text files and convert your text file to ARFF.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With