/** * {@inheritDoc} */ @Override public Max copy() { Max result = new Max(); // No try-catch or advertised exception because args are non-null copy(this, result); return result; }
/** * Construct a MultivariateSummaryStatistics instance * @param k dimension of the data * @param isCovarianceBiasCorrected if true, the unbiased sample * covariance is computed, otherwise the biased population covariance * is computed */ public MultivariateSummaryStatistics(int k, boolean isCovarianceBiasCorrected) { this.k = k; sumImpl = new StorelessUnivariateStatistic[k]; sumSqImpl = new StorelessUnivariateStatistic[k]; minImpl = new StorelessUnivariateStatistic[k]; maxImpl = new StorelessUnivariateStatistic[k]; sumLogImpl = new StorelessUnivariateStatistic[k]; geoMeanImpl = new StorelessUnivariateStatistic[k]; meanImpl = new StorelessUnivariateStatistic[k]; for (int i = 0; i < k; ++i) { sumImpl[i] = new Sum(); sumSqImpl[i] = new SumOfSquares(); minImpl[i] = new Min(); maxImpl[i] = new Max(); sumLogImpl[i] = new SumOfLogs(); geoMeanImpl[i] = new GeometricMean(); meanImpl[i] = new Mean(); } covarianceImpl = new VectorialCovariance(k, isCovarianceBiasCorrected); }
@Override public Max createStatistic(){ return new Max(); } };
private Max _getMax() { if (this.max == null) { this.max = new Max(); } return this.max; }
public CumulativeMax() { super(new org.apache.commons.math3.stat.descriptive.rank.Max(), Double.MIN_VALUE); } }
public Max() { super(new org.apache.commons.math3.stat.descriptive.rank.Max()); } }
public CumulativeMax() { super(new org.apache.commons.math3.stat.descriptive.rank.Max(), Double.MIN_VALUE); } }
public Max() { super(new org.apache.commons.math3.stat.descriptive.rank.Max()); } }
/** * {@inheritDoc} */ @Override public Max copy() { Max result = new Max(); // No try-catch or advertised exception because args are non-null copy(this, result); return result; }
/** * {@inheritDoc} */ @Override public Max copy() { Max result = new Max(); // No try-catch or advertised exception because args are non-null copy(this, result); return result; }
/** * Creates the object and instantiates the min and max objects. */ public AbstractBinCalculation(){ min = new Min(); max = new Max(); }
public void clearCategory(){ this.categoryMap.clear(); this.scoreLevels.clear(); this.categoryMap.clear(); maximumPossibleScore = new Max(); minimumPossibleScore = new Min(); }
private void initQueue(double[] vehicleCounts) { int queueCapacity = (int)new Max().evaluate(vehicleCounts) + 1; activeVehicles = new PriorityQueue<>(queueCapacity, Vehicles.T1_COMPARATOR); }
public RunningStatistics() { this.mean = new Mean(); this.min = new Min(); this.max = new Max(); }
public DefaultItemScoring(boolean isContinuous){ this.isContinuous = isContinuous; categoryMap = new TreeMap<Object, Category>(new ItemResponseComparator()); maximumPossibleScore = new Max(); minimumPossibleScore = new Min(); specialDataCodes = new SpecialDataCodes(); scoreLevels = new TreeSet<Double>(); variableName = new VariableName("");//To be consistent with past usage of this class. }
public void initialize() { aggregatorSubjectType = SubjectTypeUtils.getSubjectTypeByProviderAndLabel(subject.getProvider(), subject.getSubjectType()); // Initialise aggregators aggregators = new HashMap<>(); aggregators.put(AggregationFunction.sum, new Sum()); aggregators.put(AggregationFunction.mean, new Mean()); aggregators.put(AggregationFunction.max, new Max()); aggregators.put(AggregationFunction.min, new Min()); try { this.aggregator = aggregators.get(this.function); this.singleValueField = (SingleValueField) field.toField(); singleValueField.setFieldCache(fieldCache); } catch (NullPointerException e) { throw new IllegalArgumentException("Function not supported. Supporting {sum, mean, max, min}"); } catch (ClassNotFoundException e) { throw new IllegalArgumentException("Field class not found.", e); } catch (ClassCastException e){ throw new IllegalArgumentException("Field must be SingleValueField"); } }
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}; }
/** * Construct the object using the supplied arrays of points and weights. * * @param points discrete real points * @param weights weights for the points */ public ContinuousQuadratureRule(double[] points, double[] weights){ Min min = new Min(); Max max = new Max(); this.numberOfPoints = points.length; this.min = min.evaluate(points); this.max = max.evaluate(points); //Enforce that min <= max if(this.min>this.max){ double temp = this.min; this.min = this.max; this.max = temp; } range = this.max-this.min; step = range/((double)numberOfPoints - 1.0); this.points = points; this.weights = weights; }
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); }
/** * Construct a MultivariateSummaryStatistics instance * @param k dimension of the data * @param isCovarianceBiasCorrected if true, the unbiased sample * covariance is computed, otherwise the biased population covariance * is computed */ public MultivariateSummaryStatistics(int k, boolean isCovarianceBiasCorrected) { this.k = k; sumImpl = new StorelessUnivariateStatistic[k]; sumSqImpl = new StorelessUnivariateStatistic[k]; minImpl = new StorelessUnivariateStatistic[k]; maxImpl = new StorelessUnivariateStatistic[k]; sumLogImpl = new StorelessUnivariateStatistic[k]; geoMeanImpl = new StorelessUnivariateStatistic[k]; meanImpl = new StorelessUnivariateStatistic[k]; for (int i = 0; i < k; ++i) { sumImpl[i] = new Sum(); sumSqImpl[i] = new SumOfSquares(); minImpl[i] = new Min(); maxImpl[i] = new Max(); sumLogImpl[i] = new SumOfLogs(); geoMeanImpl[i] = new GeometricMean(); meanImpl[i] = new Mean(); } covarianceImpl = new VectorialCovariance(k, isCovarianceBiasCorrected); }