Changeset 8798 for trunk/sources/HeuristicLab.Problems.DataAnalysis
- Timestamp:
- 10/11/12 17:48:27 (12 years ago)
- Location:
- trunk/sources/HeuristicLab.Problems.DataAnalysis
- Files:
-
- 7 edited
- 7 copied
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Problems.DataAnalysis
-
trunk/sources/HeuristicLab.Problems.DataAnalysis/3.4/Dataset.cs
r7921 r8798 193 193 if (values == null) throw new ArgumentException("The varialbe " + variableName + " is not a double variable."); 194 194 195 foreach (int index in rows) 196 yield return values[index]; 195 return rows.Select(index => values[index]); 197 196 } 198 197 -
trunk/sources/HeuristicLab.Problems.DataAnalysis/3.4/HeuristicLab.Problems.DataAnalysis-3.4.csproj
r8729 r8798 116 116 </ItemGroup> 117 117 <ItemGroup> 118 <Compile Include="DatasetExtensions.cs" /> 118 119 <Compile Include="DoubleLimit.cs" /> 119 120 <Compile Include="Implementation\Classification\ClassificationEnsembleModel.cs"> … … 137 138 </Compile> 138 139 <Compile Include="Implementation\Regression\RegressionEnsembleSolution.cs" /> 140 <Compile Include="Implementation\TimeSeriesPrognosis\Models\ConstantTimeSeriesPrognosisModel.cs" /> 141 <Compile Include="Implementation\TimeSeriesPrognosis\Models\TimeSeriesPrognosisAutoRegressiveModel.cs" /> 142 <Compile Include="Implementation\TimeSeriesPrognosis\TimeSeriesPrognosisProblem.cs" /> 143 <Compile Include="Implementation\TimeSeriesPrognosis\TimeSeriesPrognosisProblemData.cs" /> 144 <Compile Include="Implementation\TimeSeriesPrognosis\TimeSeriesPrognosisResults.cs" /> 145 <Compile Include="Implementation\TimeSeriesPrognosis\TimeSeriesPrognosisSolution.cs" /> 146 <Compile Include="Implementation\TimeSeriesPrognosis\TimeSeriesPrognosisSolutionBase.cs" /> 139 147 <Compile Include="Interfaces\Classification\IClassificationEnsembleModel.cs"> 140 148 <SubType>Code</SubType> … … 149 157 <Compile Include="Interfaces\Regression\IRegressionEnsembleSolution.cs" /> 150 158 <Compile Include="Implementation\Regression\RegressionSolutionBase.cs" /> 159 <Compile Include="Interfaces\TimeSeriesPrognosis\IOnlineTimeSeriesCalculator.cs" /> 160 <Compile Include="Interfaces\TimeSeriesPrognosis\ITimeSeriesPrognosisModel.cs" /> 161 <Compile Include="Interfaces\TimeSeriesPrognosis\ITimeSeriesPrognosisProblem.cs" /> 162 <Compile Include="Interfaces\TimeSeriesPrognosis\ITimeSeriesPrognosisProblemData.cs" /> 163 <Compile Include="Interfaces\TimeSeriesPrognosis\ITimeSeriesPrognosisSolution.cs" /> 164 <Compile Include="OnlineCalculators\AutoCorrelationCalculator.cs" /> 151 165 <Compile Include="OnlineCalculators\OnlineBoundedMeanSquaredErrorCalculator.cs" /> 152 166 <Compile Include="OnlineCalculators\HoeffdingsDependenceCalculator.cs" /> 167 <Compile Include="OnlineCalculators\OnlineDirectionalSymmetryCalculator.cs" /> 153 168 <Compile Include="OnlineCalculators\OnlineMaxAbsoluteErrorCalculator.cs" /> 154 169 <Compile Include="OnlineCalculators\OnlineMeanErrorCalculator.cs" /> … … 189 204 <Compile Include="OnlineCalculators\OnlinePearsonsRSquaredCalculator.cs" /> 190 205 <Compile Include="Implementation\Regression\RegressionSolution.cs" /> 206 <Compile Include="OnlineCalculators\OnlineTheilsUStatisticCalculator.cs" /> 207 <Compile Include="OnlineCalculators\OnlineWeightedDirectionalSymmetryCalculator.cs" /> 191 208 <Compile Include="OnlineCalculators\SpearmansRankCorrelationCoefficientCalculator.cs" /> 192 209 <Compile Include="Plugin.cs" /> -
trunk/sources/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/DataAnalysisProblem.cs
r7823 r8798 66 66 } 67 67 68 protected DataAnalysisProblem(T problemData) 69 : this() { 70 ProblemData = problemData; 71 } 72 68 73 [StorableHook(HookType.AfterDeserialization)] 69 74 private void AfterDeserialization() { -
trunk/sources/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Regression/ConstantRegressionModel.cs
r8528 r8798 30 30 public class ConstantRegressionModel : NamedItem, IRegressionModel { 31 31 [Storable] 32 pr ivatedouble constant;32 protected double constant; 33 33 public double Constant { 34 34 get { return constant; } -
trunk/sources/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Regression/RegressionProblem.cs
r7823 r8798 36 36 public override IDeepCloneable Clone(Cloner cloner) { return new RegressionProblem(this, cloner); } 37 37 38 public RegressionProblem() 39 : base() { 40 ProblemData = new RegressionProblemData(); 41 } 38 public RegressionProblem() : base(new RegressionProblemData()) { } 39 42 40 } 43 41 } -
trunk/sources/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Regression/RegressionSolutionBase.cs
r8723 r8798 29 29 [StorableClass] 30 30 public abstract class RegressionSolutionBase : DataAnalysisSolution, IRegressionSolution { 31 private const string TrainingMeanSquaredErrorResultName = "Mean squared error (training)"; 32 private const string TestMeanSquaredErrorResultName = "Mean squared error (test)"; 33 private const string TrainingMeanAbsoluteErrorResultName = "Mean absolute error (training)"; 34 private const string TestMeanAbsoluteErrorResultName = "Mean absolute error (test)"; 35 private const string TrainingSquaredCorrelationResultName = "Pearson's R² (training)"; 36 private const string TestSquaredCorrelationResultName = "Pearson's R² (test)"; 37 private const string TrainingRelativeErrorResultName = "Average relative error (training)"; 38 private const string TestRelativeErrorResultName = "Average relative error (test)"; 39 private const string TrainingNormalizedMeanSquaredErrorResultName = "Normalized mean squared error (training)"; 40 private const string TestNormalizedMeanSquaredErrorResultName = "Normalized mean squared error (test)"; 41 private const string TrainingMeanErrorResultName = "Mean error (training)"; 42 private const string TestMeanErrorResultName = "Mean error (test)"; 31 protected const string TrainingMeanSquaredErrorResultName = "Mean squared error (training)"; 32 protected const string TestMeanSquaredErrorResultName = "Mean squared error (test)"; 33 protected const string TrainingMeanAbsoluteErrorResultName = "Mean absolute error (training)"; 34 protected const string TestMeanAbsoluteErrorResultName = "Mean absolute error (test)"; 35 protected const string TrainingSquaredCorrelationResultName = "Pearson's R² (training)"; 36 protected const string TestSquaredCorrelationResultName = "Pearson's R² (test)"; 37 protected const string TrainingRelativeErrorResultName = "Average relative error (training)"; 38 protected const string TestRelativeErrorResultName = "Average relative error (test)"; 39 protected const string TrainingNormalizedMeanSquaredErrorResultName = "Normalized mean squared error (training)"; 40 protected const string TestNormalizedMeanSquaredErrorResultName = "Normalized mean squared error (test)"; 41 protected const string TrainingMeanErrorResultName = "Mean error (training)"; 42 protected const string TestMeanErrorResultName = "Mean error (test)"; 43 44 protected const string TrainingMeanSquaredErrorResultDescription = "Mean of squared errors of the model on the training partition"; 45 protected const string TestMeanSquaredErrorResultDescription = "Mean of squared errors of the model on the test partition"; 46 protected const string TrainingMeanAbsoluteErrorResultDescription = "Mean of absolute errors of the model on the training partition"; 47 protected const string TestMeanAbsoluteErrorResultDescription = "Mean of absolute errors of the model on the test partition"; 48 protected const string TrainingSquaredCorrelationResultDescription = "Squared Pearson's correlation coefficient of the model output and the actual values on the training partition"; 49 protected const string TestSquaredCorrelationResultDescription = "Squared Pearson's correlation coefficient of the model output and the actual values on the test partition"; 50 protected const string TrainingRelativeErrorResultDescription = "Average of the relative errors of the model output and the actual values on the training partition"; 51 protected const string TestRelativeErrorResultDescription = "Average of the relative errors of the model output and the actual values on the test partition"; 52 protected const string TrainingNormalizedMeanSquaredErrorResultDescription = "Normalized mean of squared errors of the model on the training partition"; 53 protected const string TestNormalizedMeanSquaredErrorResultDescription = "Normalized mean of squared errors of the model on the test partition"; 54 protected const string TrainingMeanErrorResultDescription = "Mean of errors of the model on the training partition"; 55 protected const string TestMeanErrorResultDescription = "Mean of errors of the model on the test partition"; 43 56 44 57 public new IRegressionModel Model { … … 115 128 protected RegressionSolutionBase(IRegressionModel model, IRegressionProblemData problemData) 116 129 : base(model, problemData) { 117 Add(new Result(TrainingMeanSquaredErrorResultName, "Mean of squared errors of the model on the training partition", new DoubleValue()));118 Add(new Result(TestMeanSquaredErrorResultName, "Mean of squared errors of the model on the test partition", new DoubleValue()));119 Add(new Result(TrainingMeanAbsoluteErrorResultName, "Mean of absolute errors of the model on the training partition", new DoubleValue()));120 Add(new Result(TestMeanAbsoluteErrorResultName, "Mean of absolute errors of the model on the test partition", new DoubleValue()));121 Add(new Result(TrainingSquaredCorrelationResultName, "Squared Pearson's correlation coefficient of the model output and the actual values on the training partition", new DoubleValue()));122 Add(new Result(TestSquaredCorrelationResultName, "Squared Pearson's correlation coefficient of the model output and the actual values on the test partition", new DoubleValue()));123 Add(new Result(TrainingRelativeErrorResultName, "Average of the relative errors of the model output and the actual values on the training partition", new PercentValue()));124 Add(new Result(TestRelativeErrorResultName, "Average of the relative errors of the model output and the actual values on the test partition", new PercentValue()));125 Add(new Result(TrainingNormalizedMeanSquaredErrorResultName, "Normalized mean of squared errors of the model on the training partition", new DoubleValue()));126 Add(new Result(TestNormalizedMeanSquaredErrorResultName, "Normalized mean of squared errors of the model on the test partition", new DoubleValue()));127 Add(new Result(TrainingMeanErrorResultName, "Mean of errors of the model on the training partition", new DoubleValue()));128 Add(new Result(TestMeanErrorResultName, "Mean of errors of the model on the test partition", new DoubleValue()));130 Add(new Result(TrainingMeanSquaredErrorResultName, TrainingMeanSquaredErrorResultDescription, new DoubleValue())); 131 Add(new Result(TestMeanSquaredErrorResultName, TestMeanSquaredErrorResultDescription, new DoubleValue())); 132 Add(new Result(TrainingMeanAbsoluteErrorResultName, TrainingMeanAbsoluteErrorResultDescription, new DoubleValue())); 133 Add(new Result(TestMeanAbsoluteErrorResultName, TestMeanAbsoluteErrorResultDescription, new DoubleValue())); 134 Add(new Result(TrainingSquaredCorrelationResultName, TrainingSquaredCorrelationResultDescription, new DoubleValue())); 135 Add(new Result(TestSquaredCorrelationResultName, TestSquaredCorrelationResultDescription, new DoubleValue())); 136 Add(new Result(TrainingRelativeErrorResultName, TrainingRelativeErrorResultDescription, new PercentValue())); 137 Add(new Result(TestRelativeErrorResultName, TestRelativeErrorResultDescription, new PercentValue())); 138 Add(new Result(TrainingNormalizedMeanSquaredErrorResultName, TrainingNormalizedMeanSquaredErrorResultDescription, new DoubleValue())); 139 Add(new Result(TestNormalizedMeanSquaredErrorResultName, TestNormalizedMeanSquaredErrorResultDescription, new DoubleValue())); 140 Add(new Result(TrainingMeanErrorResultName, TrainingMeanErrorResultDescription, new DoubleValue())); 141 Add(new Result(TestMeanErrorResultName, TestMeanErrorResultDescription, new DoubleValue())); 129 142 } 130 143
Note: See TracChangeset
for help on using the changeset viewer.