Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
10/11/12 17:48:27 (12 years ago)
Author:
mkommend
Message:

#1081: Reintegrated time series modeling branch into trunk.

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  
    193193      if (values == null) throw new ArgumentException("The varialbe " + variableName + " is not a double variable.");
    194194
    195       foreach (int index in rows)
    196         yield return values[index];
     195      return rows.Select(index => values[index]);
    197196    }
    198197
  • trunk/sources/HeuristicLab.Problems.DataAnalysis/3.4/HeuristicLab.Problems.DataAnalysis-3.4.csproj

    r8729 r8798  
    116116  </ItemGroup>
    117117  <ItemGroup>
     118    <Compile Include="DatasetExtensions.cs" />
    118119    <Compile Include="DoubleLimit.cs" />
    119120    <Compile Include="Implementation\Classification\ClassificationEnsembleModel.cs">
     
    137138    </Compile>
    138139    <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" />
    139147    <Compile Include="Interfaces\Classification\IClassificationEnsembleModel.cs">
    140148      <SubType>Code</SubType>
     
    149157    <Compile Include="Interfaces\Regression\IRegressionEnsembleSolution.cs" />
    150158    <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" />
    151165    <Compile Include="OnlineCalculators\OnlineBoundedMeanSquaredErrorCalculator.cs" />
    152166    <Compile Include="OnlineCalculators\HoeffdingsDependenceCalculator.cs" />
     167    <Compile Include="OnlineCalculators\OnlineDirectionalSymmetryCalculator.cs" />
    153168    <Compile Include="OnlineCalculators\OnlineMaxAbsoluteErrorCalculator.cs" />
    154169    <Compile Include="OnlineCalculators\OnlineMeanErrorCalculator.cs" />
     
    189204    <Compile Include="OnlineCalculators\OnlinePearsonsRSquaredCalculator.cs" />
    190205    <Compile Include="Implementation\Regression\RegressionSolution.cs" />
     206    <Compile Include="OnlineCalculators\OnlineTheilsUStatisticCalculator.cs" />
     207    <Compile Include="OnlineCalculators\OnlineWeightedDirectionalSymmetryCalculator.cs" />
    191208    <Compile Include="OnlineCalculators\SpearmansRankCorrelationCoefficientCalculator.cs" />
    192209    <Compile Include="Plugin.cs" />
  • trunk/sources/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/DataAnalysisProblem.cs

    r7823 r8798  
    6666    }
    6767
     68    protected DataAnalysisProblem(T problemData)
     69      : this() {
     70      ProblemData = problemData;
     71    }
     72
    6873    [StorableHook(HookType.AfterDeserialization)]
    6974    private void AfterDeserialization() {
  • trunk/sources/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Regression/ConstantRegressionModel.cs

    r8528 r8798  
    3030  public class ConstantRegressionModel : NamedItem, IRegressionModel {
    3131    [Storable]
    32     private double constant;
     32    protected double constant;
    3333    public double Constant {
    3434      get { return constant; }
  • trunk/sources/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Regression/RegressionProblem.cs

    r7823 r8798  
    3636    public override IDeepCloneable Clone(Cloner cloner) { return new RegressionProblem(this, cloner); }
    3737
    38     public RegressionProblem()
    39       : base() {
    40       ProblemData = new RegressionProblemData();
    41     }
     38    public RegressionProblem() : base(new RegressionProblemData()) { }
     39
    4240  }
    4341}
  • trunk/sources/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Regression/RegressionSolutionBase.cs

    r8723 r8798  
    2929  [StorableClass]
    3030  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";
    4356
    4457    public new IRegressionModel Model {
     
    115128    protected RegressionSolutionBase(IRegressionModel model, IRegressionProblemData problemData)
    116129      : 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()));
    129142    }
    130143
Note: See TracChangeset for help on using the changeset viewer.