Changeset 14290 for trunk/sources/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Classification
- Timestamp:
- 09/19/16 15:27:34 (8 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/ClassificationModel.cs
r14289 r14290 20 20 #endregion 21 21 22 using System; 22 23 using System.Collections.Generic; 23 24 using HeuristicLab.Common; … … 33 34 public string TargetVariable { 34 35 get { return targetVariable; } 35 protected set { targetVariable = value; } 36 set { 37 if (string.IsNullOrEmpty(value) || targetVariable == value) return; 38 targetVariable = value; 39 OnTargetVariableChanged(this, EventArgs.Empty); 40 } 36 41 } 37 42 … … 60 65 public abstract IEnumerable<double> GetEstimatedClassValues(IDataset dataset, IEnumerable<int> rows); 61 66 public abstract IClassificationSolution CreateClassificationSolution(IClassificationProblemData problemData); 67 68 #region events 69 public event EventHandler TargetVariableChanged; 70 private void OnTargetVariableChanged(object sender, EventArgs args) { 71 var changed = TargetVariableChanged; 72 if (changed != null) 73 changed(sender, args); 74 } 75 #endregion 62 76 } 63 77 } -
trunk/sources/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Classification/ClassificationSolutionBase.cs
r14185 r14290 88 88 [StorableHook(HookType.AfterDeserialization)] 89 89 private void AfterDeserialization() { 90 if (string.IsNullOrEmpty(Model.TargetVariable)) 91 Model.TargetVariable = this.ProblemData.TargetVariable; 92 90 93 if (!this.ContainsKey(TrainingNormalizedGiniCoefficientResultName)) 91 94 Add(new Result(TrainingNormalizedGiniCoefficientResultName, "Normalized Gini coefficient of the model on the training partition.", new DoubleValue()));
Note: See TracChangeset
for help on using the changeset viewer.