Changeset 14000
- Timestamp:
- 07/05/16 14:05:46 (8 years ago)
- Location:
- trunk/sources
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Algorithms.DataAnalysis/3.4/GradientBoostedTrees/GradientBoostedTreesAlgorithmStatic.cs
r13157 r14000 96 96 weights = new List<double>(); 97 97 // add constant model 98 models.Add(new ConstantModel(f0 ));98 models.Add(new ConstantModel(f0, problemData.TargetVariable)); 99 99 weights.Add(1.0); 100 100 } -
trunk/sources/HeuristicLab.Algorithms.DataAnalysis/3.4/GradientBoostedTrees/RegressionTreeModel.cs
r13992 r14000 160 160 } 161 161 162 internal RegressionTreeModel(TreeNode[] tree, string target = "Target")163 : base(target , "RegressionTreeModel", "Represents a decision tree for regression.") {162 internal RegressionTreeModel(TreeNode[] tree, string targetVariable) 163 : base(targetVariable, "RegressionTreeModel", "Represents a decision tree for regression.") { 164 164 this.tree = tree; 165 165 } -
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.