Package weka.classifiers.functions

Examples of weka.classifiers.functions.SMO.buildClassifier()


      smo.setC(1.0); //same as default value for jkms
      RBFKernel rbf = new RBFKernel();
      rbf.setGamma(0.1); //same as default value for jkms
      smo.setKernel(rbf);
     
      smo.buildClassifier(train);
     
     
      Evaluation eval = new Evaluation(train);
      eval.evaluateModel(smo, test);
     
View Full Code Here


        // smo.setNormalizeData(numAttrLeft < 40);
        smo.setFilterType(new SelectedTag(m_smoFilterType, SMO.TAGS_FILTER));
        smo.setEpsilon(m_smoPParameter);
        smo.setToleranceParameter(m_smoTParameter);
        smo.setC(m_smoCParameter);
        smo.buildClassifier(trainCopy);
                               
        // Find the attribute with maximum weight^2
        double[] weightsSparse = smo.sparseWeights()[0][1];
        int[] indicesSparse = smo.sparseIndices()[0][1];
        double[] weights = new double[trainCopy.numAttributes()];
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.