Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
05/15/12 19:09:09 (13 years ago)
Author:
gkronber
Message:

#1847 added operator for replacing branches with semantically similar branches

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/GP-MoveOperators/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Regression/RegressionEnsembleSolution.cs

    r7738 r7832  
    218218
    219219    private double AggregateEstimatedValues(IEnumerable<double> estimatedValues) {
    220       return estimatedValues.DefaultIfEmpty(double.NaN).Average();
     220      // return trimean
     221      var orderdValues = estimatedValues
     222        .Where(x => !double.IsNaN(x))
     223        .DefaultIfEmpty(0.0)
     224        .OrderBy(x => x)
     225        .ToArray();
     226      return (orderdValues[(int)Math.Floor(orderdValues.Length * 0.25)] +
     227              orderdValues[(int)Math.Floor(orderdValues.Length * 0.75)]) / 2.0;
    221228    }
    222229    #endregion
Note: See TracChangeset for help on using the changeset viewer.