Changeset 2378 for trunk/sources
- Timestamp:
- 09/22/09 13:47:46 (15 years ago)
- Location:
- trunk/sources/HeuristicLab.CEDMA.Server/3.3
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.CEDMA.Server/3.3/DispatcherView.Designer.cs
r2375 r2378 51 51 this.testLabel = new System.Windows.Forms.Label(); 52 52 this.setAllButton = new System.Windows.Forms.Button(); 53 this.setAlgorithmDefault = new System.Windows.Forms.Button(); 53 54 this.splitContainer.Panel1.SuspendLayout(); 54 55 this.splitContainer.Panel2.SuspendLayout(); … … 129 130 // 130 131 this.learningTaskGroupBox.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); 132 this.learningTaskGroupBox.Controls.Add(this.setAlgorithmDefault); 131 133 this.learningTaskGroupBox.Controls.Add(this.autoregressiveLabel); 132 134 this.learningTaskGroupBox.Controls.Add(this.classificationRadioButton); … … 178 180 this.algorithmsListBox.Location = new System.Drawing.Point(6, 155); 179 181 this.algorithmsListBox.Name = "algorithmsListBox"; 180 this.algorithmsListBox.Size = new System.Drawing.Size(331, 1 54);182 this.algorithmsListBox.Size = new System.Drawing.Size(331, 124); 181 183 this.algorithmsListBox.TabIndex = 4; 182 184 this.algorithmsListBox.ItemCheck += new System.Windows.Forms.ItemCheckEventHandler(this.algorithmsListBox_ItemCheck); … … 367 369 this.setAllButton.UseVisualStyleBackColor = true; 368 370 this.setAllButton.Click += new System.EventHandler(this.setAllButton_Click); 371 // 372 // setAlgorithmDefault 373 // 374 this.setAlgorithmDefault.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); 375 this.setAlgorithmDefault.Location = new System.Drawing.Point(6, 292); 376 this.setAlgorithmDefault.Name = "setAlgorithmDefault"; 377 this.setAlgorithmDefault.Size = new System.Drawing.Size(96, 23); 378 this.setAlgorithmDefault.TabIndex = 36; 379 this.setAlgorithmDefault.Text = "Use as default"; 380 this.setAlgorithmDefault.UseVisualStyleBackColor = true; 381 this.setAlgorithmDefault.Click += new System.EventHandler(this.setAlgorithmDefault_Click); 369 382 // 370 383 // DispatcherView … … 417 430 private System.Windows.Forms.RadioButton timeSeriesRadioButton; 418 431 private System.Windows.Forms.CheckBox autoregressiveCheckBox; 432 private System.Windows.Forms.Button setAlgorithmDefault; 419 433 } 420 434 } -
trunk/sources/HeuristicLab.CEDMA.Server/3.3/DispatcherView.cs
r2377 r2378 125 125 } 126 126 } 127 } 128 } 129 130 131 private void setAlgorithmDefault_Click(object sender, EventArgs e) { 132 foreach (string targetVar in dispatcher.TargetVariables) { 133 ProblemSpecification spec = dispatcher.GetProblemSpecification(targetVar); 134 spec.LearningTask = selectedSpec.LearningTask; 135 spec.MinTimeOffset = selectedSpec.MinTimeOffset; 136 spec.MaxTimeOffset = selectedSpec.MaxTimeOffset; 137 spec.AutoRegressive = selectedSpec.AutoRegressive; 138 var allowedAlgos = dispatcher.GetAllowedAlgorithms(selectedSpec.TargetVariable); 139 foreach(var algo in allowedAlgos) 140 dispatcher.EnableAlgorithm(spec.TargetVariable, algo); 127 141 } 128 142 } … … 226 240 return y0 > x1; 227 241 } 242 228 243 } 229 244 } -
trunk/sources/HeuristicLab.CEDMA.Server/3.3/SimpleDispatcher.cs
r2377 r2378 189 189 timeSeriesAlgo.MinTimeOffset = spec.MinTimeOffset; 190 190 timeSeriesAlgo.MaxTimeOffset = spec.MaxTimeOffset; 191 timeSeriesAlgo.TrainingSamplesStart = spec.TrainingSamplesStart - spec.MinTimeOffset +1 ; // first possible index is 1 because of differential symbol 191 192 if (spec.AutoRegressive) { 192 193 allowedFeatures.Add(spec.Dataset.GetVariableIndex(spec.TargetVariable)); … … 224 225 public void EnableAlgorithm(string targetVariable, HeuristicLab.Modeling.IAlgorithm algo) { 225 226 if (!algorithms.ContainsKey(targetVariable)) algorithms.Add(targetVariable, new List<HeuristicLab.Modeling.IAlgorithm>()); 227 if(!algorithms[targetVariable].Contains(algo)) 226 228 algorithms[targetVariable].Add(algo); 227 229 }
Note: See TracChangeset
for help on using the changeset viewer.