Package weka.core

Examples of weka.core.Instance.dataset()


    }

    Instance inst = (Instance)instance.copy();

    // First copy string values from input to output
    copyValues(inst, true, inst.dataset(), getOutputFormat());
   
    // Insert the new attribute and reassign to output
    inst.setDataset(null);
    inst.insertAttributeAt(m_Insert.getIndex());
    inst.setDataset(getOutputFormat());
View Full Code Here


    // build instance
    try {
      inst = (Instance)instance.copy();

      // First copy string values from input to output
      copyValues(inst, true, inst.dataset(), getOutputFormat());

      // Insert the new attribute and reassign to output
      inst.setDataset(null);
      inst.insertAttributeAt(m_Index.getIndex());
      inst.setValue(m_Index.getIndex(), m_Counter);
View Full Code Here

        if (m_Filter.input(e.getInstance())) {
          Instance filteredInstance = m_Filter.output();
          if (filteredInstance != null) {
            if (!m_structurePassedOn) {
              // pass on the new structure first
              m_ie.setStructure(new Instances(filteredInstance
                  .dataset(), 0));
              notifyInstanceListeners(m_ie);
              m_structurePassedOn = true;
            }
View Full Code Here

          }
          Instance filteredInstance = m_Filter.output();
          if (filteredInstance != null) {
            if (!m_structurePassedOn) {
              // pass on the new structure first
              m_ie.setStructure(new Instances(filteredInstance
                  .dataset(), 0));
              notifyInstanceListeners(m_ie);
              m_structurePassedOn = true;
            }
View Full Code Here

        }
        m_instanceCount++;

        if (!m_structurePassedOn) {
          // pass on the new structure first
          m_ie.setStructure(new Instances(filteredInstance.dataset(),
              0));
          notifyInstanceListeners(m_ie);
          m_structurePassedOn = true;
        }
View Full Code Here

        if (m_Filter.input(e.getInstance())) {
          Instance filteredInstance = m_Filter.output();
          if (filteredInstance != null) {
            if (!m_structurePassedOn) {
              // pass on the new structure first
              m_ie.setStructure(new Instances(filteredInstance
                  .dataset(), 0));
              notifyInstanceListeners(m_ie);
              m_structurePassedOn = true;
            }
View Full Code Here

          }
          Instance filteredInstance = m_Filter.output();
          if (filteredInstance != null) {
            if (!m_structurePassedOn) {
              // pass on the new structure first
              m_ie.setStructure(new Instances(filteredInstance
                  .dataset(), 0));
              notifyInstanceListeners(m_ie);
              m_structurePassedOn = true;
            }
View Full Code Here

        }
        m_instanceCount++;

        if (!m_structurePassedOn) {
          // pass on the new structure first
          m_ie.setStructure(new Instances(filteredInstance.dataset(),
              0));
          notifyInstanceListeners(m_ie);
          m_structurePassedOn = true;
        }
View Full Code Here

    int status = e.getStatus();
    int oldNumAtts = 0;
    if (status == IncrementalClassifierEvent.NEW_BATCH) {
      oldNumAtts = e.getStructure().numAttributes();
    } else {
      oldNumAtts = currentI.dataset().numAttributes();
    }
    if (status == IncrementalClassifierEvent.NEW_BATCH) {
      m_instanceEvent = new InstanceEvent(this, null, 0);
      // create new header structure
      Instances oldStructure = new Instances(e.getStructure(), 0);
View Full Code Here

      if (filteredInstance == null) {
  return;
      }
      if (!m_structurePassedOn) {
  // pass on the new structure first
  m_ie.setStructure(new Instances(filteredInstance.dataset(), 0));
  notifyInstanceListeners(m_ie);
  m_structurePassedOn = true;
      }

      m_ie.setInstance(filteredInstance);
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.