Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
03/02/17 14:10:57 (8 years ago)
Author:
jzenisek
Message:

#2719 implemented ensemble model rating by introducing the new type RatedEnsembleModel; introduced performance indicator calculation in results;

Location:
branches/HeuristicLab.DatastreamAnalysis/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Regression
Files:
1 edited
1 copied

Legend:

Unmodified
Added
Removed
  • branches/HeuristicLab.DatastreamAnalysis/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Regression/RatedRegressionEnsembleModel.cs

    r14538 r14710  
    2525using HeuristicLab.Common;
    2626using HeuristicLab.Core;
     27using HeuristicLab.Data;
    2728using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
    2829
     
    3233  /// </summary>
    3334  [StorableClass]
    34   [Item("Regression Ensemble Model", "A regression model that contains an ensemble of multiple regression models")]
     35  [Item("Rated Regression Ensemble Model", "A regression model that contains an ensemble of multiple regression models")]
    3536  [Creatable(CreatableAttribute.Categories.DataAnalysisEnsembles, Priority = 100)]
    36   public sealed class RegressionEnsembleModel : RegressionModel, IRegressionEnsembleModel {
     37  public sealed class RatedRegressionEnsembleModel : RegressionModel, IRegressionEnsembleModel {
    3738    public override IEnumerable<string> VariablesUsedForPrediction {
    3839      get { return models.SelectMany(x => x.VariablesUsedForPrediction).Distinct().OrderBy(x => x); }
     
    5960      get { return modelWeights; }
    6061      set { modelWeights = value.ToList(); }
     62    }
     63
     64    private DoubleRange qualityThreshold;
     65    public DoubleRange QualityThreshold {
     66      get { return qualityThreshold; }     
     67      set { qualityThreshold = value; }
     68    }
     69    [Storable(Name = "QualityThreshold")]
     70    private DoubleRange StorableQualityThreshold {
     71      get { return qualityThreshold; }
     72      set { qualityThreshold = value; }
     73    }
     74
     75    private DoubleRange confidenceThreshold;
     76    public DoubleRange ConfidenceThreshold
     77    {
     78      get { return confidenceThreshold; }
     79      set { confidenceThreshold = value; }
     80    }
     81    [Storable(Name = "QualityThreshold")]
     82    private DoubleRange StorableConfidenceThreshold
     83    {
     84      get { return confidenceThreshold; }
     85      set { confidenceThreshold = value; }
    6186    }
    6287
     
    90115
    91116    [StorableConstructor]
    92     private RegressionEnsembleModel(bool deserializing) : base(deserializing) { }
    93     private RegressionEnsembleModel(RegressionEnsembleModel original, Cloner cloner)
     117    private RatedRegressionEnsembleModel(bool deserializing) : base(deserializing) { }
     118    private RatedRegressionEnsembleModel(RatedRegressionEnsembleModel original, Cloner cloner)
    94119      : base(original, cloner) {
    95120      this.models = original.Models.Select(cloner.Clone).ToList();
    96121      this.modelWeights = new List<double>(original.ModelWeights);
     122      this.qualityThreshold = cloner.Clone(original.qualityThreshold);
     123      this.confidenceThreshold = cloner.Clone(original.confidenceThreshold);
    97124      this.averageModelEstimates = original.averageModelEstimates;
    98125    }
    99126    public override IDeepCloneable Clone(Cloner cloner) {
    100       return new RegressionEnsembleModel(this, cloner);
    101     }
    102 
    103     public RegressionEnsembleModel() : this(Enumerable.Empty<IRegressionModel>()) { }
    104     public RegressionEnsembleModel(IEnumerable<IRegressionModel> models) : this(models, models.Select(m => 1.0)) { }
    105     public RegressionEnsembleModel(IEnumerable<IRegressionModel> models, IEnumerable<double> modelWeights)
     127      return new RatedRegressionEnsembleModel(this, cloner);
     128    }
     129
     130    public RatedRegressionEnsembleModel() : this(Enumerable.Empty<IRegressionModel>()) { }
     131    public RatedRegressionEnsembleModel(IEnumerable<IRegressionModel> models) : this(models, models.Select(m => 1.0)) { }
     132    public RatedRegressionEnsembleModel(IEnumerable<IRegressionModel> models, IEnumerable<double> modelWeights)
    106133      : base(string.Empty) {
    107134      this.name = ItemName;
  • branches/HeuristicLab.DatastreamAnalysis/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Regression/RegressionEnsembleModel.cs

    r14538 r14710  
    3333  [StorableClass]
    3434  [Item("Regression Ensemble Model", "A regression model that contains an ensemble of multiple regression models")]
    35   [Creatable(CreatableAttribute.Categories.DataAnalysisEnsembles, Priority = 100)]
    3635  public sealed class RegressionEnsembleModel : RegressionModel, IRegressionEnsembleModel {
    3736    public override IEnumerable<string> VariablesUsedForPrediction {
Note: See TracChangeset for help on using the changeset viewer.