public Builder() { this.item = new Estimate(); }
public Builder withEstimate(Estimate value) { this.item.lowerBound = value.getLowerBound(); this.item.upperBound = value.getUpperBound(); this.item.estimate = value.getEstimate(); return this; }
@Override public ActionRate clone() { return (ActionRate) super.clone(); }
private void computeClearComparisonWinner(BucketStatistics bucket, BucketStatistics otherBucket, Estimate rateDifference, ComparisonStatistics jointComparison) { if (rateDifference.getEstimate() > 0 && rateDifference.getLowerBound() > 0) { jointComparison.setClearComparisonWinner(bucket.getLabel()); } else if (rateDifference.getEstimate() < 0 && rateDifference.getUpperBound() < 0) { jointComparison.setClearComparisonWinner(otherBucket.getLabel()); } else { jointComparison.setClearComparisonWinner(null); } }
@Override public AbstractContainerStatistics clone() { AbstractContainerStatistics cloned = (AbstractContainerStatistics) super.clone(); if (jointActionRate != null) { cloned.setJointActionRate(jointActionRate.clone()); } if (actionRates != null) { Map<Event.Name, ActionRate> clonedActions = new HashMap<>(); for (Entry<Name, ActionRate> entry : actionRates.entrySet()) { clonedActions.put(entry.getKey(), entry.getValue().clone()); } cloned.setActionRates(clonedActions); } return cloned; } }
b.setActionRate(bucketStat.getJointActionRate().getEstimate()); b.setLowerBound(bucketStat.getJointActionRate().getLowerBound()); b.setUpperBound(bucketStat.getJointActionRate().getUpperBound());
LOGGER.warn("BinomialMetric.estimateRateDifference called with invalid arguments by AnalyticsService.generateBucketComparisons: ", iae); rateDifference = new Estimate(NaN, NaN, NaN); } catch (IllegalArgumentException iae) { LOGGER.warn("BinomialMetric.estimateRateDifference called with invalid arguments by AnalyticsService.generateBucketComparisons: ", iae); rateDifference = new Estimate(NaN, NaN, NaN);
@Override public ComparisonStatistics clone() { ComparisonStatistics cloned; try { cloned = (ComparisonStatistics) super.clone(); } catch (CloneNotSupportedException e) { // Should never happen throw new AnalyticsException("ComparisonStatistics clone not supported: " + e.getMessage(), e); } if (actionRateDifference != null) { cloned.setActionRateDifference(actionRateDifference.clone()); } if (smallestDistinguishableEffectSize != null) { cloned.setSmallestDistinguishableEffectSize(smallestDistinguishableEffectSize.clone()); } return cloned; }