Changeset 16400
- Timestamp:
- 12/19/18 07:51:00 (6 years ago)
- Location:
- branches/2925_AutoDiffForDynamicalModels/HeuristicLab.Problems.DynamicalSystemsModelling/3.3
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2925_AutoDiffForDynamicalModels/HeuristicLab.Problems.DynamicalSystemsModelling/3.3/Solution.cs
r16399 r16400 85 85 } 86 86 87 public IEnumerable<double[]> Predict(IntRange episode, int forecastHorizon ) {87 public IEnumerable<double[]> Predict(IntRange episode, int forecastHorizon, out double snmse) { 88 88 var forecastEpisode = new IntRange(episode.Start, episode.End + forecastHorizon); 89 double nmse = double.NaN; 89 90 90 double[] optL0; 91 91 var random = new FastRandom(12345); 92 Problem.OptimizeForEpisodes(trees, problemData, targetVars, latentVariables, random, new[] { forecastEpisode }, 100, numericIntegrationSteps, odeSolver, out optL0, out nmse);92 Problem.OptimizeForEpisodes(trees, problemData, targetVars, latentVariables, random, new[] { forecastEpisode }, 100, numericIntegrationSteps, odeSolver, out optL0, out snmse); 93 93 var predictions = Problem.Integrate( 94 94 trees, -
branches/2925_AutoDiffForDynamicalModels/HeuristicLab.Problems.DynamicalSystemsModelling/3.3/SolutionView.Designer.cs
r16399 r16400 45 45 /// </summary> 46 46 private void InitializeComponent() { 47 this.components = new System.ComponentModel.Container();48 this.animationTimer = new System.Windows.Forms.Timer(this.components);49 47 this.tableLayoutPanel = new System.Windows.Forms.TableLayoutPanel(); 50 48 this.updateButton = new System.Windows.Forms.Button(); … … 56 54 this.episodeEndTextbox = new System.Windows.Forms.TextBox(); 57 55 this.trackBar = new System.Windows.Forms.TrackBar(); 56 this.errorLabel = new System.Windows.Forms.Label(); 58 57 ((System.ComponentModel.ISupportInitialize)(this.trackBar)).BeginInit(); 59 58 this.SuspendLayout(); 60 //61 // animationTimer62 //63 this.animationTimer.Interval = 15;64 59 // 65 60 // tableLayoutPanel … … 68 63 | System.Windows.Forms.AnchorStyles.Left) 69 64 | System.Windows.Forms.AnchorStyles.Right))); 65 this.tableLayoutPanel.AutoScroll = true; 70 66 this.tableLayoutPanel.ColumnCount = 1; 71 67 this.tableLayoutPanel.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 50F)); 72 this.tableLayoutPanel.GrowStyle = System.Windows.Forms.TableLayoutPanelGrowStyle.FixedSize;73 68 this.tableLayoutPanel.Location = new System.Drawing.Point(0, 109); 74 69 this.tableLayoutPanel.Name = "tableLayoutPanel"; … … 152 147 this.trackBar.ValueChanged += new System.EventHandler(this.trackBar_Validated); 153 148 // 149 // errorLabel 150 // 151 this.errorLabel.AutoSize = true; 152 this.errorLabel.Location = new System.Drawing.Point(190, 35); 153 this.errorLabel.Name = "errorLabel"; 154 this.errorLabel.Size = new System.Drawing.Size(48, 13); 155 this.errorLabel.TabIndex = 9; 156 this.errorLabel.Text = "SNMSE:"; 157 // 154 158 // SolutionView 155 159 // 156 160 this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Inherit; 161 this.Controls.Add(this.errorLabel); 157 162 this.Controls.Add(this.trackBar); 158 163 this.Controls.Add(this.endLabel); … … 173 178 174 179 #endregion 175 private System.Windows.Forms.Timer animationTimer;176 180 private System.Windows.Forms.TableLayoutPanel tableLayoutPanel; 177 181 private System.Windows.Forms.Button updateButton; … … 183 187 private System.Windows.Forms.TextBox episodeEndTextbox; 184 188 private System.Windows.Forms.TrackBar trackBar; 189 private System.Windows.Forms.Label errorLabel; 185 190 } 186 191 } -
branches/2925_AutoDiffForDynamicalModels/HeuristicLab.Problems.DynamicalSystemsModelling/3.3/SolutionView.cs
r16399 r16400 72 72 // trackBar.Value = predictionEpisode.Start; 73 73 74 var predictions = Content.Predict(predictionEpisode, forecastHorizon).ToArray(); 74 double snmse; 75 var predictions = Content.Predict(predictionEpisode, forecastHorizon, out snmse).ToArray(); 76 errorLabel.Text = $"SNMSE: {snmse:e4}"; 75 77 var trainingPredictions = predictions.Take(predictionEpisode.Size).ToArray(); 76 78 var forecastPredictions = predictions.Skip(predictionEpisode.Size).ToArray(); -
branches/2925_AutoDiffForDynamicalModels/HeuristicLab.Problems.DynamicalSystemsModelling/3.3/SolutionView.resx
r16399 r16400 118 118 <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> 119 119 </resheader> 120 <metadata name="animationTimer.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">121 <value>17, 17</value>122 </metadata>123 120 </root>
Note: See TracChangeset
for help on using the changeset viewer.