Blog Archives

Weka create instance and training data using arff

Read training data from arff file: public static Instances get_instances_from_arff() throws Exception { BufferedReader breader = null; breader = new BufferedReader( new FileReader(System.getProperty(“user.dir”)+”/src/weka_usage/exploration_tracks.arff”) ); Instances training_data = new Instances(breader); training_data.setClassIndex(training_data.numAttributes() -1); breader.close(); return training_data; } Create new instance with new

Tagged with: , , ,
Posted in Weka

Weka jar file placement and GUI runner in Linux/Ubuntu

Weeka instalation: 1. Download Weeka 2. Unzip the folder. 3. move into folder by using this command cd path/to/folder 4. move weka.jar file from that folder to /usr/share/java by using command below: sudo mv weka.jar /usr/share/java Weeka GUI runner: 1.

Tagged with: , , , ,
Posted in DataMining, MachineLearning, Ubuntu, Weka
StackOverFlow
Categories
Archives