Package weka.core

Examples of weka.core.Range


  }

  /** Default constructor */
  public RemoveWithValues() {

      m_Values = new Range("first-last");
      m_Values.setInvert(true);
  }
View Full Code Here


   * Set the value of m_SelectedRange.
   *
   * @param newSelectedRange Value to assign to m_SelectedRange.
   */
  public void setSelectedRange(String newSelectedRange) {
    m_SelectedRange = new Range(newSelectedRange);
  }
View Full Code Here

      StringBuffer fields = new StringBuffer();
      for (int j = 0; j < inputFormat.numAttributes(); j++) {
  if (inputFormat.attribute(j).type() == Attribute.STRING)
    fields.append((j + 1) + ",");
      }
      m_SelectedRange = new Range(fields.toString());
    }
    m_SelectedRange.setUpper(inputFormat.numAttributes() - 1);

    // Prevent the user from converting non-string fields
    StringBuffer fields = new StringBuffer();
View Full Code Here

  public void setIgnoredAttributeIndices(String rangeList) {

    if ((rangeList == null) || (rangeList.length() == 0)) {
      m_IgnoreAttributesRange = null;
    } else {
      m_IgnoreAttributesRange = new Range();
      m_IgnoreAttributesRange.setRanges(rangeList);
    }
  }
View Full Code Here

    setFilters((Filter[]) objects.toArray(new Filter[objects.size()]));
   
    objects = new Vector();
    while ((tmpStr = Utils.getOption("R", options)).length() != 0) {
      objects.add(new Range(tmpStr));
    }

    // at least one Range
    if (objects.size() == 0)
      objects.add(new Range("first-last"));

    setRanges((Range[]) objects.toArray(new Range[objects.size()]));
   
    // is number of filters the same as ranges?
    checkDimensions();
View Full Code Here

    outputFormat.insertAttributeAt(newAttribute, m_Insert.getIndex());
    setOutputFormat(outputFormat);
   
    // all attributes, except index of added attribute
    // (otherwise the length of the input/output indices differ)
    Range atts = new Range(m_Insert.getSingleIndex());
    atts.setInvert(true);
    atts.setUpper(outputFormat.numAttributes() - 1);
    initOutputLocators(outputFormat, atts.getSelection());
   
    return true;
  }
View Full Code Here

    boolean outputPredictionsText = m_OutputPredictionsTextBut.isSelected();
    if (m_OutputAdditionalAttributesText.getText().equals("")) {
      m_OutputAdditionalAttributesRange = null;
    }
    else {
      m_OutputAdditionalAttributesRange = new Range(m_OutputAdditionalAttributesText.getText());
      m_OutputAdditionalAttributesRange.setUpper(inst.numAttributes() - 1);
    }

    String grph = null;
View Full Code Here

  /**
   * Constructor
   */
  public MakeIndicator() {

      m_ValIndex = new Range("last");
  }
View Full Code Here

   * Set the range of attributes to process.
   *
   * @param value   the new range.
   */
  public void setSelectedRange(String value) {
    m_SelectedRange = new Range(value);
  }
View Full Code Here

  public void setIgnoredAttributeIndices(String rangeList) {

    if ((rangeList == null) || (rangeList.length() == 0)) {
      m_ignoreAttributesRange = null;
    } else {
      m_ignoreAttributesRange = new Range();
      m_ignoreAttributesRange.setRanges(rangeList);
    }
  }
View Full Code Here

TOP

Related Classes of weka.core.Range

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.