Changeset 5664 for branches/DataAnalysis Refactoring/HeuristicLab.Problems.DataAnalysis.Views/3.4/Classification/DiscriminantFunctionClassificationRocCurvesView.cs
- Timestamp:
- 03/10/11 16:27:48 (14 years ago)
- File:
-
- 1 copied
Legend:
- Unmodified
- Added
- Removed
-
branches/DataAnalysis Refactoring/HeuristicLab.Problems.DataAnalysis.Views/3.4/Classification/DiscriminantFunctionClassificationRocCurvesView.cs
r5642 r5664 31 31 using HeuristicLab.MainForm.WindowsForms; 32 32 namespace HeuristicLab.Problems.DataAnalysis.Classification.Views { 33 [View(" ROC Curves View")]34 [Content(typeof( SymbolicClassificationSolution))]35 public partial class RocCurvesView : AsynchronousContentView {33 [View("Discriminant function classification solution ROC curves view")] 34 [Content(typeof(IDiscriminantFunctionClassificationSolution))] 35 public partial class DiscriminantFunctionClassificationRocCurvesView : AsynchronousContentView { 36 36 private const string xAxisTitle = "False Positive Rate"; 37 37 private const string yAxisTitle = "True Positive Rate"; … … 40 40 private Dictionary<string, List<ROCPoint>> cachedRocPoints; 41 41 42 public RocCurvesView() {42 public DiscriminantFunctionClassificationRocCurvesView() { 43 43 InitializeComponent(); 44 44 … … 61 61 } 62 62 63 public new SymbolicClassificationSolution Content {64 get { return ( SymbolicClassificationSolution)base.Content; }63 public new IDiscriminantFunctionClassificationSolution Content { 64 get { return (IDiscriminantFunctionClassificationSolution)base.Content; } 65 65 set { base.Content = value; } 66 66 } … … 68 68 protected override void RegisterContentEvents() { 69 69 base.RegisterContentEvents(); 70 Content. EstimatedValuesChanged += new EventHandler(Content_EstimatedValuesChanged);70 Content.ModelChanged += new EventHandler(Content_ModelChanged); 71 71 Content.ProblemDataChanged += new EventHandler(Content_ProblemDataChanged); 72 72 } 73 73 protected override void DeregisterContentEvents() { 74 74 base.DeregisterContentEvents(); 75 Content. EstimatedValuesChanged -= new EventHandler(Content_EstimatedValuesChanged);75 Content.ModelChanged -= new EventHandler(Content_ModelChanged); 76 76 Content.ProblemDataChanged -= new EventHandler(Content_ProblemDataChanged); 77 77 } 78 78 79 private void Content_ EstimatedValuesChanged(object sender, EventArgs e) {79 private void Content_ModelChanged(object sender, EventArgs e) { 80 80 UpdateChart(); 81 81 } … … 107 107 108 108 double[] estimatedValues = Content.GetEstimatedValues(rows).ToArray(); 109 double[] targetClassValues = Content.ProblemData.Dataset.GetEnumeratedVariableValues(Content.ProblemData.TargetVariable .Value, rows).ToArray();109 double[] targetClassValues = Content.ProblemData.Dataset.GetEnumeratedVariableValues(Content.ProblemData.TargetVariable, rows).ToArray(); 110 110 double minThreshold = estimatedValues.Min(); 111 111 double maxThreshold = estimatedValues.Max(); … … 114 114 maxThreshold += thresholdIncrement; 115 115 116 List<double> classValues = Content.ProblemData. SortedClassValues.ToList();116 List<double> classValues = Content.ProblemData.ClassValues.OrderBy(x => x).ToList(); 117 117 118 118 foreach (double classValue in classValues) {
Note: See TracChangeset
for help on using the changeset viewer.