Changeset 14710 for branches/HeuristicLab.DatastreamAnalysis/HeuristicLab.Problems.DataAnalysis/3.4/Implementation
- Timestamp:
- 03/02/17 14:10:57 (8 years ago)
- 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 25 25 using HeuristicLab.Common; 26 26 using HeuristicLab.Core; 27 using HeuristicLab.Data; 27 28 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable; 28 29 … … 32 33 /// </summary> 33 34 [StorableClass] 34 [Item("R egression 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")] 35 36 [Creatable(CreatableAttribute.Categories.DataAnalysisEnsembles, Priority = 100)] 36 public sealed class R egressionEnsembleModel : RegressionModel, IRegressionEnsembleModel {37 public sealed class RatedRegressionEnsembleModel : RegressionModel, IRegressionEnsembleModel { 37 38 public override IEnumerable<string> VariablesUsedForPrediction { 38 39 get { return models.SelectMany(x => x.VariablesUsedForPrediction).Distinct().OrderBy(x => x); } … … 59 60 get { return modelWeights; } 60 61 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; } 61 86 } 62 87 … … 90 115 91 116 [StorableConstructor] 92 private R egressionEnsembleModel(bool deserializing) : base(deserializing) { }93 private R egressionEnsembleModel(RegressionEnsembleModel original, Cloner cloner)117 private RatedRegressionEnsembleModel(bool deserializing) : base(deserializing) { } 118 private RatedRegressionEnsembleModel(RatedRegressionEnsembleModel original, Cloner cloner) 94 119 : base(original, cloner) { 95 120 this.models = original.Models.Select(cloner.Clone).ToList(); 96 121 this.modelWeights = new List<double>(original.ModelWeights); 122 this.qualityThreshold = cloner.Clone(original.qualityThreshold); 123 this.confidenceThreshold = cloner.Clone(original.confidenceThreshold); 97 124 this.averageModelEstimates = original.averageModelEstimates; 98 125 } 99 126 public override IDeepCloneable Clone(Cloner cloner) { 100 return new R egressionEnsembleModel(this, cloner);101 } 102 103 public R egressionEnsembleModel() : this(Enumerable.Empty<IRegressionModel>()) { }104 public R egressionEnsembleModel(IEnumerable<IRegressionModel> models) : this(models, models.Select(m => 1.0)) { }105 public R egressionEnsembleModel(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) 106 133 : base(string.Empty) { 107 134 this.name = ItemName; -
branches/HeuristicLab.DatastreamAnalysis/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Regression/RegressionEnsembleModel.cs
r14538 r14710 33 33 [StorableClass] 34 34 [Item("Regression Ensemble Model", "A regression model that contains an ensemble of multiple regression models")] 35 [Creatable(CreatableAttribute.Categories.DataAnalysisEnsembles, Priority = 100)]36 35 public sealed class RegressionEnsembleModel : RegressionModel, IRegressionEnsembleModel { 37 36 public override IEnumerable<string> VariablesUsedForPrediction {
Note: See TracChangeset
for help on using the changeset viewer.