- Timestamp:
- 09/22/10 11:22:49 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Problems.DataAnalysis.Regression/3.3/Analyzers/RegressionSolutionAnalyzer.cs
r4068 r4468 121 121 var solution = bestSolution; 122 122 #region update R2,MSE, Rel Error 123 IEnumerable<double> trainingValues = problemData.Dataset.GetEnumeratedVariableValues( 124 problemData.TargetVariable.Value, 125 problemData.TrainingSamplesStart.Value, 126 problemData.TrainingSamplesEnd.Value); 127 IEnumerable<double> testValues = problemData.Dataset.GetEnumeratedVariableValues( 128 problemData.TargetVariable.Value, 129 problemData.TestSamplesStart.Value, 130 problemData.TestSamplesEnd.Value); 123 IEnumerable<double> trainingValues = problemData.Dataset.GetEnumeratedVariableValues(problemData.TargetVariable.Value, problemData.TrainingIndizes); 124 IEnumerable<double> testValues = problemData.Dataset.GetEnumeratedVariableValues(problemData.TargetVariable.Value, problemData.TestIndizes); 131 125 OnlineMeanSquaredErrorEvaluator mseEvaluator = new OnlineMeanSquaredErrorEvaluator(); 132 126 OnlineMeanAbsolutePercentageErrorEvaluator relErrorEvaluator = new OnlineMeanAbsolutePercentageErrorEvaluator(); 133 127 OnlinePearsonsRSquaredEvaluator r2Evaluator = new OnlinePearsonsRSquaredEvaluator(); 128 134 129 #region training 135 130 var originalEnumerator = trainingValues.GetEnumerator(); … … 144 139 double trainingRelError = relErrorEvaluator.MeanAbsolutePercentageError; 145 140 #endregion 141 146 142 mseEvaluator.Reset(); 147 143 relErrorEvaluator.Reset(); 148 144 r2Evaluator.Reset(); 145 149 146 #region test 150 147 originalEnumerator = testValues.GetEnumerator(); … … 159 156 double testRelError = relErrorEvaluator.MeanAbsolutePercentageError; 160 157 #endregion 158 161 159 if (results.ContainsKey(BestSolutionResultName)) { 162 160 results[BestSolutionResultName].Value = solution;
Note: See TracChangeset
for help on using the changeset viewer.