Changeset 14864
- Timestamp:
- 04/13/17 15:16:43 (8 years ago)
- Location:
- trunk/sources
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Algorithms.DataAnalysis.Views/3.4/CrossValidationView.Designer.cs
r14185 r14864 46 46 /// </summary> 47 47 private void InitializeComponent() { 48 System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(CrossValidationView)); 48 49 this.startButton = new System.Windows.Forms.Button(); 49 50 this.pauseButton = new System.Windows.Forms.Button(); … … 79 80 this.openFileDialog = new System.Windows.Forms.OpenFileDialog(); 80 81 this.splitContainer = new System.Windows.Forms.SplitContainer(); 82 this.shuffleSamplesCheckBox = new System.Windows.Forms.CheckBox(); 81 83 ((System.ComponentModel.ISupportInitialize)(this.errorProvider)).BeginInit(); 82 84 ((System.ComponentModel.ISupportInitialize)(this.foldsNumericUpDown)).BeginInit(); … … 109 111 // 110 112 this.startButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); 111 this.startButton.Image = HeuristicLab.Common.Resources.VSImageLibrary.Play;113 this.startButton.Image = ((System.Drawing.Image)(resources.GetObject("startButton.Image"))); 112 114 this.startButton.Location = new System.Drawing.Point(0, 514); 113 115 this.startButton.Name = "startButton"; … … 120 122 // 121 123 this.pauseButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); 122 this.pauseButton.Image = HeuristicLab.Common.Resources.VSImageLibrary.Pause;124 this.pauseButton.Image = ((System.Drawing.Image)(resources.GetObject("pauseButton.Image"))); 123 125 this.pauseButton.Location = new System.Drawing.Point(30, 514); 124 126 this.pauseButton.Name = "pauseButton"; … … 131 133 // 132 134 this.stopButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); 133 this.stopButton.Image = HeuristicLab.Common.Resources.VSImageLibrary.Stop;135 this.stopButton.Image = ((System.Drawing.Image)(resources.GetObject("stopButton.Image"))); 134 136 this.stopButton.Location = new System.Drawing.Point(60, 514); 135 137 this.stopButton.Name = "stopButton"; … … 142 144 // 143 145 this.resetButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); 144 this.resetButton.Image = HeuristicLab.Common.Resources.VSImageLibrary.Restart;146 this.resetButton.Image = ((System.Drawing.Image)(resources.GetObject("resetButton.Image"))); 145 147 this.resetButton.Location = new System.Drawing.Point(90, 514); 146 148 this.resetButton.Name = "resetButton"; … … 171 173 // foldsNumericUpDown 172 174 // 173 this.foldsNumericUpDown.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) 174 175 this.foldsNumericUpDown.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) 176 | System.Windows.Forms.AnchorStyles.Right))); 175 177 this.foldsNumericUpDown.Location = new System.Drawing.Point(55, 26); 176 178 this.foldsNumericUpDown.Maximum = new decimal(new int[] { … … 185 187 0}); 186 188 this.foldsNumericUpDown.Name = "foldsNumericUpDown"; 187 this.foldsNumericUpDown.Size = new System.Drawing.Size( 248, 20);189 this.foldsNumericUpDown.Size = new System.Drawing.Size(154, 20); 188 190 this.foldsNumericUpDown.TabIndex = 3; 189 191 this.foldsNumericUpDown.ThousandsSeparator = true; … … 207 209 // workersNumericUpDown 208 210 // 209 this.workersNumericUpDown.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) 210 211 this.workersNumericUpDown.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) 212 | System.Windows.Forms.AnchorStyles.Right))); 211 213 this.workersNumericUpDown.Location = new System.Drawing.Point(55, 0); 212 214 this.workersNumericUpDown.Maximum = new decimal(new int[] { … … 261 263 // samplesEndStringConvertibleValueView 262 264 // 263 this.samplesEndStringConvertibleValueView.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) 264 265 this.samplesEndStringConvertibleValueView.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) 266 | System.Windows.Forms.AnchorStyles.Right))); 265 267 this.samplesEndStringConvertibleValueView.Caption = "StringConvertibleValue View"; 266 268 this.samplesEndStringConvertibleValueView.Content = null; … … 274 276 // samplesStartStringConvertibleValueView 275 277 // 276 this.samplesStartStringConvertibleValueView.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) 277 278 this.samplesStartStringConvertibleValueView.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) 279 | System.Windows.Forms.AnchorStyles.Right))); 278 280 this.samplesStartStringConvertibleValueView.Caption = "StringConvertibleValue View"; 279 281 this.samplesStartStringConvertibleValueView.Content = null; … … 288 290 // 289 291 this.tabControl.AllowDrop = true; 290 this.tabControl.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 291 | System.Windows.Forms.AnchorStyles.Left)292 292 this.tabControl.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 293 | System.Windows.Forms.AnchorStyles.Left) 294 | System.Windows.Forms.AnchorStyles.Right))); 293 295 this.tabControl.Controls.Add(this.algorithmTabPage); 294 296 this.tabControl.Controls.Add(this.resultsTabPage); 295 297 this.tabControl.Controls.Add(this.runsTabPage); 296 this.tabControl.Location = new System.Drawing.Point(0, 87);298 this.tabControl.Location = new System.Drawing.Point(0, 115); 297 299 this.tabControl.Name = "tabControl"; 298 300 this.tabControl.SelectedIndex = 0; 299 this.tabControl.Size = new System.Drawing.Size(616, 421);301 this.tabControl.Size = new System.Drawing.Size(616, 393); 300 302 this.tabControl.TabIndex = 4; 301 303 // … … 310 312 this.algorithmTabPage.Name = "algorithmTabPage"; 311 313 this.algorithmTabPage.Padding = new System.Windows.Forms.Padding(3); 312 this.algorithmTabPage.Size = new System.Drawing.Size(608, 3 95);314 this.algorithmTabPage.Size = new System.Drawing.Size(608, 367); 313 315 this.algorithmTabPage.TabIndex = 0; 314 316 this.algorithmTabPage.Text = "Algorithm"; … … 320 322 // algorithmNamedItemView 321 323 // 322 this.algorithmNamedItemView.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) 323 324 this.algorithmNamedItemView.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) 325 | System.Windows.Forms.AnchorStyles.Right))); 324 326 this.algorithmNamedItemView.Caption = "NamedItem View"; 325 327 this.algorithmNamedItemView.Content = null; … … 333 335 // 334 336 this.algorithmTabControl.AllowDrop = true; 335 this.algorithmTabControl.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 336 | System.Windows.Forms.AnchorStyles.Left)337 337 this.algorithmTabControl.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 338 | System.Windows.Forms.AnchorStyles.Left) 339 | System.Windows.Forms.AnchorStyles.Right))); 338 340 this.algorithmTabControl.Controls.Add(this.algorithmProblemTabPage); 339 341 this.algorithmTabControl.Controls.Add(this.algorithmParametersTabPage); … … 341 343 this.algorithmTabControl.Name = "algorithmTabControl"; 342 344 this.algorithmTabControl.SelectedIndex = 0; 343 this.algorithmTabControl.Size = new System.Drawing.Size(594, 324);345 this.algorithmTabControl.Size = new System.Drawing.Size(594, 296); 344 346 this.algorithmTabControl.TabIndex = 3; 345 347 // … … 353 355 this.algorithmProblemTabPage.Name = "algorithmProblemTabPage"; 354 356 this.algorithmProblemTabPage.Padding = new System.Windows.Forms.Padding(3); 355 this.algorithmProblemTabPage.Size = new System.Drawing.Size(586, 2 98);357 this.algorithmProblemTabPage.Size = new System.Drawing.Size(586, 270); 356 358 this.algorithmProblemTabPage.TabIndex = 0; 357 359 this.algorithmProblemTabPage.Text = "Problem"; … … 363 365 // openProblemButton 364 366 // 365 this.openProblemButton.Image = HeuristicLab.Common.Resources.VSImageLibrary.Open;367 this.openProblemButton.Image = ((System.Drawing.Image)(resources.GetObject("openProblemButton.Image"))); 366 368 this.openProblemButton.Location = new System.Drawing.Point(36, 6); 367 369 this.openProblemButton.Name = "openProblemButton"; … … 374 376 // algorithmProblemViewHost 375 377 // 376 this.algorithmProblemViewHost.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 377 | System.Windows.Forms.AnchorStyles.Left)378 378 this.algorithmProblemViewHost.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 379 | System.Windows.Forms.AnchorStyles.Left) 380 | System.Windows.Forms.AnchorStyles.Right))); 379 381 this.algorithmProblemViewHost.Caption = "View"; 380 382 this.algorithmProblemViewHost.Content = null; … … 383 385 this.algorithmProblemViewHost.Name = "algorithmProblemViewHost"; 384 386 this.algorithmProblemViewHost.ReadOnly = false; 385 this.algorithmProblemViewHost.Size = new System.Drawing.Size(574, 2 56);387 this.algorithmProblemViewHost.Size = new System.Drawing.Size(574, 228); 386 388 this.algorithmProblemViewHost.TabIndex = 2; 387 389 this.algorithmProblemViewHost.ViewsLabelVisible = true; … … 390 392 // newProblemButton 391 393 // 392 this.newProblemButton.Image = HeuristicLab.Common.Resources.VSImageLibrary.NewDocument;394 this.newProblemButton.Image = ((System.Drawing.Image)(resources.GetObject("newProblemButton.Image"))); 393 395 this.newProblemButton.Location = new System.Drawing.Point(6, 6); 394 396 this.newProblemButton.Name = "newProblemButton"; … … 405 407 this.algorithmParametersTabPage.Name = "algorithmParametersTabPage"; 406 408 this.algorithmParametersTabPage.Padding = new System.Windows.Forms.Padding(3); 407 this.algorithmParametersTabPage.Size = new System.Drawing.Size(586, 2 98);409 this.algorithmParametersTabPage.Size = new System.Drawing.Size(586, 270); 408 410 this.algorithmParametersTabPage.TabIndex = 1; 409 411 this.algorithmParametersTabPage.Text = "Parameters"; … … 412 414 // algorithmParameterCollectionView 413 415 // 416 this.algorithmParameterCollectionView.AllowEditingOfHiddenParameters = true; 414 417 this.algorithmParameterCollectionView.Caption = "ParameterCollection View"; 415 418 this.algorithmParameterCollectionView.Content = null; … … 418 421 this.algorithmParameterCollectionView.Name = "algorithmParameterCollectionView"; 419 422 this.algorithmParameterCollectionView.ReadOnly = false; 420 this.algorithmParameterCollectionView.Size = new System.Drawing.Size(580, 292); 423 this.algorithmParameterCollectionView.ShowDetails = true; 424 this.algorithmParameterCollectionView.Size = new System.Drawing.Size(580, 264); 421 425 this.algorithmParameterCollectionView.TabIndex = 0; 422 426 // 423 427 // openAlgorithmButton 424 428 // 425 this.openAlgorithmButton.Image = HeuristicLab.Common.Resources.VSImageLibrary.Open;429 this.openAlgorithmButton.Image = ((System.Drawing.Image)(resources.GetObject("openAlgorithmButton.Image"))); 426 430 this.openAlgorithmButton.Location = new System.Drawing.Point(38, 6); 427 431 this.openAlgorithmButton.Name = "openAlgorithmButton"; … … 434 438 // newAlgorithmButton 435 439 // 436 this.newAlgorithmButton.Image = HeuristicLab.Common.Resources.VSImageLibrary.NewDocument;440 this.newAlgorithmButton.Image = ((System.Drawing.Image)(resources.GetObject("newAlgorithmButton.Image"))); 437 441 this.newAlgorithmButton.Location = new System.Drawing.Point(8, 6); 438 442 this.newAlgorithmButton.Name = "newAlgorithmButton"; … … 449 453 this.resultsTabPage.Name = "resultsTabPage"; 450 454 this.resultsTabPage.Padding = new System.Windows.Forms.Padding(3); 451 this.resultsTabPage.Size = new System.Drawing.Size(608, 3 95);455 this.resultsTabPage.Size = new System.Drawing.Size(608, 367); 452 456 this.resultsTabPage.TabIndex = 1; 453 457 this.resultsTabPage.Text = "Results"; … … 462 466 this.resultCollectionView.Name = "resultCollectionView"; 463 467 this.resultCollectionView.ReadOnly = true; 464 this.resultCollectionView.Size = new System.Drawing.Size(602, 389); 468 this.resultCollectionView.ShowDetails = true; 469 this.resultCollectionView.Size = new System.Drawing.Size(602, 361); 465 470 this.resultCollectionView.TabIndex = 0; 466 471 // … … 472 477 this.runsTabPage.Name = "runsTabPage"; 473 478 this.runsTabPage.Padding = new System.Windows.Forms.Padding(3); 474 this.runsTabPage.Size = new System.Drawing.Size(608, 3 95);479 this.runsTabPage.Size = new System.Drawing.Size(608, 367); 475 480 this.runsTabPage.TabIndex = 2; 476 481 this.runsTabPage.Text = "Runs"; … … 501 506 this.runCollectionView.Name = "runCollectionView"; 502 507 this.runCollectionView.ReadOnly = false; 503 this.runCollectionView.Size = new System.Drawing.Size(602, 3 89);508 this.runCollectionView.Size = new System.Drawing.Size(602, 361); 504 509 this.runCollectionView.TabIndex = 0; 505 510 // … … 513 518 // splitContainer 514 519 // 515 this.splitContainer.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) 516 520 this.splitContainer.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) 521 | System.Windows.Forms.AnchorStyles.Right))); 517 522 this.splitContainer.Location = new System.Drawing.Point(0, 26); 518 523 this.splitContainer.Name = "splitContainer"; … … 520 525 // splitContainer.Panel1 521 526 // 527 this.splitContainer.Panel1.Controls.Add(this.shuffleSamplesCheckBox); 522 528 this.splitContainer.Panel1.Controls.Add(this.samplesEndStringConvertibleValueView); 523 529 this.splitContainer.Panel1.Controls.Add(this.samplesStartStringConvertibleValueView); … … 531 537 this.splitContainer.Panel2.Controls.Add(this.workersLabel); 532 538 this.splitContainer.Panel2.Controls.Add(this.workersNumericUpDown); 533 this.splitContainer.Size = new System.Drawing.Size(616, 55);539 this.splitContainer.Size = new System.Drawing.Size(616, 73); 534 540 this.splitContainer.SplitterDistance = 306; 535 541 this.splitContainer.TabIndex = 3; 536 542 // 543 // shuffleSamplesCheckBox 544 // 545 this.shuffleSamplesCheckBox.AutoSize = true; 546 this.shuffleSamplesCheckBox.Location = new System.Drawing.Point(6, 52); 547 this.shuffleSamplesCheckBox.Name = "shuffleSamplesCheckBox"; 548 this.shuffleSamplesCheckBox.Size = new System.Drawing.Size(102, 17); 549 this.shuffleSamplesCheckBox.TabIndex = 5; 550 this.shuffleSamplesCheckBox.Text = "Shuffle Samples"; 551 this.shuffleSamplesCheckBox.UseVisualStyleBackColor = true; 552 this.shuffleSamplesCheckBox.CheckedChanged += new System.EventHandler(this.shuffleSamplesCheckBox_CheckedChanged); 553 // 537 554 // CrossValidationView 538 555 // 539 this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);540 556 this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Inherit; 541 557 this.Controls.Add(this.tabControl); … … 617 633 private System.Windows.Forms.SplitContainer splitContainer; 618 634 private Optimization.Views.ResultCollectionView resultCollectionView; 635 private System.Windows.Forms.CheckBox shuffleSamplesCheckBox; 619 636 } 620 637 } -
trunk/sources/HeuristicLab.Algorithms.DataAnalysis.Views/3.4/CrossValidationView.cs
r14185 r14864 197 197 198 198 #region GUI events 199 private void shuffleSamplesCheckBox_CheckedChanged(object sender, EventArgs e) { 200 Content.ShuffleSamples.Value = shuffleSamplesCheckBox.Checked; 201 } 199 202 private void foldsNumericUpDown_Validated(object sender, EventArgs e) { 200 203 if (foldsNumericUpDown.Text == string.Empty) … … 238 241 try { 239 242 Content.Algorithm = (IAlgorithm)algorithmTypeSelectorDialog.TypeSelector.CreateInstanceOfSelectedType(); 240 } 241 catch (Exception ex) { 243 } catch (Exception ex) { 242 244 ErrorHandling.ShowErrorDialog(this, ex); 243 245 } … … 250 252 algorithmTabControl.Enabled = false; 251 253 252 ContentManager.LoadAsync(openFileDialog.FileName, delegate (IStorableContent content, Exception error) {254 ContentManager.LoadAsync(openFileDialog.FileName, delegate (IStorableContent content, Exception error) { 253 255 try { 254 256 if (error != null) throw error; … … 258 260 else 259 261 Content.Algorithm = algorithm; 260 } 261 catch (Exception ex) { 262 } catch (Exception ex) { 262 263 ErrorHandling.ShowErrorDialog(this, ex); 263 } 264 finally { 265 Invoke(new Action(delegate() { 264 } finally { 265 Invoke(new Action(delegate () { 266 266 algorithmTabControl.Enabled = true; 267 267 })); … … 289 289 algorithmProblemViewHost.Enabled = false; 290 290 291 ContentManager.LoadAsync(openFileDialog.FileName, delegate (IStorableContent content, Exception error) {291 ContentManager.LoadAsync(openFileDialog.FileName, delegate (IStorableContent content, Exception error) { 292 292 try { 293 293 if (error != null) throw error; … … 298 298 else 299 299 Content.Problem = problem; 300 } 301 catch (Exception ex) { 300 } catch (Exception ex) { 302 301 Invoke(new Action(() => ErrorHandling.ShowErrorDialog(this, ex))); 303 } 304 finally { 305 Invoke(new Action(delegate() { 302 } finally { 303 Invoke(new Action(delegate () { 306 304 algorithmProblemViewHost.Enabled = true; 307 305 newProblemButton.Enabled = openProblemButton.Enabled = true; … … 357 355 } 358 356 #endregion 359 360 357 } 361 358 } -
trunk/sources/HeuristicLab.Algorithms.DataAnalysis/3.4/CrossValidation.cs
r14781 r14864 33 33 using HeuristicLab.Problems.DataAnalysis; 34 34 using HeuristicLab.Problems.DataAnalysis.Symbolic; 35 using HeuristicLab.Random; 35 36 36 37 namespace HeuristicLab.Algorithms.DataAnalysis { … … 56 57 samplesStart = new IntValue(0); 57 58 samplesEnd = new IntValue(0); 59 shuffleSamples = new BoolValue(false); 58 60 storeAlgorithmInEachRun = false; 59 61 … … 89 91 samplesStart = cloner.Clone(original.samplesStart); 90 92 samplesEnd = cloner.Clone(original.samplesEnd); 93 shuffleSamples = cloner.Clone(original.shuffleSamples); 91 94 RegisterEvents(); 92 95 if (Algorithm != null) RegisterAlgorithmEvents(); … … 170 173 get { return results; } 171 174 } 172 175 [Storable] 176 private BoolValue shuffleSamples; 177 public BoolValue ShuffleSamples { 178 get { return shuffleSamples; } 179 } 173 180 [Storable] 174 181 private IntValue folds; … … 274 281 if (clonedAlgorithms.Count == 0) { 275 282 int testSamplesCount = (SamplesEnd.Value - SamplesStart.Value) / Folds.Value; 276 283 IDataset shuffledDataset = null; 277 284 for (int i = 0; i < Folds.Value; i++) { 278 IAlgorithm clonedAlgorithm = (IAlgorithm)algorithm.Clone(); 285 var cloner = new Cloner(); 286 if (ShuffleSamples.Value) { 287 var dataAnalysisProblem = (IDataAnalysisProblem)algorithm.Problem; 288 var dataset = (Dataset)dataAnalysisProblem.ProblemData.Dataset; 289 shuffledDataset = shuffledDataset ?? dataset.Shuffle(new FastRandom()); 290 cloner.RegisterClonedObject(dataset, shuffledDataset); 291 } 292 IAlgorithm clonedAlgorithm = cloner.Clone(Algorithm); 279 293 clonedAlgorithm.Name = algorithm.Name + " Fold " + i; 280 294 IDataAnalysisProblem problem = clonedAlgorithm.Problem as IDataAnalysisProblem; … … 590 604 private void Algorithm_ExecutionStateChanged(object sender, EventArgs e) { 591 605 switch (Algorithm.ExecutionState) { 592 case ExecutionState.Prepared: OnPrepared(); 606 case ExecutionState.Prepared: 607 OnPrepared(); 593 608 break; 594 609 case ExecutionState.Started: throw new InvalidOperationException("Algorithm template can not be started."); 595 610 case ExecutionState.Paused: throw new InvalidOperationException("Algorithm template can not be paused."); 596 case ExecutionState.Stopped: OnStopped(); 611 case ExecutionState.Stopped: 612 OnStopped(); 597 613 break; 598 614 } … … 724 740 AggregateResultValues(collectedResults); 725 741 results.AddRange(collectedResults.Select(x => new Result(x.Key, x.Value)).Cast<IResult>().ToArray()); 742 clonedAlgorithms.Clear(); 726 743 runsCounter++; 727 744 runs.Add(new Run(string.Format("{0} Run {1}", Name, runsCounter), this)); -
trunk/sources/HeuristicLab.Problems.DataAnalysis/3.4/Dataset.cs
r14857 r14864 126 126 return new ModifiableDataset(variableNames, values); 127 127 } 128 /// <summary> 129 /// Shuffle a dataset's rows 130 /// </summary> 131 /// <param name="random">Random number generator used for shuffling.</param> 132 /// <returns>A shuffled copy of the current dataset.</returns> 133 public Dataset Shuffle(IRandom random) { 134 var values = variableNames.Select(x => variableValues[x]).ToList(); 135 return new Dataset(variableNames, values.ShuffleLists(random)); 136 } 128 137 129 138 protected Dataset(Dataset dataset) : this(dataset.variableNames, dataset.variableValues.Values) { }
Note: See TracChangeset
for help on using the changeset viewer.