Changeset 13097
- Timestamp:
- 11/02/15 21:39:09 (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/ClassificationModelComparison/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Regression/ConstantRegressionModel.cs
r13089 r13097 30 30 namespace HeuristicLab.Problems.DataAnalysis { 31 31 [StorableClass] 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 { 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 { 35 34 [Storable] 36 35 private double constant; … … 60 59 } 61 60 62 public IEnumerable<double> GetEstimatedClassValues(IDataset dataset, IEnumerable<int> rows) {63 return GetEstimatedValues(dataset, rows);64 }65 66 61 public IRegressionSolution CreateRegressionSolution(IRegressionProblemData problemData) { 67 62 return new ConstantRegressionSolution(this, new RegressionProblemData(problemData)); 68 }69 70 public IClassificationSolution CreateClassificationSolution(IClassificationProblemData problemData) {71 return new ConstantClassificationSolution(this, new ClassificationProblemData(problemData));72 63 } 73 64 … … 79 70 public bool ReadOnly { get; private set; } 80 71 public bool Validate(string value, out string errorMessage) { 81 throw new NotSupportedException(); // changing a constant model is not supported72 throw new NotSupportedException(); // changing a constant regression model is not supported 82 73 } 83 74 … … 87 78 88 79 public bool SetValue(string value) { 89 throw new NotSupportedException(); // changing a constant model is not supported80 throw new NotSupportedException(); // changing a constant regression model is not supported 90 81 } 91 82 92 83 public event EventHandler ValueChanged; 93 84 #endregion 94 95 85 } 96 86 }
Note: See TracChangeset
for help on using the changeset viewer.