Changeset 16788 for trunk/HeuristicLab.Problems.DataAnalysis
- Timestamp:
- 04/16/19 11:43:52 (6 years ago)
- Location:
- trunk/HeuristicLab.Problems.DataAnalysis
- Files:
-
- 5 edited
- 1 copied
Legend:
- Unmodified
- Added
- Removed
-
trunk/HeuristicLab.Problems.DataAnalysis
- Property svn:mergeinfo changed
/branches/SensitivityEvaluator/HeuristicLab.Problems.DataAnalysis (added) merged: 12212-12213,12416,12448-12449,13401
- Property svn:mergeinfo changed
-
trunk/HeuristicLab.Problems.DataAnalysis/3.4
- Property svn:mergeinfo changed
/branches/SensitivityEvaluator/HeuristicLab.Problems.DataAnalysis/3.4 (added) merged: 12213,12416,12448-12449,13401
- Property svn:mergeinfo changed
-
trunk/HeuristicLab.Problems.DataAnalysis/3.4/HeuristicLab.Problems.DataAnalysis-3.4.csproj
r16658 r16788 244 244 <Compile Include="OnlineCalculators\OnlineTheilsUStatisticCalculator.cs" /> 245 245 <Compile Include="OnlineCalculators\OnlineWeightedDirectionalSymmetryCalculator.cs" /> 246 <Compile Include="OnlineCalculators\OnlineWeightedClassificationMeanSquaredErrorCalculator.cs" /> 246 247 <Compile Include="Plugin.cs" /> 247 248 <Compile Include="Implementation\Classification\ThresholdCalculators\AccuracyMaximizationThresholdCalculator.cs" /> -
trunk/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Classification/DiscriminantFunctionClassificationModel.cs
r16565 r16788 23 23 using System.Collections.Generic; 24 24 using System.Linq; 25 using HEAL.Attic; 25 26 using HeuristicLab.Common; 26 27 using HeuristicLab.Core; 27 using HEAL.Attic;28 28 29 29 namespace HeuristicLab.Problems.DataAnalysis { … … 121 121 122 122 public override IEnumerable<double> GetEstimatedClassValues(IDataset dataset, IEnumerable<int> rows) { 123 var estimatedValues = GetEstimatedValues(dataset, rows); 124 return GetEstimatedClassValues(estimatedValues); 125 } 126 127 public virtual IEnumerable<double> GetEstimatedClassValues(IEnumerable<double> estimatedValues) { 123 128 if (!Thresholds.Any() && !ClassValues.Any()) throw new ArgumentException("No thresholds and class values were set for the current classification model."); 124 foreach (var x in GetEstimatedValues(dataset, rows)) {129 foreach (var x in estimatedValues) { 125 130 int classIndex = 0; 126 131 // find first threshold value which is larger than x => class index = threshold index + 1 … … 132 137 } 133 138 } 139 134 140 #region events 135 141 public event EventHandler ThresholdsChanged; -
trunk/HeuristicLab.Problems.DataAnalysis/3.4/Interfaces/Classification/IDiscriminantFunctionClassificationModel.cs
r16565 r16788 34 34 void SetThresholdsAndClassValues(IEnumerable<double> thresholds, IEnumerable<double> classValues); 35 35 IEnumerable<double> GetEstimatedValues(IDataset dataset, IEnumerable<int> rows); 36 IEnumerable<double> GetEstimatedClassValues(IEnumerable<double> estimatedValues); 36 37 37 38 event EventHandler ThresholdsChanged; -
trunk/HeuristicLab.Problems.DataAnalysis/3.4/OnlineCalculators/OnlineWeightedClassificationMeanSquaredErrorCalculator.cs
r16784 r16788 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 5Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2019 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. … … 25 25 26 26 namespace HeuristicLab.Problems.DataAnalysis { 27 public class OnlineWeighted ResidualsMeanSquaredErrorCalculator : IOnlineCalculator {27 public class OnlineWeightedClassificationMeanSquaredErrorCalculator : IOnlineCalculator { 28 28 29 29 private double sse; … … 42 42 public double NegativeClassesResidualsWeight { get; private set; } 43 43 44 public OnlineWeighted ResidualsMeanSquaredErrorCalculator(double positiveClassValue, double classValuesMax, double classValuesMin,44 public OnlineWeightedClassificationMeanSquaredErrorCalculator(double positiveClassValue, double classValuesMax, double classValuesMin, 45 45 double definiteResidualsWeight, double positiveClassResidualsWeight, double negativeClassesResidualsWeight) { 46 46 PositiveClassValue = positiveClassValue; … … 93 93 IEnumerator<double> originalEnumerator = originalValues.GetEnumerator(); 94 94 IEnumerator<double> estimatedEnumerator = estimatedValues.GetEnumerator(); 95 OnlineWeighted ResidualsMeanSquaredErrorCalculator calculator = new OnlineWeightedResidualsMeanSquaredErrorCalculator(positiveClassValue, classValuesMax, classValuesMin, definiteResidualsWeight, positiveClassResidualsWeight, negativeClassesResidualsWeight);95 OnlineWeightedClassificationMeanSquaredErrorCalculator calculator = new OnlineWeightedClassificationMeanSquaredErrorCalculator(positiveClassValue, classValuesMax, classValuesMin, definiteResidualsWeight, positiveClassResidualsWeight, negativeClassesResidualsWeight); 96 96 97 97 // always move forward both enumerators (do not use short-circuit evaluation!)
Note: See TracChangeset
for help on using the changeset viewer.