Tabnine Logo
Stats.calculateDerived
Code IndexAdd Tabnine to your IDE (free)

How to use
calculateDerived
method
in
weka.experiment.Stats

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

origin: nz.ac.waikato.cms.moa/moa

/**
 * Returns the standard deviation of a numeric attribute
 *
 * @param attIndex the index of the attribute
 * @return the standard deviation
 * @throws Exception if an error occurs
 */
protected double getStandardDev(int attIndex) { //throws Exception {
  //  if (!m_clusterInstances.attribute(attIndex).isNumeric()) {
  //throw new Exception("getStandardDev: attribute is not numeric");
  // }
  m_attStats[attIndex].numericStats.calculateDerived();
  double stdDev = m_attStats[attIndex].numericStats.stdDev;
  if (Double.isNaN(stdDev) || Double.isInfinite(stdDev)) {
    return m_acuity;
  }
  return Math.max(m_acuity, stdDev);
}
origin: nz.ac.waikato.cms.weka/weka-stable

xStats.calculateDerived();
yStats.calculateDerived();
differencesStats.calculateDerived();
origin: Waikato/weka-trunk

xStats.calculateDerived();
yStats.calculateDerived();
differencesStats.calculateDerived();
origin: nz.ac.waikato.cms.weka/weka-stable

/**
 * Returns the standard deviation of a numeric attribute
 * 
 * @param attIndex the index of the attribute
 * @return the standard deviation
 * @throws Exception if an error occurs
 */
protected double getStandardDev(int attIndex) throws Exception {
 if (!m_clusterInstances.attribute(attIndex).isNumeric()) {
  throw new Exception("getStandardDev: attribute is not numeric");
 }
 m_attStats[attIndex].numericStats.calculateDerived();
 double stdDev = m_attStats[attIndex].numericStats.stdDev;
 if (Double.isNaN(stdDev) || Double.isInfinite(stdDev)) {
  return m_acuity;
 }
 return Math.max(m_acuity, stdDev);
}
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: Waikato/weka-trunk

/**
 * Returns the standard deviation of a numeric attribute
 * 
 * @param attIndex the index of the attribute
 * @return the standard deviation
 * @throws Exception if an error occurs
 */
protected double getStandardDev(int attIndex) throws Exception {
 if (!m_clusterInstances.attribute(attIndex).isNumeric()) {
  throw new Exception("getStandardDev: attribute is not numeric");
 }
 m_attStats[attIndex].numericStats.calculateDerived();
 double stdDev = m_attStats[attIndex].numericStats.stdDev;
 if (Double.isNaN(stdDev) || Double.isInfinite(stdDev)) {
  return m_acuity;
 }
 return Math.max(m_acuity, stdDev);
}
origin: nz.ac.waikato.cms.weka/weka-stable

xStats.calculateDerived();
yStats.calculateDerived();
differencesStats.calculateDerived();
origin: Waikato/weka-trunk

xStats.calculateDerived();
yStats.calculateDerived();
differencesStats.calculateDerived();
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: nz.ac.waikato.cms.weka/weka-stable

 ps.calculateDerived();
 System.err.println(ps);
} catch (Exception ex) {
origin: Waikato/weka-trunk

 ps.calculateDerived();
 System.err.println(ps);
} catch (Exception ex) {
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

/**
 * 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

stats.calculateDerived();
subtracted1.calculateDerived();
subtracted2.calculateDerived();
origin: Waikato/weka-trunk

stats.calculateDerived();
subtracted1.calculateDerived();
subtracted2.calculateDerived();
origin: nz.ac.waikato.cms.weka/weka-stable

subtractWeightedStats(test, negativeWeights);
reference.calculateDerived();
test.calculateDerived();
checkStats(test, descr, reference, 0.0);
addWeightedStats(test, negativeWeights);
reference.calculateDerived();
test.calculateDerived();
checkStats(test, descr, reference, 0.0);
subtractWeightedStats(test, negativeWeights);
reference.calculateDerived();
test.calculateDerived();
checkStats(test, descr, reference, 0.0);
subtractWeightedStats(test, weightedValues1);
reference.calculateDerived();
test.calculateDerived();
checkStats(test, descr, reference, 0.0);
origin: Waikato/weka-trunk

subtractWeightedStats(test, negativeWeights);
reference.calculateDerived();
test.calculateDerived();
checkStats(test, descr, reference, 0.0);
addWeightedStats(test, negativeWeights);
reference.calculateDerived();
test.calculateDerived();
checkStats(test, descr, reference, 0.0);
subtractWeightedStats(test, negativeWeights);
reference.calculateDerived();
test.calculateDerived();
checkStats(test, descr, reference, 0.0);
subtractWeightedStats(test, weightedValues1);
reference.calculateDerived();
test.calculateDerived();
checkStats(test, descr, reference, 0.0);
origin: nz.ac.waikato.cms.weka/weka-stable

 && input.classIndex() != i) {
m_attStats[i].calculateDerived();
origin: Waikato/weka-trunk

 && input.classIndex() != i) {
m_attStats[i].calculateDerived();
weka.experimentStatscalculateDerived

Javadoc

Tells the object to calculate any statistics that don't have their values automatically updated during add. Currently updates the standard deviation.

Popular methods of Stats

  • <init>
  • add
    Adds a weighted value to the observed values
  • subtract
    Subtracts a weighted value from the observed values
  • goInvalid
  • isInvalid
  • negativeCount
  • reset

Popular in Java

  • Parsing JSON documents to java classes using gson
  • onCreateOptionsMenu (Activity)
  • onRequestPermissionsResult (Fragment)
  • notifyDataSetChanged (ArrayAdapter)
  • FileReader (java.io)
    A specialized Reader that reads from a file in the file system. All read requests made by calling me
  • String (java.lang)
  • ServerSocket (java.net)
    This class represents a server-side socket that waits for incoming client connections. A ServerSocke
  • URLEncoder (java.net)
    This class is used to encode a string using the format required by application/x-www-form-urlencoded
  • BoxLayout (javax.swing)
  • Options (org.apache.commons.cli)
    Main entry-point into the library. Options represents a collection of Option objects, which describ
  • Best plugins for Eclipse
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

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