Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
05/20/11 16:10:07 (13 years ago)
Author:
gkronber
Message:

#1450: implemented support for ensemble solutions for classification.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Regression/RegressionEnsembleSolution.cs

    r6238 r6239  
    4949    protected RegressionEnsembleSolution(RegressionEnsembleSolution original, Cloner cloner)
    5050      : base(original, cloner) {
     51      trainingPartitions = new Dictionary<IRegressionModel, IntRange>();
     52      testPartitions = new Dictionary<IRegressionModel, IntRange>();
     53      foreach (var model in Model.Models) {
     54        trainingPartitions[model] = (IntRange)ProblemData.TrainingPartition.Clone();
     55        testPartitions[model] = (IntRange)ProblemData.TestPartition.Clone();
     56      }
    5157    }
     58
    5259    public RegressionEnsembleSolution(IEnumerable<IRegressionModel> models, IRegressionProblemData problemData)
    5360      : base(new RegressionEnsembleModel(models), new RegressionEnsembleProblemData(problemData)) {
     
    141148    private double AggregateEstimatedValues(IEnumerable<double> estimatedValues) {
    142149      return estimatedValues.DefaultIfEmpty(double.NaN).Average();
    143     }
    144 
    145     //[Storable]
    146     //private string name;
    147     //public string Name {
    148     //  get {
    149     //    return name;
    150     //  }
    151     //  set {
    152     //    if (value != null && value != name) {
    153     //      var cancelEventArgs = new CancelEventArgs<string>(value);
    154     //      OnNameChanging(cancelEventArgs);
    155     //      if (cancelEventArgs.Cancel == false) {
    156     //        name = value;
    157     //        OnNamedChanged(EventArgs.Empty);
    158     //      }
    159     //    }
    160     //  }
    161     //}
    162 
    163     //public bool CanChangeName {
    164     //  get { return true; }
    165     //}
    166 
    167     //[Storable]
    168     //private string description;
    169     //public string Description {
    170     //  get {
    171     //    return description;
    172     //  }
    173     //  set {
    174     //    if (value != null && value != description) {
    175     //      description = value;
    176     //      OnDescriptionChanged(EventArgs.Empty);
    177     //    }
    178     //  }
    179     //}
    180 
    181     //public bool CanChangeDescription {
    182     //  get { return true; }
    183     //}
    184 
    185     //#region events
    186     //public event EventHandler<CancelEventArgs<string>> NameChanging;
    187     //private void OnNameChanging(CancelEventArgs<string> cancelEventArgs) {
    188     //  var listener = NameChanging;
    189     //  if (listener != null) listener(this, cancelEventArgs);
    190     //}
    191 
    192     //public event EventHandler NameChanged;
    193     //private void OnNamedChanged(EventArgs e) {
    194     //  var listener = NameChanged;
    195     //  if (listener != null) listener(this, e);
    196     //}
    197 
    198     //public event EventHandler DescriptionChanged;
    199     //private void OnDescriptionChanged(EventArgs e) {
    200     //  var listener = DescriptionChanged;
    201     //  if (listener != null) listener(this, e);
    202     //}
    203     // #endregion
     150    }   
    204151  }
    205152}
Note: See TracChangeset for help on using the changeset viewer.