Package com.github.pmerienne.trident.ml.stats

Examples of com.github.pmerienne.trident.ml.stats.AdaptiveStreamFeatureStatistics


    for (int i = 0; i < size; i++) {
      features[i] = expectedMean + random.nextGaussian() * stdDev;
    }

    // When
    AdaptiveStreamFeatureStatistics statistics = new AdaptiveStreamFeatureStatistics(1000);
    for (int i = 0; i < size; i++) {
      statistics.update(features[i]);
    }

    // Then
    assertEquals(expectedMean, statistics.getMean(), 0.3);
    assertEquals(stdDev, statistics.getStdDev(), 0.3);
  }
View Full Code Here


      double currentMean = Math.min(finalMean, i * step + startMean);
      features[i] = currentMean + random.nextGaussian() * stdDev;
    }

    // When
    AdaptiveStreamFeatureStatistics statistics = new AdaptiveStreamFeatureStatistics(1000);
    for (int i = 0; i < size; i++) {
      statistics.update(features[i]);
    }

    // Then
    assertEquals(finalMean, statistics.getMean(), 0.35);
    assertEquals(stdDev, statistics.getStdDev(), 0.35);
  }
View Full Code Here

      double currentStdDev = i * step + startStdDev;
      features[i] = expectedMean + random.nextGaussian() * currentStdDev;
    }

    // When
    AdaptiveStreamFeatureStatistics statistics = new AdaptiveStreamFeatureStatistics(1000);
    for (int i = 0; i < size; i++) {
      statistics.update(features[i]);
    }

    // Then
    assertEquals(expectedMean, statistics.getMean(), 0.3);
    assertEquals(finalStdDev, statistics.getStdDev(), 0.3);
  }
View Full Code Here

TOP

Related Classes of com.github.pmerienne.trident.ml.stats.AdaptiveStreamFeatureStatistics

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.