Changeset 12969 for branches/gteufl/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Classification
- Timestamp:
- 09/25/15 14:39:59 (9 years ago)
- Location:
- branches/gteufl
- Files:
-
- 15 edited
- 1 copied
Legend:
- Unmodified
- Added
- Removed
-
branches/gteufl
- Property svn:ignore
-
old new 8 8 FxCopResults.txt 9 9 Google.ProtocolBuffers-0.9.1.dll 10 Google.ProtocolBuffers-2.4.1.473.dll 10 11 HeuristicLab 3.3.5.1.ReSharper.user 11 12 HeuristicLab 3.3.6.0.ReSharper.user 12 13 HeuristicLab.4.5.resharper.user 13 14 HeuristicLab.ExtLibs.6.0.ReSharper.user 15 HeuristicLab.Scripting.Development 14 16 HeuristicLab.resharper.user 15 17 ProtoGen.exe … … 17 19 _ReSharper.HeuristicLab 18 20 _ReSharper.HeuristicLab 3.3 21 _ReSharper.HeuristicLab 3.3 Tests 19 22 _ReSharper.HeuristicLab.ExtLibs 20 23 bin 21 24 protoc.exe 22 _ReSharper.HeuristicLab 3.3 Tests 23 Google.ProtocolBuffers-2.4.1.473.dll 25 obj
-
- Property svn:mergeinfo changed
-
Property
svn:global-ignores
set to
*.nuget
packages
- Property svn:ignore
-
branches/gteufl/HeuristicLab.Problems.DataAnalysis
- Property svn:mergeinfo changed
-
branches/gteufl/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Classification/ClassificationEnsembleModel.cs
r9456 r12969 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 3Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2015 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. … … 67 67 } 68 68 69 public IEnumerable<IEnumerable<double>> GetEstimatedClassValueVectors( Dataset dataset, IEnumerable<int> rows) {69 public IEnumerable<IEnumerable<double>> GetEstimatedClassValueVectors(IDataset dataset, IEnumerable<int> rows) { 70 70 var estimatedValuesEnumerators = (from model in models 71 71 select model.GetEstimatedClassValues(dataset, rows).GetEnumerator()) … … 82 82 #region IClassificationModel Members 83 83 84 public IEnumerable<double> GetEstimatedClassValues( Dataset dataset, IEnumerable<int> rows) {84 public IEnumerable<double> GetEstimatedClassValues(IDataset dataset, IEnumerable<int> rows) { 85 85 foreach (var estimatedValuesVector in GetEstimatedClassValueVectors(dataset, rows)) { 86 86 // return the class which is most often occuring -
branches/gteufl/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Classification/ClassificationEnsembleProblemData.cs
r9456 r12969 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 3Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2015 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. … … 79 79 this.TestPartition.Start = classificationProblemData.TestPartition.Start; 80 80 this.TestPartition.End = classificationProblemData.TestPartition.End; 81 this.PositiveClass = classificationProblemData.PositiveClass; 81 82 } 82 83 -
branches/gteufl/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Classification/ClassificationEnsembleSolution.cs
r9456 r12969 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 3Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2015 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. … … 35 35 [StorableClass] 36 36 [Item("Classification Ensemble Solution", "A classification solution that contains an ensemble of multiple classification models")] 37 [Creatable( "Data Analysis - Ensembles")]37 [Creatable(CreatableAttribute.Categories.DataAnalysisEnsembles, Priority = 110)] 38 38 public sealed class ClassificationEnsembleSolution : ClassificationSolutionBase, IClassificationEnsembleSolution { 39 39 private readonly Dictionary<int, double> trainingEvaluationCache = new Dictionary<int, double>(); … … 49 49 } 50 50 51 [Storable] 51 52 private readonly ItemCollection<IClassificationSolution> classificationSolutions; 52 53 public IItemCollection<IClassificationSolution> ClassificationSolutions { … … 66 67 [StorableHook(HookType.AfterDeserialization)] 67 68 private void AfterDeserialization() { 68 foreach (var model in Model.Models) { 69 IClassificationProblemData problemData = (IClassificationProblemData)ProblemData.Clone(); 70 problemData.TrainingPartition.Start = trainingPartitions[model].Start; 71 problemData.TrainingPartition.End = trainingPartitions[model].End; 72 problemData.TestPartition.Start = testPartitions[model].Start; 73 problemData.TestPartition.End = testPartitions[model].End; 74 75 classificationSolutions.Add(model.CreateClassificationSolution(problemData)); 69 if (!classificationSolutions.Any()) { 70 foreach (var model in Model.Models) { 71 IClassificationProblemData problemData = (IClassificationProblemData)ProblemData.Clone(); 72 problemData.TrainingPartition.Start = trainingPartitions[model].Start; 73 problemData.TrainingPartition.End = trainingPartitions[model].End; 74 problemData.TestPartition.Start = testPartitions[model].Start; 75 problemData.TestPartition.End = testPartitions[model].End; 76 77 classificationSolutions.Add(model.CreateClassificationSolution(problemData)); 78 } 76 79 } 77 80 RegisterClassificationSolutionsEventHandler(); … … 231 234 } 232 235 233 public IEnumerable<IEnumerable<double>> GetEstimatedClassValueVectors( Dataset dataset, IEnumerable<int> rows) {236 public IEnumerable<IEnumerable<double>> GetEstimatedClassValueVectors(IDataset dataset, IEnumerable<int> rows) { 234 237 if (!Model.Models.Any()) yield break; 235 238 var estimatedValuesEnumerators = (from model in Model.Models -
branches/gteufl/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Classification/ClassificationProblem.cs
r9456 r12969 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 3Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2015 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. … … 27 27 [StorableClass] 28 28 [Item("Classification Problem", "A general classification problem.")] 29 [Creatable("Problems")]30 29 public class ClassificationProblem : DataAnalysisProblem<IClassificationProblemData>, IClassificationProblem, IStorableContent { 31 30 public string Filename { get; set; } -
branches/gteufl/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Classification/ClassificationProblemData.cs
r9456 r12969 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 3Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2015 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. … … 36 36 protected const string ClassNamesParameterName = "ClassNames"; 37 37 protected const string ClassificationPenaltiesParameterName = "ClassificationPenalties"; 38 protected const string PositiveClassParameterName = "PositiveClass"; 38 39 protected const int MaximumNumberOfClasses = 100; 39 40 protected const int InspectedRowsToDetermineTargets = 2000; … … 213 214 get { return (IFixedValueParameter<StringMatrix>)Parameters[ClassNamesParameterName]; } 214 215 } 216 public IConstrainedValueParameter<StringValue> PositiveClassParameter { 217 get { return (IConstrainedValueParameter<StringValue>)Parameters[PositiveClassParameterName]; } 218 } 215 219 public IFixedValueParameter<DoubleMatrix> ClassificationPenaltiesParameter { 216 220 get { return (IFixedValueParameter<DoubleMatrix>)Parameters[ClassificationPenaltiesParameterName]; } … … 221 225 public string TargetVariable { 222 226 get { return TargetVariableParameter.Value.Value; } 227 set { 228 if (value == null) throw new ArgumentNullException("targetVariable", "The provided value for the targetVariable is null."); 229 if (value == TargetVariable) return; 230 231 232 var matchingParameterValue = TargetVariableParameter.ValidValues.FirstOrDefault(v => v.Value == value); 233 if (matchingParameterValue == null) throw new ArgumentException("The provided value is not valid as the targetVariable.", "targetVariable"); 234 TargetVariableParameter.Value = matchingParameterValue; 235 } 223 236 } 224 237 … … 253 266 get { return ClassNamesCache; } 254 267 } 268 269 public string PositiveClass { 270 get { return PositiveClassParameter.Value.Value; } 271 set { 272 var matchingValue = PositiveClassParameter.ValidValues.SingleOrDefault(x => x.Value == value); 273 if (matchingValue == null) throw new ArgumentException(string.Format("{0} cannot be set as positive class.", value)); 274 PositiveClassParameter.Value = matchingValue; 275 } 276 } 255 277 #endregion 256 278 … … 261 283 private void AfterDeserialization() { 262 284 RegisterParameterEvents(); 285 // BackwardsCompatibility3.4 286 #region Backwards compatible code, remove with 3.5 287 if (!Parameters.ContainsKey(PositiveClassParameterName)) { 288 var validValues = new ItemSet<StringValue>(ClassNames.Select(s => new StringValue(s).AsReadOnly())); 289 Parameters.Add(new ConstrainedValueParameter<StringValue>(PositiveClassParameterName, 290 "The positive class which is used for quality measure calculation (e.g., specifity, sensitivity,...)", validValues, validValues.First())); 291 } 292 #endregion 293 263 294 } 264 295 … … 281 312 TestPartition.End = classificationProblemData.TestPartition.End; 282 313 314 PositiveClass = classificationProblemData.PositiveClass; 315 283 316 for (int i = 0; i < classificationProblemData.ClassNames.Count(); i++) 284 317 ClassNamesParameter.Value[i, 0] = classificationProblemData.ClassNames.ElementAt(i); … … 291 324 } 292 325 293 public ClassificationProblemData( Dataset dataset, IEnumerable<string> allowedInputVariables, string targetVariable)294 : base(dataset, allowedInputVariables ) {326 public ClassificationProblemData(IDataset dataset, IEnumerable<string> allowedInputVariables, string targetVariable, IEnumerable<ITransformation> transformations = null) 327 : base(dataset, allowedInputVariables, transformations ?? Enumerable.Empty<ITransformation>()) { 295 328 var validTargetVariableValues = CheckVariablesForPossibleTargetVariables(dataset).Select(x => new StringValue(x).AsReadOnly()).ToList(); 296 329 var target = validTargetVariableValues.Where(x => x.Value == targetVariable).DefaultIfEmpty(validTargetVariableValues.First()).First(); … … 298 331 Parameters.Add(new ConstrainedValueParameter<StringValue>(TargetVariableParameterName, new ItemSet<StringValue>(validTargetVariableValues), target)); 299 332 Parameters.Add(new FixedValueParameter<StringMatrix>(ClassNamesParameterName, "")); 333 Parameters.Add(new ConstrainedValueParameter<StringValue>(PositiveClassParameterName, "The positive class which is used for quality measure calculation (e.g., specifity, sensitivity,...)")); 300 334 Parameters.Add(new FixedValueParameter<DoubleMatrix>(ClassificationPenaltiesParameterName, "")); 301 335 … … 304 338 } 305 339 306 public static IEnumerable<string> CheckVariablesForPossibleTargetVariables( Dataset dataset) {340 public static IEnumerable<string> CheckVariablesForPossibleTargetVariables(IDataset dataset) { 307 341 int maxSamples = Math.Min(InspectedRowsToDetermineTargets, dataset.Rows); 308 342 var validTargetVariables = (from v in dataset.DoubleVariables … … 330 364 ClassNamesParameter.Value.ColumnNames = new List<string>() { "ClassNames" }; 331 365 ClassNamesParameter.Value.RowNames = ClassValues.Select(s => "ClassValue: " + s); 366 367 PositiveClassParameter.ValidValues.Clear(); 368 foreach (var className in ClassNames) { 369 PositiveClassParameter.ValidValues.Add(new StringValue(className).AsReadOnly()); 370 } 332 371 333 372 ((IStringConvertibleMatrix)ClassificationPenaltiesParameter.Value).Rows = Classes; … … 402 441 } 403 442 private void Parameter_ValueChanged(object sender, EventArgs e) { 443 var oldPositiveClass = PositiveClass; 444 var oldClassNames = classNamesCache; 445 var index = oldClassNames.IndexOf(oldPositiveClass); 446 404 447 classNamesCache = null; 405 448 ClassificationPenaltiesParameter.Value.RowNames = ClassNames.Select(name => "Actual " + name); 406 449 ClassificationPenaltiesParameter.Value.ColumnNames = ClassNames.Select(name => "Estimated " + name); 450 451 PositiveClassParameter.ValidValues.Clear(); 452 foreach (var className in ClassNames) { 453 PositiveClassParameter.ValidValues.Add(new StringValue(className).AsReadOnly()); 454 } 455 PositiveClassParameter.Value = PositiveClassParameter.ValidValues.ElementAt(index); 456 407 457 OnChanged(); 408 458 } 409 459 #endregion 460 461 protected override bool IsProblemDataCompatible(IDataAnalysisProblemData problemData, out string errorMessage) { 462 if (problemData == null) throw new ArgumentNullException("problemData", "The provided problemData is null."); 463 IClassificationProblemData classificationProblemData = problemData as IClassificationProblemData; 464 if (classificationProblemData == null) 465 throw new ArgumentException("The problem data is no classification problem data. Instead a " + problemData.GetType().GetPrettyName() + " was provided.", "problemData"); 466 467 var returnValue = base.IsProblemDataCompatible(classificationProblemData, out errorMessage); 468 //check targetVariable 469 if (classificationProblemData.InputVariables.All(var => var.Value != TargetVariable)) { 470 errorMessage = string.Format("The target variable {0} is not present in the new problem data.", TargetVariable) 471 + Environment.NewLine + errorMessage; 472 return false; 473 } 474 475 var newClassValues = classificationProblemData.Dataset.GetDoubleValues(TargetVariable).Distinct().OrderBy(x => x); 476 if (!newClassValues.SequenceEqual(ClassValues)) { 477 errorMessage = errorMessage + string.Format("The class values differ in the provided classification problem data."); 478 returnValue = false; 479 } 480 481 var newPositivieClassName = classificationProblemData.PositiveClass; 482 if (newPositivieClassName != PositiveClass) { 483 errorMessage = errorMessage + string.Format("The positive class differs in the provided classification problem data."); 484 returnValue = false; 485 } 486 487 return returnValue; 488 } 489 490 public override void AdjustProblemDataProperties(IDataAnalysisProblemData problemData) { 491 if (problemData == null) throw new ArgumentNullException("problemData", "The provided problemData is null."); 492 ClassificationProblemData classificationProblemData = problemData as ClassificationProblemData; 493 if (classificationProblemData == null) 494 throw new ArgumentException("The problem data is not a classification problem data. Instead a " + problemData.GetType().GetPrettyName() + " was provided.", "problemData"); 495 496 base.AdjustProblemDataProperties(problemData); 497 TargetVariable = classificationProblemData.TargetVariable; 498 for (int i = 0; i < classificationProblemData.ClassNames.Count(); i++) 499 ClassNamesParameter.Value[i, 0] = classificationProblemData.ClassNames.ElementAt(i); 500 501 PositiveClass = classificationProblemData.PositiveClass; 502 503 for (int i = 0; i < Classes; i++) { 504 for (int j = 0; j < Classes; j++) { 505 ClassificationPenaltiesParameter.Value[i, j] = classificationProblemData.GetClassificationPenalty(ClassValuesCache[i], ClassValuesCache[j]); 506 } 507 } 508 } 410 509 } 411 510 } -
branches/gteufl/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Classification/ClassificationSolution.cs
r9456 r12969 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 3Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2015 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. … … 30 30 /// </summary> 31 31 [StorableClass] 32 public abstractclass ClassificationSolution : ClassificationSolutionBase {32 public class ClassificationSolution : ClassificationSolutionBase { 33 33 protected readonly Dictionary<int, double> evaluationCache; 34 34 … … 46 46 evaluationCache = new Dictionary<int, double>(problemData.Dataset.Rows); 47 47 CalculateClassificationResults(); 48 } 49 50 public override IDeepCloneable Clone(Cloner cloner) { 51 return new ClassificationSolution(this, cloner); 48 52 } 49 53 -
branches/gteufl/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Classification/ClassificationSolutionBase.cs
r9456 r12969 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 3Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2015 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. … … 34 34 private const string TrainingNormalizedGiniCoefficientResultName = "Normalized Gini Coefficient (training)"; 35 35 private const string TestNormalizedGiniCoefficientResultName = "Normalized Gini Coefficient (test)"; 36 private const string ClassificationPerformanceMeasuresResultName = "Classification Performance Measures"; 36 37 37 38 public new IClassificationModel Model { … … 62 63 protected set { ((DoubleValue)this[TestNormalizedGiniCoefficientResultName].Value).Value = value; } 63 64 } 65 public ClassificationPerformanceMeasuresResultCollection ClassificationPerformanceMeasures { 66 get { return ((ClassificationPerformanceMeasuresResultCollection)this[ClassificationPerformanceMeasuresResultName].Value); } 67 protected set { (this[ClassificationPerformanceMeasuresResultName].Value) = value; } 68 } 64 69 #endregion 65 70 … … 75 80 Add(new Result(TrainingNormalizedGiniCoefficientResultName, "Normalized Gini coefficient of the model on the training partition.", new DoubleValue())); 76 81 Add(new Result(TestNormalizedGiniCoefficientResultName, "Normalized Gini coefficient of the model on the test partition.", new DoubleValue())); 82 Add(new Result(ClassificationPerformanceMeasuresResultName, @"Classification performance measures.\n 83 In a multiclass classification all misclassifications of the negative class will be treated as true negatives except on positive class estimations.", 84 new ClassificationPerformanceMeasuresResultCollection())); 77 85 } 78 86 … … 83 91 if (!this.ContainsKey(TestNormalizedGiniCoefficientResultName)) 84 92 Add(new Result(TestNormalizedGiniCoefficientResultName, "Normalized Gini coefficient of the model on the test partition.", new DoubleValue())); 93 if (!this.ContainsKey(ClassificationPerformanceMeasuresResultName)) { 94 Add(new Result(ClassificationPerformanceMeasuresResultName, @"Classification performance measures.\n 95 In a multiclass classification all misclassifications of the negative class will be treated as true negatives except on positive class estimations.", 96 new ClassificationPerformanceMeasuresResultCollection())); 97 CalculateClassificationResults(); 98 } 85 99 } 86 100 … … 88 102 double[] estimatedTrainingClassValues = EstimatedTrainingClassValues.ToArray(); // cache values 89 103 double[] originalTrainingClassValues = ProblemData.Dataset.GetDoubleValues(ProblemData.TargetVariable, ProblemData.TrainingIndices).ToArray(); 104 90 105 double[] estimatedTestClassValues = EstimatedTestClassValues.ToArray(); // cache values 91 106 double[] originalTestClassValues = ProblemData.Dataset.GetDoubleValues(ProblemData.TargetVariable, ProblemData.TestIndices).ToArray(); 107 108 var positiveClassName = ProblemData.PositiveClass; 109 double positiveClassValue = ProblemData.GetClassValue(positiveClassName); 110 ClassificationPerformanceMeasuresCalculator trainingPerformanceCalculator = new ClassificationPerformanceMeasuresCalculator(positiveClassName, positiveClassValue); 111 ClassificationPerformanceMeasuresCalculator testPerformanceCalculator = new ClassificationPerformanceMeasuresCalculator(positiveClassName, positiveClassValue); 92 112 93 113 OnlineCalculatorError errorState; … … 107 127 TrainingNormalizedGiniCoefficient = trainingNormalizedGini; 108 128 TestNormalizedGiniCoefficient = testNormalizedGini; 129 130 trainingPerformanceCalculator.Calculate(originalTrainingClassValues, estimatedTrainingClassValues); 131 if (trainingPerformanceCalculator.ErrorState == OnlineCalculatorError.None) 132 ClassificationPerformanceMeasures.SetTrainingResults(trainingPerformanceCalculator); 133 134 testPerformanceCalculator.Calculate(originalTestClassValues, estimatedTestClassValues); 135 if (testPerformanceCalculator.ErrorState == OnlineCalculatorError.None) 136 ClassificationPerformanceMeasures.SetTestResults(testPerformanceCalculator); 109 137 } 110 138 -
branches/gteufl/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Classification/DiscriminantFunctionClassificationModel.cs
r9456 r12969 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 3Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2015 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. … … 111 111 112 112 113 public IEnumerable<double> GetEstimatedValues( Dataset dataset, IEnumerable<int> rows) {113 public IEnumerable<double> GetEstimatedValues(IDataset dataset, IEnumerable<int> rows) { 114 114 return model.GetEstimatedValues(dataset, rows); 115 115 } 116 116 117 public IEnumerable<double> GetEstimatedClassValues( Dataset dataset, IEnumerable<int> rows) {117 public IEnumerable<double> GetEstimatedClassValues(IDataset dataset, IEnumerable<int> rows) { 118 118 if (!Thresholds.Any() && !ClassValues.Any()) throw new ArgumentException("No thresholds and class values were set for the current classification model."); 119 119 foreach (var x in GetEstimatedValues(dataset, rows)) { -
branches/gteufl/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Classification/DiscriminantFunctionClassificationSolution.cs
r9456 r12969 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 3Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2015 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. -
branches/gteufl/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Classification/DiscriminantFunctionClassificationSolutionBase.cs
r9456 r12969 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 3Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2015 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. … … 105 105 TestMeanSquaredError = errorState == OnlineCalculatorError.None ? testMSE : double.NaN; 106 106 107 double trainingR 2 = OnlinePearsonsRSquaredCalculator.Calculate(originalTrainingValues, estimatedTrainingValues, out errorState);108 TrainingRSquared = errorState == OnlineCalculatorError.None ? trainingR 2: double.NaN;109 double testR 2 = OnlinePearsonsRSquaredCalculator.Calculate(originalTestValues, estimatedTestValues, out errorState);110 TestRSquared = errorState == OnlineCalculatorError.None ? testR 2: double.NaN;107 double trainingR = OnlinePearsonsRCalculator.Calculate(originalTrainingValues, estimatedTrainingValues, out errorState); 108 TrainingRSquared = errorState == OnlineCalculatorError.None ? trainingR*trainingR : double.NaN; 109 double testR = OnlinePearsonsRCalculator.Calculate(originalTestValues, estimatedTestValues, out errorState); 110 TestRSquared = errorState == OnlineCalculatorError.None ? testR*testR : double.NaN; 111 111 112 112 double trainingNormalizedGini = NormalizedGiniCalculator.Calculate(originalTrainingValues, estimatedTrainingValues, out errorState); -
branches/gteufl/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Classification/ThresholdCalculators/AccuracyMaximizationThresholdCalculator.cs
r9456 r12969 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 3Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2015 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. -
branches/gteufl/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Classification/ThresholdCalculators/NormalDistributionCutPointsThresholdCalculator.cs
r9456 r12969 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 3Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2015 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. -
branches/gteufl/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Classification/ThresholdCalculators/ThresholdCalculator.cs
r9456 r12969 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 3Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2015 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab.
Note: See TracChangeset
for help on using the changeset viewer.