Examples of classValue()


Examples of weka.core.Instance.classValue()

    m_intervalBounds[j][((int)inst.classValue()*2+1)]) {
        m_intervalBounds[j][((int)inst.classValue()*2+1)] =
    inst.value(j);
      }
      if (inst.value(j) >
    m_intervalBounds[j][((int)inst.classValue()*2+2)]) {
        m_intervalBounds[j][((int)inst.classValue()*2+2)] =
    inst.value(j);
      }
    }
  }
View Full Code Here

Examples of weka.core.Instance.classValue()

        m_intervalBounds[j][((int)inst.classValue()*2+1)] =
    inst.value(j);
      }
      if (inst.value(j) >
    m_intervalBounds[j][((int)inst.classValue()*2+2)]) {
        m_intervalBounds[j][((int)inst.classValue()*2+2)] =
    inst.value(j);
      }
    }
  }
      }
View Full Code Here

Examples of weka.core.Instance.classValue()

      double val = inst.value(j);
    
      int k;
      for (k = m_intervalBounds[j].length-1; k >= 0; k--) {
        if (val > m_intervalBounds[j][k]) {
    m_counts[j][k][(int)inst.classValue()] += inst.weight();
    break;
        } else if (val == m_intervalBounds[j][k]) {
    m_counts[j][k][(int)inst.classValue()] +=
      (inst.weight() / 2.0);
    m_counts[j][k-1][(int)inst.classValue()] +=
View Full Code Here

Examples of weka.core.Instance.classValue()

      for (k = m_intervalBounds[j].length-1; k >= 0; k--) {
        if (val > m_intervalBounds[j][k]) {
    m_counts[j][k][(int)inst.classValue()] += inst.weight();
    break;
        } else if (val == m_intervalBounds[j][k]) {
    m_counts[j][k][(int)inst.classValue()] +=
      (inst.weight() / 2.0);
    m_counts[j][k-1][(int)inst.classValue()] +=
      (inst.weight() / 2.0);;
    break;
        }
View Full Code Here

Examples of weka.core.Instance.classValue()

    m_counts[j][k][(int)inst.classValue()] += inst.weight();
    break;
        } else if (val == m_intervalBounds[j][k]) {
    m_counts[j][k][(int)inst.classValue()] +=
      (inst.weight() / 2.0);
    m_counts[j][k-1][(int)inst.classValue()] +=
      (inst.weight() / 2.0);;
    break;
        }
      }
    
View Full Code Here

Examples of weka.core.Instance.classValue()

        }
      }
    
    } else {
      // nominal attribute
      m_counts[j][(int)inst.value(j)][(int)inst.classValue()] +=
        inst.weight();;
    }
  }
      }
    }
View Full Code Here

Examples of weka.core.Instance.classValue()

      m_ErrorEstimator = null;

      for (int i = 0; i < train.numInstances(); i++) {
  Instance currentInst = train.instance(i);
  if (!currentInst.classIsMissing()) {
    addNumericTrainClass(currentInst.classValue(),
        currentInst.weight());
  }
      }

    } else {
View Full Code Here

Examples of weka.core.Instance.classValue()

                [numClasses] += inst.weight();
              counts[inst.index(i)][0][numClasses] -= inst.weight();
            }
          } else {
            counts[inst.index(i)][(int)inst.valueSparse(i)]
              [(int)inst.classValue()] += inst.weight();
            counts[inst.index(i)][0][(int)inst.classValue()] -= inst.weight();
          }
        }
      }
    }
View Full Code Here

Examples of weka.core.Instance.classValue()

              counts[inst.index(i)][0][numClasses] -= inst.weight();
            }
          } else {
            counts[inst.index(i)][(int)inst.valueSparse(i)]
              [(int)inst.classValue()] += inst.weight();
            counts[inst.index(i)][0][(int)inst.classValue()] -= inst.weight();
          }
        }
      }
    }
View Full Code Here

Examples of weka.core.SparseInstance.classValue()

      classifier.resetLearningImpl();
    }else if(obj.getClass() == SparseInstance.class){
      //If it's an instance
      SparseInstance inst = (SparseInstance) obj;
      //Emit the entire prediction array and the correct value
      collector.emit(new Values(classifier.getVotesForInstance(inst), inst.classValue()));
      //Train on instance
      classifier.trainOnInstanceImpl(inst);
      //Send out our latest classifier
      ClassifierInstance latestClassifier = classifier.getLatestClassifier();
      if(latestClassifier != null)
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.