Changeset 14000 for trunk/sources/HeuristicLab.Problems.DataAnalysis/3.4
- Timestamp:
- 07/05/16 14:05:46 (8 years ago)
- Location:
- trunk/sources/HeuristicLab.Problems.DataAnalysis/3.4/Implementation
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/ConstantModel.cs
r13941 r14000 51 51 public override IDeepCloneable Clone(Cloner cloner) { return new ConstantModel(this, cloner); } 52 52 53 public ConstantModel(double constant, string targetVariable = "Target")53 public ConstantModel(double constant, string targetVariable) 54 54 : base(targetVariable) { 55 55 this.name = ItemName; -
trunk/sources/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Regression/ConstantRegressionModel.cs
r13992 r14000 51 51 public override IDeepCloneable Clone(Cloner cloner) { return new ConstantRegressionModel(this, cloner); } 52 52 53 public ConstantRegressionModel(double constant, string targetVariable = "Target")53 public ConstantRegressionModel(double constant, string targetVariable) 54 54 : base(targetVariable) { 55 55 this.name = ItemName; -
trunk/sources/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/TimeSeriesPrognosis/Models/ConstantTimeSeriesPrognosisModel.cs
r13993 r14000 39 39 } 40 40 41 public ConstantTimeSeriesPrognosisModel(double constant, string targetVariable = "Target") : base(constant, targetVariable) { }41 public ConstantTimeSeriesPrognosisModel(double constant, string targetVariable) : base(constant, targetVariable) { } 42 42 43 43 public IEnumerable<IEnumerable<double>> GetPrognosedValues(IDataset dataset, IEnumerable<int> rows, IEnumerable<int> horizons) { -
trunk/sources/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/TimeSeriesPrognosis/TimeSeriesPrognosisResults.cs
r13100 r14000 373 373 //mean model 374 374 double trainingMean = problemData.Dataset.GetDoubleValues(problemData.TargetVariable, problemData.TrainingIndices).Average(); 375 var meanModel = new ConstantModel(trainingMean );375 var meanModel = new ConstantModel(trainingMean, problemData.TargetVariable); 376 376 377 377 //AR1 model … … 395 395 PrognosisTrainingMeanAbsoluteError = errorState == OnlineCalculatorError.None ? trainingMAE : double.NaN; 396 396 double trainingR = OnlinePearsonsRCalculator.Calculate(originalTrainingValues, estimatedTrainingValues, out errorState); 397 PrognosisTrainingRSquared = errorState == OnlineCalculatorError.None ? trainingR *trainingR : double.NaN;397 PrognosisTrainingRSquared = errorState == OnlineCalculatorError.None ? trainingR * trainingR : double.NaN; 398 398 double trainingRelError = OnlineMeanAbsolutePercentageErrorCalculator.Calculate(originalTrainingValues, estimatedTrainingValues, out errorState); 399 399 PrognosisTrainingRelativeError = errorState == OnlineCalculatorError.None ? trainingRelError : double.NaN; … … 431 431 PrognosisTestMeanAbsoluteError = errorState == OnlineCalculatorError.None ? testMAE : double.NaN; 432 432 double testR = OnlinePearsonsRCalculator.Calculate(originalTestValues, estimatedTestValues, out errorState); 433 PrognosisTestRSquared = errorState == OnlineCalculatorError.None ? testR *testR : double.NaN;433 PrognosisTestRSquared = errorState == OnlineCalculatorError.None ? testR * testR : double.NaN; 434 434 double testRelError = OnlineMeanAbsolutePercentageErrorCalculator.Calculate(originalTestValues, estimatedTestValues, out errorState); 435 435 PrognosisTestRelativeError = errorState == OnlineCalculatorError.None ? testRelError : double.NaN; … … 448 448 //mean model 449 449 double trainingMean = problemData.Dataset.GetDoubleValues(problemData.TargetVariable, problemData.TrainingIndices).Average(); 450 var meanModel = new ConstantModel(trainingMean );450 var meanModel = new ConstantModel(trainingMean, problemData.TargetVariable); 451 451 452 452 //AR1 model -
trunk/sources/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/TimeSeriesPrognosis/TimeSeriesPrognosisSolutionBase.cs
r13100 r14000 150 150 OnlineCalculatorError errorState; 151 151 double trainingMean = ProblemData.TrainingIndices.Any() ? ProblemData.Dataset.GetDoubleValues(ProblemData.TargetVariable, ProblemData.TrainingIndices).Average() : double.NaN; 152 var meanModel = new ConstantModel(trainingMean );152 var meanModel = new ConstantModel(trainingMean,ProblemData.TargetVariable); 153 153 154 154 double alpha, beta;
Note: See TracChangeset
for help on using the changeset viewer.