Legend:
- Unmodified
- Added
- Removed
-
stable
- Property svn:mergeinfo changed
/trunk/sources merged: 11093
- Property svn:mergeinfo changed
-
stable/HeuristicLab.Problems.DataAnalysis.Views
- Property svn:mergeinfo changed
/trunk/sources/HeuristicLab.Problems.DataAnalysis.Views merged: 11093
- Property svn:mergeinfo changed
-
stable/HeuristicLab.Problems.DataAnalysis.Views/3.4/TimeSeriesPrognosis/TimeSeriesPrognosisSolutionErrorCharacteristicsCurveView.cs
r9462 r11149 22 22 using System.Collections.Generic; 23 23 using System.Linq; 24 using System.Windows.Forms;25 24 using HeuristicLab.MainForm; 26 using HeuristicLab.MainForm.WindowsForms; 25 27 26 namespace HeuristicLab.Problems.DataAnalysis.Views { 28 27 [View("Error Characteristics Curve")] … … 51 50 if (Content == null) return; 52 51 53 //AR1 model54 double alpha, beta;55 OnlineCalculatorError errorState;56 52 IEnumerable<double> trainingStartValues = ProblemData.Dataset.GetDoubleValues(ProblemData.TargetVariable, ProblemData.TrainingIndices.Select(r => r - 1).Where(r => r > 0)).ToList(); 57 OnlineLinearScalingParameterCalculator.Calculate(ProblemData.Dataset.GetDoubleValues(ProblemData.TargetVariable, ProblemData.TrainingIndices.Where(x => x > 0)), trainingStartValues, out alpha, out beta, out errorState); 58 var AR1model = new TimeSeriesPrognosisAutoRegressiveModel(ProblemData.TargetVariable, new double[] { beta }, alpha).CreateTimeSeriesPrognosisSolution(ProblemData); 59 AR1model.Name = "AR(1) Model"; 60 AddRegressionSolution(AR1model); 53 if (trainingStartValues.Any()) { 54 //AR1 model 55 double alpha, beta; 56 OnlineCalculatorError errorState; 57 OnlineLinearScalingParameterCalculator.Calculate(ProblemData.Dataset.GetDoubleValues(ProblemData.TargetVariable, ProblemData.TrainingIndices.Where(x => x > 0)), trainingStartValues, out alpha, out beta, out errorState); 58 var ar1model = new TimeSeriesPrognosisAutoRegressiveModel(ProblemData.TargetVariable, new double[] { beta }, alpha).CreateTimeSeriesPrognosisSolution(ProblemData); 59 ar1model.Name = "AR(1) Model"; 60 AddRegressionSolution(ar1model); 61 } 61 62 } 62 63 }
Note: See TracChangeset
for help on using the changeset viewer.