/** * {@inheritDoc} */ @Override public StandardDeviation copy() { StandardDeviation result = new StandardDeviation(); // No try-catch or advertised exception because args are guaranteed non-null copy(this, result); return result; }
@Override public Number getExpectedValue(int start, int length) { if (length < 2) { return null; } double[] values = new double[length]; for (int i = 0; i < length; i++) { values[i] = start + i; } StandardDeviation stdDev = new StandardDeviation(); return stdDev.evaluate(values); }
@Override public Number getExpectedValue(int start, int length) { if (length < 2) { return null; } double[] values = new double[length]; for (int i = 0; i < length; i++) { values[i] = start + i; } StandardDeviation stdDev = new StandardDeviation(); return stdDev.evaluate(values); }
@Override public Number getExpectedValue(int start, int length) { if (length == 0) { return null; } double[] values = new double[length]; for (int i = 0; i < length; i++) { values[i] = start + i; } StandardDeviation stdDev = new StandardDeviation(false); return stdDev.evaluate(values); }
@Override public Number getExpectedValue(int start, int length) { if (length == 0) { return null; } double[] values = new double[length]; for (int i = 0; i < length; i++) { values[i] = start + i; } StandardDeviation stdDev = new StandardDeviation(false); return stdDev.evaluate(values); }
protected Endpoint(String path, double relativeProb) { Preconditions.checkArgument(relativeProb > 0.0); this.path = path; this.relativeProb = relativeProb; meanTimeNanos = new Mean(); stdevTimeNanos = new StandardDeviation(); }
public Stat(double[] values) { mean = new Mean().evaluate(values); standardDeviation = new StandardDeviation().evaluate(values); median = new Median().evaluate(values); }
vra.searchSolutions(); StandardDeviation dev = new StandardDeviation(); double standardDeviation = dev.evaluate(results); initialThreshold = standardDeviation / 2;
vra.searchSolutions(); StandardDeviation dev = new StandardDeviation(); double standardDeviation = dev.evaluate(results); double initialThreshold = standardDeviation / 2;
@Override public boolean isPrematureBreak(SearchStrategy.DiscoveredSolution discoveredSolution) { if (discoveredSolution.isAccepted()) { lastAccepted = discoveredSolution.getSolution(); solutionValues[currentIteration] = discoveredSolution.getSolution().getCost(); } else { if (lastAccepted != null) { solutionValues[currentIteration] = lastAccepted.getCost(); } else solutionValues[currentIteration] = Integer.MAX_VALUE; } if (currentIteration == (noIterations - 1)) { double mean = StatUtils.mean(solutionValues); double stdDev = new StandardDeviation(true).evaluate(solutionValues, mean); double variationCoefficient = stdDev / mean; if (variationCoefficient < variationCoefficientThreshold) { return true; } } return false; }
public CochranMantelHaenszel(String focalCode, String referenceCode, VariableAttributes groupVariable, VariableAttributes itemVariable, boolean etsDelta){ strata = new TreeMap<Double, CmhTable>(); this.focalCode = focalCode; this.referenceCode = referenceCode; this.groupVariable = groupVariable; this.itemVariable = itemVariable; this.etsDelta = etsDelta; combinedGroupsSd = new StandardDeviation(); focalSd = new StandardDeviation(); referenceSd = new StandardDeviation(); }
/** * {@inheritDoc} */ @Override public StandardDeviation copy() { StandardDeviation result = new StandardDeviation(); // No try-catch or advertised exception because args are guaranteed non-null copy(this, result); return result; }
public PolyserialPlugin(){ r = new PearsonCorrelation(); sdX = new StandardDeviation(); sdY = new StandardDeviation(); freqY = new Frequency(); norm = new NormalDistribution(); }
public double value(){ StandardDeviation sd = new StandardDeviation(); double q3 = pcntl.evaluate(x, 75.0); double q1 = pcntl.evaluate(x, 25.0); double IQR = (q3-q1)/1.34; double s = sd.evaluate(x); double N = (double)x.length; double m = Math.min(s, IQR); return 1.06*m*Math.pow(N, -1.0/5.0)*adjustmentFactor; }
static private Double evaluate(Collection<?> values, boolean biasCorrected){ StandardDeviation statistic = new StandardDeviation(); statistic.setBiasCorrected(biasCorrected); for(Object value : values){ Number number = (Number)TypeUtil.parseOrCast(DataType.DOUBLE, value); statistic.increment(number.doubleValue()); } return statistic.getResult(); } }
static private Double evaluate(Collection<?> values, boolean biasCorrected){ StandardDeviation statistic = new StandardDeviation(); statistic.setBiasCorrected(biasCorrected); for(Object value : values){ Number number = (Number)TypeUtil.parseOrCast(DataType.DOUBLE, value); statistic.increment(number.doubleValue()); } return statistic.getResult(); } }
private static double stdDev(List<Long> data) { double[] asDouble = new double[data.size()]; int i = 0; for (Long l : data) { asDouble[i++] = (double) l; } return new StandardDeviation().evaluate(asDouble); }
public Stat() { min = new Min(); max = new Max(); sum = new Sum(); mean = new Mean(); sd = new StandardDeviation(); stats = new StorelessUnivariateStatistic[] {min, max, sum, mean, sd}; }
static private Double evaluate(Collection<?> values, boolean biasCorrected){ StandardDeviation statistic = new StandardDeviation(); statistic.setBiasCorrected(biasCorrected); for(Object value : values){ Double doubleValue = (Double)TypeUtil.parseOrCast(DataType.DOUBLE, value); statistic.increment(doubleValue); } return statistic.getResult(); } }
private void computeBounds() throws Exception{ StandardDeviation stdev = new StandardDeviation(); this.sd = stdev.evaluate(x); Min min = new Min(); double from = min.evaluate(x); Max max = new Max(); double to = max.evaluate(x); }