Package weka.experiment

Examples of weka.experiment.PairedStats


    int startPt = m_rankingRequested ? 1 : 0;

    for (int i=0;i<raceSets.length;i++) {
      individualStats[i] = new Stats();
      for (int j=i+1;j<raceSets.length;j++) {
        testers[i][j] = new PairedStats(m_sigLevel);
      }
    }
   
    BitSet [] raceBitSets = new BitSet[raceSets.length];
    for (int i=0;i<raceSets.length;i++) {
View Full Code Here


    int    i;
    int    len;
    int    part;
    int    low = 0;
    int    high = inst.numInstances() - 1;
    PairedStats full = new PairedStats(0.01);
    PairedStats leftSubset = new PairedStats(0.01);
    PairedStats rightSubset = new PairedStats(0.01);
    int    classIndex = inst.classIndex();
    double      leftCorr, rightCorr;
    double      leftVar, rightVar, allVar;
    double      order = 2.0;

    initialize(low, high, attr);

    if (m_number < 4) {
      return;
    }

    len = ((high - low + 1) < 5) ? 1 : (high - low + 1) / 5;
    m_position = low;
    part = low + len - 1;

    // prime the subsets
    for (i = low; i < len; i++) {
      full.add(inst.instance(i).value(attr),
         inst.instance(i).value(classIndex));
      leftSubset.add(inst.instance(i).value(attr),
         inst.instance(i).value(classIndex));
    }

    for (i = len; i < inst.numInstances(); i++) {
      full.add(inst.instance(i).value(attr),
         inst.instance(i).value(classIndex));
      rightSubset.add(inst.instance(i).value(attr),
          inst.instance(i).value(classIndex));
    }

    full.calculateDerived();

    allVar = (full.yStats.stdDev * full.yStats.stdDev);
    allVar = Math.abs(allVar);
    allVar = Math.pow(allVar, (1.0 / order));

    for (i = low + len; i < high - len - 1; i++) {
      rightSubset.subtract(inst.instance(i).value(attr),
         inst.instance(i).value(classIndex));
      leftSubset.add(inst.instance(i).value(attr),
         inst.instance(i).value(classIndex));

      if (!Utils.eq(inst.instance(i + 1).value(attr),
        inst.instance(i).value(attr))) {
  leftSubset.calculateDerived();
  rightSubset.calculateDerived();

  leftCorr = Math.abs(leftSubset.correlation);
  rightCorr = Math.abs(rightSubset.correlation);
  leftVar = (leftSubset.yStats.stdDev * leftSubset.yStats.stdDev);
  leftVar = Math.abs(leftVar);
View Full Code Here

TOP

Related Classes of weka.experiment.PairedStats

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.