congrats Icon
New! Tabnine Pro 14-day free trial
Start a free trial
Tabnine Logo
Stats.add
Code IndexAdd Tabnine to your IDE (free)

How to use
add
method
in
weka.experiment.Stats

Best Java code snippets using weka.experiment.Stats.add (Showing top 20 results out of 315)

origin: nz.ac.waikato.cms.weka/weka-stable

/**
 * Add an observed pair of values.
 *
 * @param value1 the value from column 1
 * @param value2 the value from column 2
 */
public void add(double value1, double value2) {
 xStats.add(value1);
 yStats.add(value2);
 differencesStats.add(value1 - value2);
 xySum += value1 * value2;
 count ++;
}
 
origin: nz.ac.waikato.cms.weka/weka-stable

/**
 * Adds a value to the observed values<p>
 * 
 * It's equivalent to <code>add(value, 1)</code><p>
 *
 * @param value the observed value
 */
public void add(double value) {
 add(value, 1);
}
origin: Waikato/weka-trunk

/**
 * Add an observed pair of values.
 *
 * @param value1 the value from column 1
 * @param value2 the value from column 2
 */
public void add(double value1, double value2) {
 xStats.add(value1);
 yStats.add(value2);
 differencesStats.add(value1 - value2);
 xySum += value1 * value2;
 count ++;
}
 
origin: Waikato/weka-trunk

/**
 * Adds a value to the observed values<p>
 * 
 * It's equivalent to <code>add(value, 1)</code><p>
 *
 * @param value the observed value
 */
public void add(double value) {
 add(value, 1);
}
origin: nz.ac.waikato.cms.weka/weka-stable

private void addWeightedStats(Stats stats, double... values) {
 assert values.length % 2 == 0;
 for (int i = 0; i < values.length; i += 2) {
  stats.add(values[i], values[i + 1]);
 }
}

origin: Waikato/weka-trunk

private void addWeightedStats(Stats stats, double... values) {
 assert values.length % 2 == 0;
 for (int i = 0; i < values.length; i += 2) {
  stats.add(values[i], values[i + 1]);
 }
}

origin: nz.ac.waikato.cms.weka/weka-stable

/**
 * Updates the counters for one more observed distinct value.
 *
 * @param value the value that has just been seen
 * @param count the number of times the value appeared
 * @param weight the weight mass of the value
 */
protected void addDistinct(double value, int count, double weight) {
 if (count > 0) {
  if (count == 1) {
   uniqueCount++;
  }
  if (value == (int)value) {
   intCount += count;
  } else {
   realCount += count;
  }
  if (nominalCounts != null) {
   nominalCounts[(int) value] = count;
   nominalWeights[(int) value] = weight;
  }
  if (numericStats != null) {
   //numericStats.add(value, count);
   numericStats.add(value, weight);
   numericStats.calculateDerived();
  }
 }
 distinctCount++;
}
origin: nz.ac.waikato.cms.weka/weka-stable

private void addWeightedStats(Stats stats, long... values) {
 assert values.length%2 == 0;
 
 for (int i = 0; i < values.length; i += 2) {
  stats.add(Double.longBitsToDouble(values[i]),
    Double.longBitsToDouble(values[i + 1])
    );
 }
 
}

origin: Waikato/weka-trunk

/**
 * Updates the counters for one more observed distinct value.
 *
 * @param value the value that has just been seen
 * @param count the number of times the value appeared
 * @param weight the weight mass of the value
 */
protected void addDistinct(double value, int count, double weight) {
 if (count > 0) {
  if (count == 1) {
   uniqueCount++;
  }
  if (value == (int)value) {
   intCount += count;
  } else {
   realCount += count;
  }
  if (nominalCounts != null) {
   nominalCounts[(int) value] = count;
   nominalWeights[(int) value] = weight;
  }
  if (numericStats != null) {
   //numericStats.add(value, count);
   numericStats.add(value, weight);
   numericStats.calculateDerived();
  }
 }
 distinctCount++;
}
origin: Waikato/weka-trunk

private void addWeightedStats(Stats stats, long... values) {
 assert values.length%2 == 0;
 
 for (int i = 0; i < values.length; i += 2) {
  stats.add(Double.longBitsToDouble(values[i]),
    Double.longBitsToDouble(values[i + 1])
    );
 }
 
}

origin: com.googlecode.obvious/obviousx-weka

public void addDistinct(double value, int count) {
 if (count > 0) {
  if (count == 1) {
   uniqueCount++;
  }
  if (Utils.eq(value, (double)((int)value))) {
   intCount += count;
  } else {
   realCount += count;
  }
  if (nominalCounts != null) {
   nominalCounts[(int)value] = count;
  }
  if (numericStats != null) {
   numericStats.add(value, count);
   numericStats.calculateDerived();
  }
 }
 distinctCount++;
}
 
origin: nz.ac.waikato.cms.weka/weka-stable

add(value, -weight);
return;
origin: Waikato/weka-trunk

 double value = Double.longBitsToDouble(adds[j]);
 double weight = Double.longBitsToDouble(adds[j + 1]);
 stats.add(value, weight);
stats.add(value, weight);
b.add(value); b.add(weight);
origin: nz.ac.waikato.cms.weka/weka-stable

/**
 * Unweighted macro-averaged F-measure. If some classes not present in the
 * test set, they're just skipped (since recall is undefined there anyway) .
 *
 * @return unweighted macro-averaged F-measure.
 * */
public double unweightedMacroFmeasure() {
 weka.experiment.Stats rr = new weka.experiment.Stats();
 for (int c = 0; c < m_NumClasses; c++) {
  // skip if no testing positive cases of this class
  if (numTruePositives(c) + numFalseNegatives(c) > 0) {
   rr.add(fMeasure(c));
  }
 }
 rr.calculateDerived();
 return rr.mean;
}
origin: Waikato/weka-trunk

/**
 * Unweighted macro-averaged F-measure. If some classes not present in the
 * test set, they're just skipped (since recall is undefined there anyway) .
 *
 * @return unweighted macro-averaged F-measure.
 * */
public double unweightedMacroFmeasure() {
 weka.experiment.Stats rr = new weka.experiment.Stats();
 for (int c = 0; c < m_NumClasses; c++) {
  // skip if no testing positive cases of this class
  if (numTruePositives(c) + numFalseNegatives(c) > 0) {
   rr.add(fMeasure(c));
  }
 }
 rr.calculateDerived();
 return rr.mean;
}
origin: nz.ac.waikato.cms.weka/weka-stable

 && (!instance.isMissing(i))) {
m_attStats[i].add(instance.value(i), instance.weight());
origin: nz.ac.waikato.cms.weka/weka-stable

stats.add(value, weight);
checkStatsInvalidState(stats);
stats.add(value, weight);
checkStatsInvalidState(stats);
stats.add(value, weight);
checkStatsInvalidState(stats);
origin: Waikato/weka-trunk

stats.add(value, weight);
checkStatsInvalidState(stats);
stats.add(value, weight);
checkStatsInvalidState(stats);
stats.add(value, weight);
checkStatsInvalidState(stats);
origin: nz.ac.waikato.cms.weka/weka-stable

 stats.add(values[i], values[i + 1]);
} else {
 break;
origin: Waikato/weka-trunk

 stats.add(values[i], values[i + 1]);
} else {
 break;
weka.experimentStatsadd

Javadoc

Adds a value to the observed values

It's equivalent to add(value, 1)

Popular methods of Stats

  • <init>
  • calculateDerived
    Tells the object to calculate any statistics that don't have their values automatically updated duri
  • subtract
    Subtracts a weighted value from the observed values
  • goInvalid
  • isInvalid
  • negativeCount
  • reset

Popular in Java

  • Finding current android device location
  • setContentView (Activity)
  • setScale (BigDecimal)
  • getSupportFragmentManager (FragmentActivity)
  • Graphics2D (java.awt)
    This Graphics2D class extends the Graphics class to provide more sophisticated control overgraphics
  • FileWriter (java.io)
    A specialized Writer that writes to a file in the file system. All write requests made by calling me
  • Pattern (java.util.regex)
    Patterns are compiled regular expressions. In many cases, convenience methods such as String#matches
  • ZipFile (java.util.zip)
    This class provides random read access to a zip file. You pay more to read the zip file's central di
  • BoxLayout (javax.swing)
  • JFileChooser (javax.swing)
  • Top 12 Jupyter Notebook Extensions
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyStudentsTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now