test_class.file: storm/trident-ml/src/test/java/com/github/pmerienne/trident/ml/stats/FixedStreamFeatureStatisticsTest.java
test_class.identifier: FixedStreamFeatureStatisticsTest
test_case.body: @Test
  	public void testUpdate() {
  		// Given
  		Random random = new Random();
  		double expectedMean = 4.0;
  		double stdDev = 6.0;
  		int size = 10000;
  
  		double[] features = new double[size];
  		for (int i = 0; i < size; i++) {
  			features[i] = expectedMean + random.nextGaussian() * stdDev;
  		}
  
  		// When
  		FixedStreamFeatureStatistics statistics = new FixedStreamFeatureStatistics();
  		for (int i = 0; i < size; i++) {
  			statistics.update(features[i]);
  		}
  
  		// Then
  		assertEquals(expectedMean, statistics.getMean(), 0.1);
  		assertEquals(stdDev, statistics.getStdDev(), 0.1);
  	}
test_case.class_method_signature: FixedStreamFeatureStatisticsTest.testUpdate()
test_case.full_signature: @Test public void testUpdate()
test_case.identifier: testUpdate
test_case.invocations: nextGaussian update assertEquals getMean assertEquals getStdDev
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testUpdate()
focal_class.declarator: serialVersionUID = -7406184811401750690L
focal_class.modifier: private static final
focal_class.original_string: private static final long serialVersionUID = -7406184811401750690L;
focal_class.type: long
focal_class.var_name: serialVersionUID
focal_class.declarator: count = 0L
focal_class.modifier: private
focal_class.original_string: private long count = 0L;
focal_class.type: long
focal_class.var_name: count
focal_class.declarator: mean = 0.0
focal_class.modifier: private
focal_class.original_string: private double mean = 0.0;
focal_class.type: double
focal_class.var_name: mean
focal_class.declarator: m2 = 0.0
focal_class.modifier: private
focal_class.original_string: private double m2 = 0.0;
focal_class.type: double
focal_class.var_name: m2
focal_class.file: storm/trident-ml/src/main/java/com/github/pmerienne/trident/ml/stats/FixedStreamFeatureStatistics.java
focal_class.identifier: FixedStreamFeatureStatistics
focal_class.interfaces: implements StreamFeatureStatistics, Serializable
focal_class.class_method_signature: FixedStreamFeatureStatistics.update(double feature)
focal_class.full_signature: public void update(double feature)
focal_class.identifier: update
focal_class.modifiers: public
focal_class.parameters: (double feature)
focal_class.return: void
focal_class.signature: void update(double feature)
focal_class.class_method_signature: FixedStreamFeatureStatistics.getCount()
focal_class.full_signature: @Override public Long getCount()
focal_class.identifier: getCount
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: Long
focal_class.signature: Long getCount()
focal_class.class_method_signature: FixedStreamFeatureStatistics.getMean()
focal_class.full_signature: @Override public Double getMean()
focal_class.identifier: getMean
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: Double
focal_class.signature: Double getMean()
focal_class.class_method_signature: FixedStreamFeatureStatistics.getVariance()
focal_class.full_signature: @Override public Double getVariance()
focal_class.identifier: getVariance
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: Double
focal_class.signature: Double getVariance()
focal_class.class_method_signature: FixedStreamFeatureStatistics.getStdDev()
focal_class.full_signature: @Override public Double getStdDev()
focal_class.identifier: getStdDev
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: Double
focal_class.signature: Double getStdDev()
focal_class.class_method_signature: FixedStreamFeatureStatistics.toString()
focal_class.full_signature: @Override public String toString()
focal_class.identifier: toString
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: String
focal_class.signature: String toString()
focal_method.body: public void update(double feature) {
  		this.count = this.count + 1;
  		double delta = feature - this.mean;
  		this.mean = this.mean + delta / this.count;
  		this.m2 = this.m2 + delta * (feature - this.mean);
  	}
focal_method.class_method_signature: FixedStreamFeatureStatistics.update(double feature)
focal_method.full_signature: public void update(double feature)
focal_method.identifier: update
focal_method.modifiers: public
focal_method.parameters: (double feature)
focal_method.return: void
focal_method.signature: void update(double feature)