Changeset 2843 for trunk/sources/HeuristicLab.CEDMA.Server/3.3
- Timestamp:
- 02/19/10 18:49:17 (14 years ago)
- Location:
- trunk/sources/HeuristicLab.CEDMA.Server/3.3
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.CEDMA.Server/3.3/DispatcherView.Designer.cs
r2824 r2843 24 24 /// </summary> 25 25 private void InitializeComponent() { 26 this.components = new System.ComponentModel.Container(); 26 27 this.targetVariableList = new System.Windows.Forms.CheckedListBox(); 27 28 this.inputVariableList = new System.Windows.Forms.CheckedListBox(); … … 30 31 this.splitContainer = new System.Windows.Forms.SplitContainer(); 31 32 this.learningTaskGroupBox = new System.Windows.Forms.GroupBox(); 33 this.editEngineButton = new System.Windows.Forms.Button(); 32 34 this.setAlgorithmDefault = new System.Windows.Forms.Button(); 33 35 this.autoregressiveLabel = new System.Windows.Forms.Label(); 34 36 this.classificationRadioButton = new System.Windows.Forms.RadioButton(); 35 37 this.algorithmsListBox = new System.Windows.Forms.CheckedListBox(); 36 this.minTimeOffsetLabel = new System.Windows.Forms.Label();37 this.minTimeOffsetTextBox = new System.Windows.Forms.TextBox();38 this.maxTimeOffsetLabel = new System.Windows.Forms.Label();39 38 this.regressionRadioButton = new System.Windows.Forms.RadioButton(); 40 this.maxTimeOffsetTextBox = new System.Windows.Forms.TextBox();41 39 this.timeSeriesRadioButton = new System.Windows.Forms.RadioButton(); 42 40 this.autoregressiveCheckBox = new System.Windows.Forms.CheckBox(); … … 52 50 this.testLabel = new System.Windows.Forms.Label(); 53 51 this.setAllButton = new System.Windows.Forms.Button(); 54 this.e ditEngineButton = new System.Windows.Forms.Button();52 this.errorProvider = new System.Windows.Forms.ErrorProvider(this.components); 55 53 this.splitContainer.Panel1.SuspendLayout(); 56 54 this.splitContainer.Panel2.SuspendLayout(); … … 58 56 this.learningTaskGroupBox.SuspendLayout(); 59 57 this.partitioningGroupBox.SuspendLayout(); 58 ((System.ComponentModel.ISupportInitialize)(this.errorProvider)).BeginInit(); 60 59 this.SuspendLayout(); 61 60 // … … 136 135 this.learningTaskGroupBox.Controls.Add(this.classificationRadioButton); 137 136 this.learningTaskGroupBox.Controls.Add(this.algorithmsListBox); 138 this.learningTaskGroupBox.Controls.Add(this.minTimeOffsetLabel);139 this.learningTaskGroupBox.Controls.Add(this.minTimeOffsetTextBox);140 this.learningTaskGroupBox.Controls.Add(this.maxTimeOffsetLabel);141 137 this.learningTaskGroupBox.Controls.Add(this.regressionRadioButton); 142 this.learningTaskGroupBox.Controls.Add(this.maxTimeOffsetTextBox);143 138 this.learningTaskGroupBox.Controls.Add(this.timeSeriesRadioButton); 144 139 this.learningTaskGroupBox.Controls.Add(this.autoregressiveCheckBox); … … 146 141 this.learningTaskGroupBox.Location = new System.Drawing.Point(6, 236); 147 142 this.learningTaskGroupBox.Name = "learningTaskGroupBox"; 148 this.learningTaskGroupBox.Size = new System.Drawing.Size(343, 3 21);143 this.learningTaskGroupBox.Size = new System.Drawing.Size(343, 341); 149 144 this.learningTaskGroupBox.TabIndex = 36; 150 145 this.learningTaskGroupBox.TabStop = false; 151 146 this.learningTaskGroupBox.Text = "Learning task"; 152 147 // 148 // editEngineButton 149 // 150 this.editEngineButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); 151 this.editEngineButton.Location = new System.Drawing.Point(108, 312); 152 this.editEngineButton.Name = "editEngineButton"; 153 this.editEngineButton.Size = new System.Drawing.Size(75, 23); 154 this.editEngineButton.TabIndex = 37; 155 this.editEngineButton.Text = "Edit engine"; 156 this.editEngineButton.UseVisualStyleBackColor = true; 157 this.editEngineButton.Click += new System.EventHandler(this.editEngineButton_Click); 158 // 153 159 // setAlgorithmDefault 154 160 // 155 161 this.setAlgorithmDefault.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); 156 this.setAlgorithmDefault.Location = new System.Drawing.Point(6, 292);162 this.setAlgorithmDefault.Location = new System.Drawing.Point(6, 312); 157 163 this.setAlgorithmDefault.Name = "setAlgorithmDefault"; 158 164 this.setAlgorithmDefault.Size = new System.Drawing.Size(96, 23); … … 191 197 this.algorithmsListBox.FormattingEnabled = true; 192 198 this.algorithmsListBox.HorizontalScrollbar = true; 193 this.algorithmsListBox.Location = new System.Drawing.Point(6, 1 55);199 this.algorithmsListBox.Location = new System.Drawing.Point(6, 110); 194 200 this.algorithmsListBox.Name = "algorithmsListBox"; 195 this.algorithmsListBox.Size = new System.Drawing.Size(331, 1 24);201 this.algorithmsListBox.Size = new System.Drawing.Size(331, 184); 196 202 this.algorithmsListBox.TabIndex = 4; 197 203 this.algorithmsListBox.SelectedIndexChanged += new System.EventHandler(this.algorithmsListBox_SelectedIndexChanged); 198 204 this.algorithmsListBox.ItemCheck += new System.Windows.Forms.ItemCheckEventHandler(this.algorithmsListBox_ItemCheck); 199 //200 // minTimeOffsetLabel201 //202 this.minTimeOffsetLabel.AutoSize = true;203 this.minTimeOffsetLabel.Enabled = false;204 this.minTimeOffsetLabel.Location = new System.Drawing.Point(38, 106);205 this.minTimeOffsetLabel.Name = "minTimeOffsetLabel";206 this.minTimeOffsetLabel.Size = new System.Drawing.Size(87, 13);207 this.minTimeOffsetLabel.TabIndex = 31;208 this.minTimeOffsetLabel.Text = "Min. Time Offset:";209 //210 // minTimeOffsetTextBox211 //212 this.minTimeOffsetTextBox.Enabled = false;213 this.minTimeOffsetTextBox.Location = new System.Drawing.Point(131, 103);214 this.minTimeOffsetTextBox.Name = "minTimeOffsetTextBox";215 this.minTimeOffsetTextBox.Size = new System.Drawing.Size(96, 20);216 this.minTimeOffsetTextBox.TabIndex = 32;217 this.minTimeOffsetTextBox.Validated += new System.EventHandler(this.timeOffsetTextBox_Validated);218 this.minTimeOffsetTextBox.Validating += new System.ComponentModel.CancelEventHandler(this.timeOffsetTextBox_Validating);219 //220 // maxTimeOffsetLabel221 //222 this.maxTimeOffsetLabel.AutoSize = true;223 this.maxTimeOffsetLabel.Enabled = false;224 this.maxTimeOffsetLabel.Location = new System.Drawing.Point(35, 132);225 this.maxTimeOffsetLabel.Name = "maxTimeOffsetLabel";226 this.maxTimeOffsetLabel.Size = new System.Drawing.Size(90, 13);227 this.maxTimeOffsetLabel.TabIndex = 33;228 this.maxTimeOffsetLabel.Text = "Max. Time Offset:";229 205 // 230 206 // regressionRadioButton … … 238 214 this.regressionRadioButton.UseVisualStyleBackColor = true; 239 215 this.regressionRadioButton.CheckedChanged += new System.EventHandler(this.radioButton_CheckedChanged); 240 //241 // maxTimeOffsetTextBox242 //243 this.maxTimeOffsetTextBox.Enabled = false;244 this.maxTimeOffsetTextBox.Location = new System.Drawing.Point(131, 129);245 this.maxTimeOffsetTextBox.Name = "maxTimeOffsetTextBox";246 this.maxTimeOffsetTextBox.Size = new System.Drawing.Size(96, 20);247 this.maxTimeOffsetTextBox.TabIndex = 34;248 this.maxTimeOffsetTextBox.Validated += new System.EventHandler(this.timeOffsetTextBox_Validated);249 this.maxTimeOffsetTextBox.Validating += new System.ComponentModel.CancelEventHandler(this.timeOffsetTextBox_Validating);250 216 // 251 217 // timeSeriesRadioButton … … 285 251 this.partitioningGroupBox.Controls.Add(this.testLabel); 286 252 this.partitioningGroupBox.Enabled = false; 287 this.partitioningGroupBox.Location = new System.Drawing.Point(6, 5 63);253 this.partitioningGroupBox.Location = new System.Drawing.Point(6, 583); 288 254 this.partitioningGroupBox.Name = "partitioningGroupBox"; 289 this.partitioningGroupBox.Size = new System.Drawing.Size(343, 1 22);255 this.partitioningGroupBox.Size = new System.Drawing.Size(343, 102); 290 256 this.partitioningGroupBox.TabIndex = 26; 291 257 this.partitioningGroupBox.TabStop = false; … … 294 260 // validationSamplesEndTextBox 295 261 // 296 this.validationSamplesEndTextBox.Location = new System.Drawing.Point(22 1, 43);262 this.validationSamplesEndTextBox.Location = new System.Drawing.Point(222, 45); 297 263 this.validationSamplesEndTextBox.Name = "validationSamplesEndTextBox"; 298 264 this.validationSamplesEndTextBox.Size = new System.Drawing.Size(96, 20); … … 304 270 // 305 271 this.trainingLabel.AutoSize = true; 306 this.trainingLabel.Location = new System.Drawing.Point(1 3, 20);272 this.trainingLabel.Location = new System.Drawing.Point(14, 22); 307 273 this.trainingLabel.Name = "trainingLabel"; 308 274 this.trainingLabel.Size = new System.Drawing.Size(89, 13); … … 312 278 // trainingSamplesStartTextBox 313 279 // 314 this.trainingSamplesStartTextBox.Location = new System.Drawing.Point(1 19, 17);280 this.trainingSamplesStartTextBox.Location = new System.Drawing.Point(120, 19); 315 281 this.trainingSamplesStartTextBox.Name = "trainingSamplesStartTextBox"; 316 282 this.trainingSamplesStartTextBox.Size = new System.Drawing.Size(96, 20); … … 321 287 // trainingSamplesEndTextBox 322 288 // 323 this.trainingSamplesEndTextBox.Location = new System.Drawing.Point(22 1, 17);289 this.trainingSamplesEndTextBox.Location = new System.Drawing.Point(222, 19); 324 290 this.trainingSamplesEndTextBox.Name = "trainingSamplesEndTextBox"; 325 291 this.trainingSamplesEndTextBox.Size = new System.Drawing.Size(96, 20); … … 331 297 // 332 298 this.validationLabel.AutoSize = true; 333 this.validationLabel.Location = new System.Drawing.Point( 5, 46);299 this.validationLabel.Location = new System.Drawing.Point(6, 48); 334 300 this.validationLabel.Name = "validationLabel"; 335 301 this.validationLabel.Size = new System.Drawing.Size(97, 13); … … 339 305 // testSamplesEndTextBox 340 306 // 341 this.testSamplesEndTextBox.Location = new System.Drawing.Point(22 1, 68);307 this.testSamplesEndTextBox.Location = new System.Drawing.Point(222, 70); 342 308 this.testSamplesEndTextBox.Name = "testSamplesEndTextBox"; 343 309 this.testSamplesEndTextBox.Size = new System.Drawing.Size(96, 20); … … 348 314 // validationSamplesStartTextBox 349 315 // 350 this.validationSamplesStartTextBox.Location = new System.Drawing.Point(1 19, 43);316 this.validationSamplesStartTextBox.Location = new System.Drawing.Point(120, 45); 351 317 this.validationSamplesStartTextBox.Name = "validationSamplesStartTextBox"; 352 318 this.validationSamplesStartTextBox.Size = new System.Drawing.Size(96, 20); … … 357 323 // testSamplesStartTextBox 358 324 // 359 this.testSamplesStartTextBox.Location = new System.Drawing.Point(1 19, 68);325 this.testSamplesStartTextBox.Location = new System.Drawing.Point(120, 70); 360 326 this.testSamplesStartTextBox.Name = "testSamplesStartTextBox"; 361 327 this.testSamplesStartTextBox.Size = new System.Drawing.Size(96, 20); … … 367 333 // 368 334 this.testLabel.AutoSize = true; 369 this.testLabel.Location = new System.Drawing.Point(3 0, 71);335 this.testLabel.Location = new System.Drawing.Point(31, 73); 370 336 this.testLabel.Name = "testLabel"; 371 337 this.testLabel.Size = new System.Drawing.Size(72, 13); … … 384 350 this.setAllButton.Click += new System.EventHandler(this.setAllButton_Click); 385 351 // 386 // editEngineButton 387 // 388 this.editEngineButton.Location = new System.Drawing.Point(108, 292); 389 this.editEngineButton.Name = "editEngineButton"; 390 this.editEngineButton.Size = new System.Drawing.Size(75, 23); 391 this.editEngineButton.TabIndex = 37; 392 this.editEngineButton.Text = "Edit engine"; 393 this.editEngineButton.UseVisualStyleBackColor = true; 394 this.editEngineButton.Click += new System.EventHandler(this.editEngineButton_Click); 352 // errorProvider 353 // 354 this.errorProvider.ContainerControl = this; 395 355 // 396 356 // DispatcherView … … 410 370 this.partitioningGroupBox.ResumeLayout(false); 411 371 this.partitioningGroupBox.PerformLayout(); 372 ((System.ComponentModel.ISupportInitialize)(this.errorProvider)).EndInit(); 412 373 this.ResumeLayout(false); 413 374 … … 436 397 private System.Windows.Forms.Label autoregressiveLabel; 437 398 private System.Windows.Forms.RadioButton classificationRadioButton; 438 private System.Windows.Forms.Label minTimeOffsetLabel;439 private System.Windows.Forms.TextBox minTimeOffsetTextBox;440 private System.Windows.Forms.Label maxTimeOffsetLabel;441 399 private System.Windows.Forms.RadioButton regressionRadioButton; 442 private System.Windows.Forms.TextBox maxTimeOffsetTextBox;443 400 private System.Windows.Forms.RadioButton timeSeriesRadioButton; 444 401 private System.Windows.Forms.CheckBox autoregressiveCheckBox; 445 402 private System.Windows.Forms.Button setAlgorithmDefault; 446 403 private System.Windows.Forms.Button editEngineButton; 404 private System.Windows.Forms.ErrorProvider errorProvider; 447 405 } 448 406 } -
trunk/sources/HeuristicLab.CEDMA.Server/3.3/DispatcherView.cs
r2824 r2843 102 102 testSamplesStartTextBox.Text = selectedSpec.TestSamplesStart.ToString(); 103 103 testSamplesEndTextBox.Text = selectedSpec.TestSamplesEnd.ToString(); 104 minTimeOffsetTextBox.Text = selectedSpec.MinTimeOffset.ToString();105 maxTimeOffsetTextBox.Text = selectedSpec.MaxTimeOffset.ToString();106 104 autoregressiveCheckBox.Checked = selectedSpec.AutoRegressive; 107 105 } … … 136 134 ProblemSpecification spec = dispatcher.GetProblemSpecification(targetVar); 137 135 spec.LearningTask = selectedSpec.LearningTask; 138 spec.MinTimeOffset = selectedSpec.MinTimeOffset;139 spec.MaxTimeOffset = selectedSpec.MaxTimeOffset;140 136 spec.AutoRegressive = selectedSpec.AutoRegressive; 141 137 var curAllowedAlgos = dispatcher.GetAllowedAlgorithms(targetVar).ToList(); … … 157 153 158 154 private void radioButton_CheckedChanged(object sender, EventArgs e) { 159 minTimeOffsetLabel.Enabled = timeSeriesRadioButton.Checked;160 minTimeOffsetTextBox.Enabled = timeSeriesRadioButton.Checked;161 maxTimeOffsetLabel.Enabled = timeSeriesRadioButton.Checked;162 maxTimeOffsetTextBox.Enabled = timeSeriesRadioButton.Checked;163 155 autoregressiveCheckBox.Enabled = timeSeriesRadioButton.Checked; 164 156 autoregressiveLabel.Enabled = timeSeriesRadioButton.Checked; … … 171 163 } 172 164 UpdateAlgorithms(); 173 }174 175 private void timeOffsetTextBox_Validating(object sender, CancelEventArgs e) {176 int min, max;177 e.Cancel = !int.TryParse(minTimeOffsetTextBox.Text, out min);178 e.Cancel = !int.TryParse(maxTimeOffsetTextBox.Text, out max);179 e.Cancel = min > max;180 }181 182 private void timeOffsetTextBox_Validated(object sender, EventArgs e) {183 selectedSpec.MinTimeOffset = int.Parse(minTimeOffsetTextBox.Text);184 selectedSpec.MaxTimeOffset = int.Parse(maxTimeOffsetTextBox.Text);185 165 } 186 166 … … 255 235 editEngineButton.Enabled = algorithmsListBox.SelectedItems.Count > 0; 256 236 } 257 258 237 } 259 238 } -
trunk/sources/HeuristicLab.CEDMA.Server/3.3/DispatcherView.resx
r2088 r2843 118 118 <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> 119 119 </resheader> 120 <metadata name="errorProvider.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> 121 <value>17, 17</value> 122 </metadata> 120 123 </root> -
trunk/sources/HeuristicLab.CEDMA.Server/3.3/ProblemSpecification.cs
r2422 r2843 83 83 } 84 84 85 public int MaxTimeOffset { get; set; }86 public int MinTimeOffset { get; set; }87 88 85 public bool AutoRegressive { get; set; } 89 86 … … 108 105 LearningTask = original.LearningTask; 109 106 TargetVariable = original.TargetVariable; 110 MinTimeOffset = original.MinTimeOffset;111 MaxTimeOffset = original.MaxTimeOffset;112 107 AutoRegressive = original.AutoRegressive; 113 108 TrainingSamplesStart = original.TrainingSamplesStart; … … 134 129 return 135 130 other.LearningTask == LearningTask && 136 other.MinTimeOffset == MinTimeOffset &&137 other.MaxTimeOffset == MaxTimeOffset &&138 131 other.AutoRegressive == AutoRegressive && 139 132 other.TargetVariable == TargetVariable && … … 156 149 LearningTask.GetHashCode() | 157 150 TargetVariable.GetHashCode() | 158 MinTimeOffset.GetHashCode() |159 MaxTimeOffset.GetHashCode() |160 151 AutoRegressive.GetHashCode() | 161 152 TrainingSamplesStart.GetHashCode() | -
trunk/sources/HeuristicLab.CEDMA.Server/3.3/SimpleDispatcher.cs
r2825 r2843 106 106 private object locker = new object(); 107 107 108 109 public double TrainingSetPercentageSize { 110 get; 111 set; 112 } 113 114 public int SkippedRowsBeginning { 115 get; 116 set; 117 } 118 119 public int SkippedRowsEnd { 120 get; 121 set; 122 } 123 108 124 public SimpleDispatcher(IModelingDatabase database, Dataset dataset) { 109 125 this.dataset = dataset; … … 117 133 finishedAndDispatchedRuns = new Dictionary<string, List<AlgorithmConfiguration>>(); 118 134 119 135 120 136 defaultAlgorithms = ApplicationManager.Manager.GetInstances<HeuristicLab.Modeling.IAlgorithm>().ToArray(); 137 138 TrainingSetPercentageSize = 0.5; 139 SkippedRowsBeginning = 2; 121 140 122 141 // PopulateFinishedRuns(); … … 190 209 191 210 if (spec.LearningTask == LearningTask.TimeSeries) { 192 ITimeSeriesAlgorithm timeSeriesAlgo = (ITimeSeriesAlgorithm)algo; 193 timeSeriesAlgo.MinTimeOffset = spec.MinTimeOffset; 194 timeSeriesAlgo.MaxTimeOffset = spec.MaxTimeOffset; 195 timeSeriesAlgo.TrainingSamplesStart = spec.TrainingSamplesStart - spec.MinTimeOffset + 1; // first possible index is 1 because of differential symbol 211 algo.TrainingSamplesStart = spec.TrainingSamplesStart + 1; // first possible index is 1 because of differential symbol 196 212 if (spec.AutoRegressive) { 197 213 allowedFeatures.Add(spec.TargetVariable); … … 255 271 if (!(double.IsNaN(x) || double.IsInfinity(x))) break; 256 272 } 273 firstValueIndex += SkippedRowsBeginning; 257 274 // find index of last correct target value 258 275 int lastValueIndex; … … 261 278 if (!(double.IsNaN(x) || double.IsInfinity(x))) break; 262 279 } 280 lastValueIndex -= SkippedRowsEnd; 263 281 264 282 int validTargetRange = lastValueIndex - firstValueIndex; 265 283 spec.TrainingSamplesStart = firstValueIndex; 266 spec.TrainingSamplesEnd = firstValueIndex + (int)Math.Floor(validTargetRange * 0.5);284 spec.TrainingSamplesEnd = firstValueIndex + (int)Math.Floor(validTargetRange * TrainingSetPercentageSize); 267 285 spec.ValidationSamplesStart = spec.TrainingSamplesEnd; 268 spec.ValidationSamplesEnd = firstValueIndex + (int)Math.Floor(validTargetRange * 0.75);286 spec.ValidationSamplesEnd = spec.TrainingSamplesEnd + (int)Math.Floor(validTargetRange * (1 - TrainingSetPercentageSize) / 2.0); 269 287 spec.TestSamplesStart = spec.ValidationSamplesEnd; 270 288 spec.TestSamplesEnd = lastValueIndex;
Note: See TracChangeset
for help on using the changeset viewer.