Package weka.core

Examples of weka.core.WekaException


      } catch (Exception ex) {
      }
    }
   
    if (noRule)
      throw new WekaException("No attributes found to work with!");
  }
View Full Code Here


    else if ( estimator.equals("pace4") ) paceEstimator = pace4Estimator;
    else if ( estimator.equals("pace6") ) paceEstimator = pace6Estimator;
    else if ( estimator.equals("aic") ) paceEstimator = aicEstimator;
    else if ( estimator.equals("bic") ) paceEstimator = bicEstimator;
    else if ( estimator.equals("ric") ) paceEstimator = ricEstimator;
    else throw new WekaException("unknown estimator " + estimator +
         " for -E option" );

    String string = Utils.getOption('S', options);
    if( ! string.equals("") ) olscThreshold = Double.parseDouble( string );
   
View Full Code Here

    Object x = instanceToArray(instance);
    double v;
    double[] result = new double[instance.numClasses()];
    if (m_ProbabilityEstimates) {
      if (m_SVMType != SVMTYPE_L2_LR) {
        throw new WekaException("probability estimation is currently only " +
            "supported for L2-regularized logistic regression");
      }

      int[] labels = (int[])invokeMethod(m_Model, "getLabels", null, null);
      double[] prob_estimates = new double[instance.numClasses()];
View Full Code Here

    if (!isFirstBatchDone()) {
      getActualClassifier();
      if (!getSerializedClassifierFile().isDirectory()) {
  // same dataset format?
  if ((m_SerializedHeader != null) && (!m_SerializedHeader.equalHeaders(instances)))
    throw new WekaException(
        "Training header of classifier and filter dataset don't match:\n"
        + m_SerializedHeader.equalHeaders(instances));
      }
      else {
  m_ActualClassifier.buildClassifier(instances);
View Full Code Here

      } catch (Exception ex) {
      }
    }
   
    if (noRule)
      throw new WekaException("No attributes found to work with!");
  }
View Full Code Here

    else if ( estimator.equals("pace4") ) paceEstimator = pace4Estimator;
    else if ( estimator.equals("pace6") ) paceEstimator = pace6Estimator;
    else if ( estimator.equals("aic") ) paceEstimator = aicEstimator;
    else if ( estimator.equals("bic") ) paceEstimator = bicEstimator;
    else if ( estimator.equals("ric") ) paceEstimator = ricEstimator;
    else throw new WekaException("unknown estimator " + estimator +
         " for -E option" );

    String string = Utils.getOption('S', options);
    if( ! string.equals("") ) olscThreshold = Double.parseDouble( string );
   
View Full Code Here

      } catch (Exception ex) {
      }
    }
   
    if (noRule)
      throw new WekaException("No attributes found to work with!");
  }
View Full Code Here

      } catch (Exception ex) {
      }
    }
   
    if (noRule)
      throw new WekaException("No attributes found to work with!");
  }
View Full Code Here

      m_Document.remove(0, m_Document.getLength());
     
      // add new content
      content = ScriptUtils.load(file);
      if (content == null)
  throw new WekaException("Error reading content of file '" + file + "'!");
      m_Document.insertString(0, content, null);
     
      m_Modified = false;
      m_Filename = file;
      result     = true;
View Full Code Here

    }
    else {
      // process options
      tmpStr = Utils.getOption('s', args);
      if (tmpStr.length() == 0)
        throw new WekaException("No script supplied!");
      else
  scriptFile = new File(tmpStr);
      script.setOptions(args);
     
      // remove empty elements from array
View Full Code Here

TOP

Related Classes of weka.core.WekaException

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.