Package weka.classifiers.functions

Examples of weka.classifiers.functions.LibSVM


public class WekaWrapper {

    public void train(ArrayList<LinkedHashMap<Integer, Double>> trainingSamples, ArrayList<Integer> labels, int maxNumFeats) {
        Instances trainingSet = fillDataSet(trainingSamples, labels, maxNumFeats);

        LibSVM cModel = new LibSVM();
        try {
            cModel.buildClassifier(trainingSet);
            saveTheModel(cModel, maxNumFeats);
            ArffSaver saver = new ArffSaver();
            saver.setInstances(trainingSet);
            saver.setFile(new File(PropertiesGetter.getProperty("TrainingDataSetObject")));
            saver.writeBatch();
View Full Code Here

TOP

Related Classes of weka.classifiers.functions.LibSVM

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.