Package weka.core

Examples of weka.core.FastVector.indexOf()


       // - relational
       dataRel = new Instances(data.attribute(4).relation(), 0);
       // -- first instance
       valsRel = new double[2];
       valsRel[0] = Math.PI + 1;
       valsRel[1] = attValsRel.indexOf("val5.3");
       dataRel.add(new Instance(1.0, valsRel));
       // -- second instance
       valsRel = new double[2];
       valsRel[0] = Math.PI + 2;
       valsRel[1] = attValsRel.indexOf("val5.2");
View Full Code Here


       valsRel[1] = attValsRel.indexOf("val5.3");
       dataRel.add(new Instance(1.0, valsRel));
       // -- second instance
       valsRel = new double[2];
       valsRel[0] = Math.PI + 2;
       valsRel[1] = attValsRel.indexOf("val5.2");
       dataRel.add(new Instance(1.0, valsRel));
       vals[4] = data.attribute(4).addRelation(dataRel);
       // add
       data.add(new Instance(1.0, vals));
  
View Full Code Here

       // - relational
       dataRel = new Instances(data.attribute(4).relation(), 0);
       // -- first instance
       valsRel = new double[2];
       valsRel[0] = Math.E + 1;
       valsRel[1] = attValsRel.indexOf("val5.4");
       dataRel.add(new Instance(1.0, valsRel));
       // -- second instance
       valsRel = new double[2];
       valsRel[0] = Math.E + 2;
       valsRel[1] = attValsRel.indexOf("val5.1");
View Full Code Here

       valsRel[1] = attValsRel.indexOf("val5.4");
       dataRel.add(new Instance(1.0, valsRel));
       // -- second instance
       valsRel = new double[2];
       valsRel[0] = Math.E + 2;
       valsRel[1] = attValsRel.indexOf("val5.1");
       dataRel.add(new Instance(1.0, valsRel));
       vals[4] = data.attribute(4).addRelation(dataRel);
       // add
       Instance inst = new Instance(1.0, vals);
       inst.setMissing(2);
View Full Code Here

      Enumeration am = ((AdditionalMeasureProducer)m_ResultProducer).
  enumerateMeasures();
      while (am.hasMoreElements()) {
  String mname = (String)am.nextElement();
  if (mname.startsWith("measure")) {
    if (measureNames.indexOf(mname) == -1) {
      measureNames.addElement(mname);
    }
  } else {
    throw new Exception ("Additional measures in "
             + m_ResultProducer.getClass().getName()
View Full Code Here

    Enumeration am = ((AdditionalMeasureProducer)current).
      enumerateMeasures();
    while (am.hasMoreElements()) {
      String mname = (String)am.nextElement();
      if (mname.startsWith("measure")) {
        if (measureNames.indexOf(mname) == -1) {
    measureNames.addElement(mname);
        }
      } else {
        throw new Exception ("Additional measures in "
           + current.getClass().getName()
View Full Code Here

      Enumeration am = ((AdditionalMeasureProducer)m_ResultProducer).
  enumerateMeasures();
      while (am.hasMoreElements()) {
  String mname = (String)am.nextElement();
  if (mname.startsWith("measure")) {
    if (measureNames.indexOf(mname) == -1) {
      measureNames.addElement(mname);
    }
  } else {
    throw new Exception ("Additional measures in "
             + m_ResultProducer.getClass().getName()
View Full Code Here

    Enumeration am = ((AdditionalMeasureProducer)current).
      enumerateMeasures();
    while (am.hasMoreElements()) {
      String mname = (String)am.nextElement();
      if (mname.startsWith("measure")) {
        if (measureNames.indexOf(mname) == -1) {
    measureNames.addElement(mname);
        }
      } else {
        throw new Exception ("Additional measures in "
           + current.getClass().getName()
View Full Code Here

      Enumeration am = ((AdditionalMeasureProducer)m_ResultProducer).
  enumerateMeasures();
      while (am.hasMoreElements()) {
  String mname = (String)am.nextElement();
  if (mname.startsWith("measure")) {
    if (measureNames.indexOf(mname) == -1) {
      measureNames.addElement(mname);
    }
  } else {
    throw new Exception ("Additional measures in "
             + m_ResultProducer.getClass().getName()
View Full Code Here

    Enumeration am = ((AdditionalMeasureProducer)current).
      enumerateMeasures();
    while (am.hasMoreElements()) {
      String mname = (String)am.nextElement();
      if (mname.startsWith("measure")) {
        if (measureNames.indexOf(mname) == -1) {
    measureNames.addElement(mname);
        }
      } else {
        throw new Exception ("Additional measures in "
           + current.getClass().getName()
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.