Legend:
- Unmodified
- Added
- Removed
-
stable
- Property svn:mergeinfo changed
/trunk/sources merged: 13002-13004
- Property svn:mergeinfo changed
-
stable/HeuristicLab.Problems.DataAnalysis.Views
- Property svn:mergeinfo changed
/trunk/sources/HeuristicLab.Problems.DataAnalysis.Views merged: 13002-13004
- Property svn:mergeinfo changed
-
stable/HeuristicLab.Problems.DataAnalysis.Views/3.4/TimeSeriesPrognosis/TimeSeriesPrognosisSolutionErrorCharacteristicsCurveView.cs
r12009 r13062 28 28 [Content(typeof(ITimeSeriesPrognosisSolution))] 29 29 public partial class TimeSeriesPrognosisSolutionErrorCharacteristicsCurveView : RegressionSolutionErrorCharacteristicsCurveView { 30 31 32 30 public TimeSeriesPrognosisSolutionErrorCharacteristicsCurveView() 33 31 : base() { … … 46 44 } 47 45 48 protected override void UpdateChart() {49 base.UpdateChart();50 if (Content == null) return;46 protected override IEnumerable<IRegressionSolution> CreateBaselineSolutions() { 47 foreach (var sol in base.CreateBaselineSolutions()) 48 yield return sol; 51 49 52 50 IEnumerable<double> trainingStartValues = ProblemData.Dataset.GetDoubleValues(ProblemData.TargetVariable, ProblemData.TrainingIndices.Select(r => r - 1).Where(r => r > 0)).ToList(); 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 } 51 //AR1 model 52 double alpha, beta; 53 OnlineCalculatorError errorState; 54 OnlineLinearScalingParameterCalculator.Calculate(ProblemData.Dataset.GetDoubleValues(ProblemData.TargetVariable, ProblemData.TrainingIndices.Where(x => x > 0)), trainingStartValues, out alpha, out beta, out errorState); 55 var ar1Solution = new TimeSeriesPrognosisAutoRegressiveModel(ProblemData.TargetVariable, new double[] { beta }, alpha).CreateTimeSeriesPrognosisSolution(ProblemData); 56 ar1Solution.Name = "AR(1)"; 57 yield return ar1Solution; 62 58 } 63 59 }
Note: See TracChangeset
for help on using the changeset viewer.