Changeset 12117 for trunk/sources
- Timestamp:
- 03/04/15 10:17:08 (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Analysis.Statistics.Views/3.3/ChartAnalysisView.cs
r12112 r12117 291 291 double percentile25 = values.Percentile(0.25); 292 292 double percentile75 = values.Percentile(0.75); 293 double lowerAvg = values. OrderBy(x => x).Take((int)(values.Count() * 0.25)).Average();294 double upperAvg = values. OrderByDescending(x => x).Take((int)(values.Count() * 0.25)).Average();295 double firstAvg = values. Take((int)(values.Count() * 0.25)).Average();296 double lastAvg = values. Skip((int)(values.Count() * 0.75)).Average();293 double lowerAvg = values.Count() > 4 ? values.OrderBy(x => x).Take((int)(values.Count() * 0.25)).Average() : double.NaN; 294 double upperAvg = values.Count() > 4 ? values.OrderByDescending(x => x).Take((int)(values.Count() * 0.25)).Average() : double.NaN; 295 double firstAvg = values.Count() > 4 ? values.Take((int)(values.Count() * 0.25)).Average() : double.NaN; 296 double lastAvg = values.Count() > 4 ? values.Skip((int)(values.Count() * 0.75)).Average() : double.NaN; 297 297 double slope, intercept, r; 298 298 llsFitting.Calculate(values, out slope, out intercept);
Note: See TracChangeset
for help on using the changeset viewer.