Changeset 13089 for branches/ClassificationModelComparison/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Regression/ConstantRegressionModel.cs
- Timestamp:
- 10/29/15 19:48:17 (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/ClassificationModelComparison/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Regression/ConstantRegressionModel.cs
r13083 r13089 30 30 namespace HeuristicLab.Problems.DataAnalysis { 31 31 [StorableClass] 32 [Item("Constant Regression Model", "A model that always returns the same constant value regardless of the presented input data.")] 33 public class ConstantRegressionModel : NamedItem, IRegressionModel, IStringConvertibleValue { 32 [Item("Constant Model", "A model that always returns the same constant value regardless of the presented input data.")] 33 // TODO this class should be renamed, since it is also used to handle the classification case now 34 public class ConstantRegressionModel : NamedItem, IRegressionModel, IClassificationModel, IStringConvertibleValue { 34 35 [Storable] 35 36 private double constant; … … 59 60 } 60 61 62 public IEnumerable<double> GetEstimatedClassValues(IDataset dataset, IEnumerable<int> rows) { 63 return GetEstimatedValues(dataset, rows); 64 } 65 61 66 public IRegressionSolution CreateRegressionSolution(IRegressionProblemData problemData) { 62 67 return new ConstantRegressionSolution(this, new RegressionProblemData(problemData)); 68 } 69 70 public IClassificationSolution CreateClassificationSolution(IClassificationProblemData problemData) { 71 return new ConstantClassificationSolution(this, new ClassificationProblemData(problemData)); 63 72 } 64 73 … … 70 79 public bool ReadOnly { get; private set; } 71 80 public bool Validate(string value, out string errorMessage) { 72 throw new NotSupportedException(); // changing a constant regressionmodel is not supported81 throw new NotSupportedException(); // changing a constant model is not supported 73 82 } 74 83 … … 78 87 79 88 public bool SetValue(string value) { 80 throw new NotSupportedException(); // changing a constant regressionmodel is not supported89 throw new NotSupportedException(); // changing a constant model is not supported 81 90 } 82 91 83 92 public event EventHandler ValueChanged; 84 93 #endregion 94 85 95 } 86 96 }
Note: See TracChangeset
for help on using the changeset viewer.