Examples of UnsupportedClassTypeException


Examples of weka.core.UnsupportedClassTypeException

     * @throws Exception if classifier can't be built successfully
     */
    public void buildClassifier(Instances instances) throws Exception {
      m_ClassAttribute = instances.classAttribute();
      if (!m_ClassAttribute.isNominal())
  throw new UnsupportedClassTypeException(" Only nominal class, please.");
      if(instances.numClasses() != 2)
  throw new Exception(" Only 2 classes, please.");
     
      Instances data = new Instances(instances);
      if(Utils.eq(data.sumOfWeights(),0))
View Full Code Here

Examples of weka.core.UnsupportedClassTypeException

     * @throws Exception if classifier can't be built successfully
     */
    public void buildClassifier(Instances instances) throws Exception {
      m_ClassAttribute = instances.classAttribute();
      if (!m_ClassAttribute.isNominal())
  throw new UnsupportedClassTypeException(" Only nominal class, please.");
      if(instances.numClasses() != 2)
  throw new Exception(" Only 2 classes, please.");
     
      Instances data = new Instances(instances);
      if(Utils.eq(data.sumOfWeights(),0))
View Full Code Here

Examples of weka.core.UnsupportedClassTypeException

   * @return predicted class probability distribution
   * @throws Exception if distribution can't be computed successfully
   */
  public double[] distributionForInstance(Instance instance) throws Exception {
      if (instance.classAttribute().isNumeric()) {
    throw new UnsupportedClassTypeException("Decorate can't handle a numeric class!");
      }
      double [] sums = new double [instance.numClasses()], newProbs;
      Classifier curr;
     
      for (int i = 0; i < m_Committee.size(); i++) {
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.