Changeset 8679 for trunk/sources/HeuristicLab.Problems.DataAnalysis
- Timestamp:
- 09/21/12 18:48:12 (12 years ago)
- Location:
- trunk/sources/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Classification
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Classification/DiscriminantFunctionClassificationModel.cs
r8623 r8679 33 33 [StorableClass] 34 34 [Item("DiscriminantFunctionClassificationModel", "Represents a classification model that uses a discriminant function and classification thresholds.")] 35 public abstractclass DiscriminantFunctionClassificationModel : NamedItem, IDiscriminantFunctionClassificationModel {35 public class DiscriminantFunctionClassificationModel : NamedItem, IDiscriminantFunctionClassificationModel { 36 36 [Storable] 37 37 private IRegressionModel model; 38 public IRegressionModel Model { 39 get { return model; } 40 private set { model = value; } 41 } 38 42 39 43 [Storable] … … 83 87 } 84 88 89 public override IDeepCloneable Clone(Cloner cloner) { 90 return new DiscriminantFunctionClassificationModel(this, cloner); 91 } 92 85 93 public void SetThresholdsAndClassValues(IEnumerable<double> thresholds, IEnumerable<double> classValues) { 86 94 var classValuesArr = classValues.ToArray(); … … 127 135 #endregion 128 136 129 public abstract IDiscriminantFunctionClassificationSolution CreateDiscriminantFunctionClassificationSolution(IClassificationProblemData problemData); 130 public abstract IClassificationSolution CreateClassificationSolution(IClassificationProblemData problemData); 137 public virtual IDiscriminantFunctionClassificationSolution CreateDiscriminantFunctionClassificationSolution(IClassificationProblemData problemData) { 138 return new DiscriminantFunctionClassificationSolution(this, problemData); 139 } 140 141 public virtual IClassificationSolution CreateClassificationSolution(IClassificationProblemData problemData) { 142 return CreateDiscriminantFunctionClassificationSolution(problemData); 143 } 131 144 } 132 145 } -
trunk/sources/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Classification/DiscriminantFunctionClassificationSolution.cs
r8531 r8679 32 32 [StorableClass] 33 33 [Item("DiscriminantFunctionClassificationSolution", "Represents a classification solution that uses a discriminant function and classification thresholds.")] 34 public abstractclass DiscriminantFunctionClassificationSolution : DiscriminantFunctionClassificationSolutionBase {34 public class DiscriminantFunctionClassificationSolution : DiscriminantFunctionClassificationSolutionBase { 35 35 protected readonly Dictionary<int, double> valueEvaluationCache; 36 36 protected readonly Dictionary<int, double> classValueEvaluationCache; … … 47 47 classValueEvaluationCache = new Dictionary<int, double>(original.classValueEvaluationCache); 48 48 } 49 p rotectedDiscriminantFunctionClassificationSolution(IDiscriminantFunctionClassificationModel model, IClassificationProblemData problemData)49 public DiscriminantFunctionClassificationSolution(IDiscriminantFunctionClassificationModel model, IClassificationProblemData problemData) 50 50 : base(model, problemData) { 51 51 valueEvaluationCache = new Dictionary<int, double>(); 52 52 classValueEvaluationCache = new Dictionary<int, double>(); 53 RecalculateResults(); 53 54 } 54 55 … … 112 113 base.OnProblemDataChanged(); 113 114 } 115 116 protected override void RecalculateResults() { 117 CalculateResults(); 118 CalculateRegressionResults(); 119 } 114 120 } 115 121 }
Note: See TracChangeset
for help on using the changeset viewer.