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…