protected override void Context() { base.Context(); _statistic = new PercentileStatisticalAggregation(); _statisticalAnalysis = new PopulationStatisticalAnalysis(); _statisticalAnalysis.AddStatistic(_statistic); }
private IReadOnlyList <TimeProfileYValue> getResultsFor(StatisticalAggregation statisticalAggregation, FloatMatrix quantityResults) { var curveValues = _statisticalDataCalculator.StatisticalDataFor(quantityResults, statisticalAggregation).ToList(); //line curve if (curveValues.Count == 1) { return(timeProfilePointValues(curveValues[0])); } //range if (curveValues.Count == 2) { return(timeProfileRangeValues(curveValues[0], curveValues[1])); } return(new List <TimeProfileYValue>()); }
public string DisplayNameFor(StatisticalAggregation statisticalAggregation) { return(DisplayNameFor(RepresentationObjectType.CURVE_SELECTION, statisticalAggregation.Id)); }
private RepositoryItem editRepository(StatisticalAggregation statisticalAggregation) => new RepositoryItemTextEdit { NullText = _presenter.DisplayNameFor(statisticalAggregation) };
public IEnumerable <float[]> StatisticalDataFor(FloatMatrix sortedResults, StatisticalAggregation statisticalAggregation) { var percentileSelection = statisticalAggregation as PercentileStatisticalAggregation; if (percentileSelection != null) { yield return(calculatePercentileFor(percentileSelection.Percentile, sortedResults)); yield break; } var methodSelection = statisticalAggregation.DowncastTo <PredefinedStatisticalAggregation>(); switch (methodSelection.Method) { case StatisticalAggregationType.ArithmeticMean: yield return(calculateArithmeticMeanFor(sortedResults)); break; case StatisticalAggregationType.ArithmeticStandardDeviation: var aritMean = calculateArithmeticMeanFor(sortedResults); var aritStd = calculateArithmeticStandardDeviationFor(sortedResults); yield return(calculateLowerArithmeticStandardDeviationFor(aritMean, aritStd)); yield return(calculateUpperArithmeticStandardDeviationFor(aritMean, aritStd)); break; case StatisticalAggregationType.GeometricMean: yield return(calculateGeometricMeanFor(sortedResults)); break; case StatisticalAggregationType.Range90: yield return(calculatePercentileFor(5f, sortedResults)); yield return(calculatePercentileFor(95f, sortedResults)); break; case StatisticalAggregationType.Range95: yield return(calculatePercentileFor(2.5f, sortedResults)); yield return(calculatePercentileFor(97.5f, sortedResults)); break; case StatisticalAggregationType.GeometricStandardDeviation: var geoMean = calculateGeometricMeanFor(sortedResults); var geoStd = calculateGeometricStandardDeviationFor(sortedResults); yield return(calculateLowerGeometricStandardDeviationFor(geoMean, geoStd)); yield return(calculateUpperGeometricStandardDeviationFor(geoMean, geoStd)); break; case StatisticalAggregationType.Min: yield return(calculateMinFor(sortedResults)); break; case StatisticalAggregationType.Max: yield return(calculateMaxFor(sortedResults)); break; case StatisticalAggregationType.Median: yield return(calculateMedianFor(sortedResults)); break; default: break; } }
public string DisplayNameFor(StatisticalAggregation statisticalAggregation) { return(statisticalAggregation.Id); }
public string DisplayNameFor(StatisticalAggregation statisticalAggregation) { return(_representationInfoRepository.DisplayNameFor(statisticalAggregation)); }
private RepositoryItem editRepository(StatisticalAggregation statisticalAggregation) { _editRepository.NullText = _presenter.DisplayNameFor(statisticalAggregation); return(_editRepository); }