Changeset 5942 for trunk/sources/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Classification
- Timestamp:
- 04/04/11 15:38:16 (14 years ago)
- Location:
- trunk/sources/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Classification
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Classification/ClassificationSolution.cs
r5894 r5942 85 85 IEnumerable<double> originalTestClassValues = ProblemData.Dataset.GetEnumeratedVariableValues(ProblemData.TargetVariable, ProblemData.TestIndizes); 86 86 87 Online EvaluatorError errorState;88 double trainingAccuracy = OnlineAccuracy Evaluator.Calculate(estimatedTrainingClassValues, originalTrainingClassValues, out errorState);89 if (errorState != Online EvaluatorError.None) trainingAccuracy = double.NaN;90 double testAccuracy = OnlineAccuracy Evaluator.Calculate(estimatedTestClassValues, originalTestClassValues, out errorState);91 if (errorState != Online EvaluatorError.None) testAccuracy = double.NaN;87 OnlineCalculatorError errorState; 88 double trainingAccuracy = OnlineAccuracyCalculator.Calculate(estimatedTrainingClassValues, originalTrainingClassValues, out errorState); 89 if (errorState != OnlineCalculatorError.None) trainingAccuracy = double.NaN; 90 double testAccuracy = OnlineAccuracyCalculator.Calculate(estimatedTestClassValues, originalTestClassValues, out errorState); 91 if (errorState != OnlineCalculatorError.None) testAccuracy = double.NaN; 92 92 93 93 TrainingAccuracy = trainingAccuracy; -
trunk/sources/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Classification/DiscriminantFunctionClassificationSolution.cs
r5894 r5942 105 105 IEnumerable<double> originalTestValues = ProblemData.Dataset.GetEnumeratedVariableValues(ProblemData.TargetVariable, ProblemData.TestIndizes); 106 106 107 Online EvaluatorError errorState;108 double trainingMSE = OnlineMeanSquaredError Evaluator.Calculate(estimatedTrainingValues, originalTrainingValues, out errorState);109 TrainingMeanSquaredError = errorState == Online EvaluatorError.None ? trainingMSE : double.NaN;110 double testMSE = OnlineMeanSquaredError Evaluator.Calculate(estimatedTestValues, originalTestValues, out errorState);111 TestMeanSquaredError = errorState == Online EvaluatorError.None ? testMSE : double.NaN;107 OnlineCalculatorError errorState; 108 double trainingMSE = OnlineMeanSquaredErrorCalculator.Calculate(estimatedTrainingValues, originalTrainingValues, out errorState); 109 TrainingMeanSquaredError = errorState == OnlineCalculatorError.None ? trainingMSE : double.NaN; 110 double testMSE = OnlineMeanSquaredErrorCalculator.Calculate(estimatedTestValues, originalTestValues, out errorState); 111 TestMeanSquaredError = errorState == OnlineCalculatorError.None ? testMSE : double.NaN; 112 112 113 double trainingR2 = OnlinePearsonsRSquared Evaluator.Calculate(estimatedTrainingValues, originalTrainingValues, out errorState);114 TrainingRSquared = errorState == Online EvaluatorError.None ? trainingR2 : double.NaN;115 double testR2 = OnlinePearsonsRSquared Evaluator.Calculate(estimatedTestValues, originalTestValues, out errorState);116 TestRSquared = errorState == Online EvaluatorError.None ? testR2 : double.NaN;113 double trainingR2 = OnlinePearsonsRSquaredCalculator.Calculate(estimatedTrainingValues, originalTrainingValues, out errorState); 114 TrainingRSquared = errorState == OnlineCalculatorError.None ? trainingR2 : double.NaN; 115 double testR2 = OnlinePearsonsRSquaredCalculator.Calculate(estimatedTestValues, originalTestValues, out errorState); 116 TestRSquared = errorState == OnlineCalculatorError.None ? testR2 : double.NaN; 117 117 } 118 118 -
trunk/sources/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Classification/ThresholdCalculators/NormalDistributionCutPointsThresholdCalculator.cs
r5894 r5942 64 64 double classValue = group.Key; 65 65 double mean, variance; 66 Online EvaluatorError meanErrorState, varianceErrorState;66 OnlineCalculatorError meanErrorState, varianceErrorState; 67 67 OnlineMeanAndVarianceCalculator.Calculate(estimatedClassValues, out mean, out variance, out meanErrorState, out varianceErrorState); 68 68 69 if (meanErrorState == Online EvaluatorError.None && varianceErrorState == OnlineEvaluatorError.None) {69 if (meanErrorState == OnlineCalculatorError.None && varianceErrorState == OnlineCalculatorError.None) { 70 70 classMean[classValue] = mean; 71 71 classStdDev[classValue] = Math.Sqrt(variance);
Note: See TracChangeset
for help on using the changeset viewer.