- Timestamp:
- 09/12/11 13:48:31 (13 years ago)
- Location:
- trunk/sources/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Regression
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Regression/RegressionProblemData.cs
r6672 r6740 144 144 dataset.Name = Path.GetFileName(fileName); 145 145 146 RegressionProblemData problemData = new RegressionProblemData(dataset, dataset. VariableNames.Skip(1), dataset.VariableNames.First());146 RegressionProblemData problemData = new RegressionProblemData(dataset, dataset.DoubleVariables.Skip(1), dataset.DoubleVariables.First()); 147 147 problemData.Name = "Data imported from " + Path.GetFileName(fileName); 148 148 return problemData; -
trunk/sources/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Regression/RegressionSolutionBase.cs
r6661 r6740 127 127 OnlineCalculatorError errorState; 128 128 Add(new Result(TrainingMeanAbsoluteErrorResultName, "Mean of absolute errors of the model on the training partition", new DoubleValue())); 129 double trainingMAE = OnlineMeanAbsoluteErrorCalculator.Calculate(EstimatedTrainingValues, ProblemData.Dataset.Get EnumeratedVariableValues(ProblemData.TargetVariable, ProblemData.TrainingIndizes), out errorState);129 double trainingMAE = OnlineMeanAbsoluteErrorCalculator.Calculate(EstimatedTrainingValues, ProblemData.Dataset.GetDoubleValues(ProblemData.TargetVariable, ProblemData.TrainingIndizes), out errorState); 130 130 TrainingMeanAbsoluteError = errorState == OnlineCalculatorError.None ? trainingMAE : double.NaN; 131 131 } … … 134 134 OnlineCalculatorError errorState; 135 135 Add(new Result(TestMeanAbsoluteErrorResultName, "Mean of absolute errors of the model on the test partition", new DoubleValue())); 136 double testMAE = OnlineMeanAbsoluteErrorCalculator.Calculate(EstimatedTestValues, ProblemData.Dataset.Get EnumeratedVariableValues(ProblemData.TargetVariable, ProblemData.TestIndizes), out errorState);136 double testMAE = OnlineMeanAbsoluteErrorCalculator.Calculate(EstimatedTestValues, ProblemData.Dataset.GetDoubleValues(ProblemData.TargetVariable, ProblemData.TestIndizes), out errorState); 137 137 TestMeanAbsoluteError = errorState == OnlineCalculatorError.None ? testMAE : double.NaN; 138 138 } … … 142 142 protected void CalculateResults() { 143 143 double[] estimatedTrainingValues = EstimatedTrainingValues.ToArray(); // cache values 144 double[] originalTrainingValues = ProblemData.Dataset.Get EnumeratedVariableValues(ProblemData.TargetVariable, ProblemData.TrainingIndizes).ToArray();144 double[] originalTrainingValues = ProblemData.Dataset.GetDoubleValues(ProblemData.TargetVariable, ProblemData.TrainingIndizes).ToArray(); 145 145 double[] estimatedTestValues = EstimatedTestValues.ToArray(); // cache values 146 double[] originalTestValues = ProblemData.Dataset.Get EnumeratedVariableValues(ProblemData.TargetVariable, ProblemData.TestIndizes).ToArray();146 double[] originalTestValues = ProblemData.Dataset.GetDoubleValues(ProblemData.TargetVariable, ProblemData.TestIndizes).ToArray(); 147 147 148 148 OnlineCalculatorError errorState;
Note: See TracChangeset
for help on using the changeset viewer.