Free cookie consent management tool by TermsFeed Policy Generator

Changeset 4561


Ignore:
Timestamp:
10/06/10 15:56:09 (14 years ago)
Author:
mkommend
Message:

updated cross validation (ticket #1199)

Location:
branches/HeuristicLab.Classification
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • branches/HeuristicLab.Classification/HeuristicLab.Algorithms.DataAnalysis.Views/3.3/CrossValidationView.Designer.cs

    r4542 r4561  
    7575      this.foldsTabPage = new System.Windows.Forms.TabPage();
    7676      this.algorithmResultsCollectionView = new HeuristicLab.Algorithms.DataAnalysis.Views.AlgorithmResultsCollectionView();
     77      this.runsTabPage = new System.Windows.Forms.TabPage();
     78      this.storeAlgorithmInEachRunCheckBox = new System.Windows.Forms.CheckBox();
     79      this.runCollectionView = new HeuristicLab.Optimization.Views.RunCollectionView();
    7780      this.openFileDialog = new System.Windows.Forms.OpenFileDialog();
    7881      ((System.ComponentModel.ISupportInitialize)(this.errorProvider)).BeginInit();
     
    8588      this.algorithmParametersTabPage.SuspendLayout();
    8689      this.foldsTabPage.SuspendLayout();
     90      this.runsTabPage.SuspendLayout();
    8791      this.SuspendLayout();
    8892      //
     
    9296      this.errorProvider.SetIconPadding(this.nameTextBox, 2);
    9397      this.nameTextBox.Location = new System.Drawing.Point(80, 0);
    94       this.nameTextBox.Size = new System.Drawing.Size(574, 20);
     98      this.nameTextBox.Size = new System.Drawing.Size(531, 20);
    9599      //
    96100      // descriptionTextBox
    97101      //
    98102      this.descriptionTextBox.Location = new System.Drawing.Point(80, 26);
    99       this.descriptionTextBox.Size = new System.Drawing.Size(574, 20);
     103      this.descriptionTextBox.Size = new System.Drawing.Size(531, 20);
    100104      //
    101105      // startButton
     
    146150      //
    147151      this.executionTimeTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
    148       this.executionTimeTextBox.Location = new System.Drawing.Point(519, 517);
     152      this.executionTimeTextBox.Location = new System.Drawing.Point(476, 517);
    149153      this.executionTimeTextBox.Name = "executionTimeTextBox";
    150154      this.executionTimeTextBox.ReadOnly = true;
     
    156160      this.executionTimeLabel.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Right)));
    157161      this.executionTimeLabel.AutoSize = true;
    158       this.executionTimeLabel.Location = new System.Drawing.Point(430, 520);
     162      this.executionTimeLabel.Location = new System.Drawing.Point(387, 520);
    159163      this.executionTimeLabel.Name = "executionTimeLabel";
    160164      this.executionTimeLabel.Size = new System.Drawing.Size(83, 13);
     
    166170      this.foldsNumericUpDown.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
    167171                  | System.Windows.Forms.AnchorStyles.Right)));
    168       this.foldsNumericUpDown.Location = new System.Drawing.Point(80, 81);
     172      this.foldsNumericUpDown.Location = new System.Drawing.Point(389, 79);
    169173      this.foldsNumericUpDown.Maximum = new decimal(new int[] {
    170174            50,
     
    173177            0});
    174178      this.foldsNumericUpDown.Minimum = new decimal(new int[] {
    175             1,
     179            2,
    176180            0,
    177181            0,
    178182            0});
    179183      this.foldsNumericUpDown.Name = "foldsNumericUpDown";
    180       this.foldsNumericUpDown.Size = new System.Drawing.Size(574, 20);
     184      this.foldsNumericUpDown.Size = new System.Drawing.Size(222, 20);
    181185      this.foldsNumericUpDown.TabIndex = 18;
    182186      this.foldsNumericUpDown.ThousandsSeparator = true;
    183187      this.foldsNumericUpDown.Value = new decimal(new int[] {
    184             1,
     188            2,
    185189            0,
    186190            0,
     
    192196      //
    193197      this.foldsLabel.AutoSize = true;
    194       this.foldsLabel.Location = new System.Drawing.Point(3, 83);
     198      this.foldsLabel.Location = new System.Drawing.Point(333, 80);
    195199      this.foldsLabel.Name = "foldsLabel";
    196200      this.foldsLabel.Size = new System.Drawing.Size(35, 13);
     
    202206      this.workersNumericUpDown.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
    203207                  | System.Windows.Forms.AnchorStyles.Right)));
    204       this.workersNumericUpDown.Location = new System.Drawing.Point(80, 52);
     208      this.workersNumericUpDown.Location = new System.Drawing.Point(389, 53);
    205209      this.workersNumericUpDown.Maximum = new decimal(new int[] {
    206210            50,
     
    214218            0});
    215219      this.workersNumericUpDown.Name = "workersNumericUpDown";
    216       this.workersNumericUpDown.Size = new System.Drawing.Size(574, 20);
     220      this.workersNumericUpDown.Size = new System.Drawing.Size(222, 20);
    217221      this.workersNumericUpDown.TabIndex = 20;
    218222      this.workersNumericUpDown.ThousandsSeparator = true;
     
    228232      //
    229233      this.workersLabel.AutoSize = true;
    230       this.workersLabel.Location = new System.Drawing.Point(3, 54);
     234      this.workersLabel.Location = new System.Drawing.Point(333, 55);
    231235      this.workersLabel.Name = "workersLabel";
    232236      this.workersLabel.Size = new System.Drawing.Size(50, 13);
     
    237241      //
    238242      this.samplesStartLabel.AutoSize = true;
    239       this.samplesStartLabel.Location = new System.Drawing.Point(3, 110);
     243      this.samplesStartLabel.Location = new System.Drawing.Point(3, 55);
    240244      this.samplesStartLabel.Name = "samplesStartLabel";
    241245      this.samplesStartLabel.Size = new System.Drawing.Size(75, 13);
     
    246250      //
    247251      this.samplesEndLabel.AutoSize = true;
    248       this.samplesEndLabel.Location = new System.Drawing.Point(3, 135);
     252      this.samplesEndLabel.Location = new System.Drawing.Point(3, 80);
    249253      this.samplesEndLabel.Name = "samplesEndLabel";
    250254      this.samplesEndLabel.Size = new System.Drawing.Size(72, 13);
     
    254258      // samplesEndStringConvertibleValueView
    255259      //
    256       this.samplesEndStringConvertibleValueView.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
    257                   | System.Windows.Forms.AnchorStyles.Right)));
    258260      this.samplesEndStringConvertibleValueView.Caption = "StringConvertibleValue View";
    259261      this.samplesEndStringConvertibleValueView.Content = null;
    260262      this.samplesEndStringConvertibleValueView.LabelVisible = false;
    261       this.samplesEndStringConvertibleValueView.Location = new System.Drawing.Point(80, 132);
     263      this.samplesEndStringConvertibleValueView.Location = new System.Drawing.Point(80, 79);
    262264      this.samplesEndStringConvertibleValueView.Name = "samplesEndStringConvertibleValueView";
    263265      this.samplesEndStringConvertibleValueView.ReadOnly = false;
    264       this.samplesEndStringConvertibleValueView.Size = new System.Drawing.Size(577, 19);
     266      this.samplesEndStringConvertibleValueView.Size = new System.Drawing.Size(247, 18);
    265267      this.samplesEndStringConvertibleValueView.TabIndex = 24;
    266268      //
    267269      // samplesStartStringConvertibleValueView
    268270      //
    269       this.samplesStartStringConvertibleValueView.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
    270                   | System.Windows.Forms.AnchorStyles.Right)));
    271271      this.samplesStartStringConvertibleValueView.Caption = "StringConvertibleValue View";
    272272      this.samplesStartStringConvertibleValueView.Content = null;
    273273      this.samplesStartStringConvertibleValueView.LabelVisible = false;
    274       this.samplesStartStringConvertibleValueView.Location = new System.Drawing.Point(80, 107);
     274      this.samplesStartStringConvertibleValueView.Location = new System.Drawing.Point(80, 54);
    275275      this.samplesStartStringConvertibleValueView.Name = "samplesStartStringConvertibleValueView";
    276276      this.samplesStartStringConvertibleValueView.ReadOnly = false;
    277       this.samplesStartStringConvertibleValueView.Size = new System.Drawing.Size(577, 19);
     277      this.samplesStartStringConvertibleValueView.Size = new System.Drawing.Size(247, 18);
    278278      this.samplesStartStringConvertibleValueView.TabIndex = 22;
    279279      //
     
    285285      this.tabControl.Controls.Add(this.algorithmTabPage);
    286286      this.tabControl.Controls.Add(this.foldsTabPage);
    287       this.tabControl.Location = new System.Drawing.Point(0, 157);
     287      this.tabControl.Controls.Add(this.runsTabPage);
     288      this.tabControl.Location = new System.Drawing.Point(0, 105);
    288289      this.tabControl.Name = "tabControl";
    289290      this.tabControl.SelectedIndex = 0;
    290       this.tabControl.Size = new System.Drawing.Size(657, 351);
     291      this.tabControl.Size = new System.Drawing.Size(614, 403);
    291292      this.tabControl.TabIndex = 25;
    292293      //
     
    301302      this.algorithmTabPage.Name = "algorithmTabPage";
    302303      this.algorithmTabPage.Padding = new System.Windows.Forms.Padding(3);
    303       this.algorithmTabPage.Size = new System.Drawing.Size(649, 325);
     304      this.algorithmTabPage.Size = new System.Drawing.Size(606, 377);
    304305      this.algorithmTabPage.TabIndex = 0;
    305306      this.algorithmTabPage.Text = "Algorithm";
     
    318319      this.algorithmNamedItemView.Name = "algorithmNamedItemView";
    319320      this.algorithmNamedItemView.ReadOnly = false;
    320       this.algorithmNamedItemView.Size = new System.Drawing.Size(637, 52);
     321      this.algorithmNamedItemView.Size = new System.Drawing.Size(594, 52);
    321322      this.algorithmNamedItemView.TabIndex = 29;
    322323      //
     
    331332      this.algorithmTabControl.Name = "algorithmTabControl";
    332333      this.algorithmTabControl.SelectedIndex = 0;
    333       this.algorithmTabControl.Size = new System.Drawing.Size(635, 225);
     334      this.algorithmTabControl.Size = new System.Drawing.Size(592, 277);
    334335      this.algorithmTabControl.TabIndex = 28;
    335336      //
     
    342343      this.algorithmProblemTabPage.Name = "algorithmProblemTabPage";
    343344      this.algorithmProblemTabPage.Padding = new System.Windows.Forms.Padding(3);
    344       this.algorithmProblemTabPage.Size = new System.Drawing.Size(627, 199);
     345      this.algorithmProblemTabPage.Size = new System.Drawing.Size(584, 251);
    345346      this.algorithmProblemTabPage.TabIndex = 0;
    346347      this.algorithmProblemTabPage.Text = "Problem";
     
    372373      this.algorithmProblemViewHost.Name = "algorithmProblemViewHost";
    373374      this.algorithmProblemViewHost.ReadOnly = false;
    374       this.algorithmProblemViewHost.Size = new System.Drawing.Size(615, 157);
     375      this.algorithmProblemViewHost.Size = new System.Drawing.Size(572, 209);
    375376      this.algorithmProblemViewHost.TabIndex = 0;
    376377      this.algorithmProblemViewHost.ViewType = null;
     
    393394      this.algorithmParametersTabPage.Name = "algorithmParametersTabPage";
    394395      this.algorithmParametersTabPage.Padding = new System.Windows.Forms.Padding(3);
    395       this.algorithmParametersTabPage.Size = new System.Drawing.Size(627, 199);
     396      this.algorithmParametersTabPage.Size = new System.Drawing.Size(584, 251);
    396397      this.algorithmParametersTabPage.TabIndex = 1;
    397398      this.algorithmParametersTabPage.Text = "Parameters";
     
    406407      this.algorithmParameterCollectionView.Name = "algorithmParameterCollectionView";
    407408      this.algorithmParameterCollectionView.ReadOnly = false;
    408       this.algorithmParameterCollectionView.Size = new System.Drawing.Size(621, 193);
     409      this.algorithmParameterCollectionView.Size = new System.Drawing.Size(578, 245);
    409410      this.algorithmParameterCollectionView.TabIndex = 0;
    410411      //
     
    437438      this.foldsTabPage.Name = "foldsTabPage";
    438439      this.foldsTabPage.Padding = new System.Windows.Forms.Padding(3);
    439       this.foldsTabPage.Size = new System.Drawing.Size(649, 325);
     440      this.foldsTabPage.Size = new System.Drawing.Size(606, 377);
    440441      this.foldsTabPage.TabIndex = 1;
    441442      this.foldsTabPage.Text = "Folds";
     
    450451      this.algorithmResultsCollectionView.Name = "algorithmResultsCollectionView";
    451452      this.algorithmResultsCollectionView.ReadOnly = true;
    452       this.algorithmResultsCollectionView.Size = new System.Drawing.Size(643, 319);
     453      this.algorithmResultsCollectionView.Size = new System.Drawing.Size(600, 371);
    453454      this.algorithmResultsCollectionView.TabIndex = 0;
     455      //
     456      // runsTabPage
     457      //
     458      this.runsTabPage.Controls.Add(this.storeAlgorithmInEachRunCheckBox);
     459      this.runsTabPage.Controls.Add(this.runCollectionView);
     460      this.runsTabPage.Location = new System.Drawing.Point(4, 22);
     461      this.runsTabPage.Name = "runsTabPage";
     462      this.runsTabPage.Padding = new System.Windows.Forms.Padding(3);
     463      this.runsTabPage.Size = new System.Drawing.Size(606, 377);
     464      this.runsTabPage.TabIndex = 2;
     465      this.runsTabPage.Text = "Runs";
     466      this.runsTabPage.UseVisualStyleBackColor = true;
     467      //
     468      // storeAlgorithmInEachRunCheckBox
     469      //
     470      this.storeAlgorithmInEachRunCheckBox.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
     471      this.storeAlgorithmInEachRunCheckBox.AutoSize = true;
     472      this.storeAlgorithmInEachRunCheckBox.CheckAlign = System.Drawing.ContentAlignment.MiddleRight;
     473      this.storeAlgorithmInEachRunCheckBox.Checked = true;
     474      this.storeAlgorithmInEachRunCheckBox.CheckState = System.Windows.Forms.CheckState.Checked;
     475      this.storeAlgorithmInEachRunCheckBox.Location = new System.Drawing.Point(440, 4);
     476      this.storeAlgorithmInEachRunCheckBox.Name = "storeAlgorithmInEachRunCheckBox";
     477      this.storeAlgorithmInEachRunCheckBox.Size = new System.Drawing.Size(161, 17);
     478      this.storeAlgorithmInEachRunCheckBox.TabIndex = 2;
     479      this.storeAlgorithmInEachRunCheckBox.Text = "&Store Algorithm in each Run:";
     480      this.toolTip.SetToolTip(this.storeAlgorithmInEachRunCheckBox, "Check to store a copy of the algorithm in each run.");
     481      this.storeAlgorithmInEachRunCheckBox.UseVisualStyleBackColor = true;
     482      this.storeAlgorithmInEachRunCheckBox.CheckedChanged += new System.EventHandler(this.storeAlgorithmInEachRunCheckBox_CheckedChanged);
     483      //
     484      // runCollectionView
     485      //
     486      this.runCollectionView.Caption = "RunCollection View";
     487      this.runCollectionView.Content = null;
     488      this.runCollectionView.Dock = System.Windows.Forms.DockStyle.Fill;
     489      this.runCollectionView.Location = new System.Drawing.Point(3, 3);
     490      this.runCollectionView.Name = "runCollectionView";
     491      this.runCollectionView.ReadOnly = false;
     492      this.runCollectionView.Size = new System.Drawing.Size(600, 371);
     493      this.runCollectionView.TabIndex = 3;
    454494      //
    455495      // openFileDialog
     
    465505      this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
    466506      this.Controls.Add(this.tabControl);
     507      this.Controls.Add(this.executionTimeTextBox);
     508      this.Controls.Add(this.executionTimeLabel);
     509      this.Controls.Add(this.samplesStartStringConvertibleValueView);
     510      this.Controls.Add(this.startButton);
     511      this.Controls.Add(this.workersNumericUpDown);
     512      this.Controls.Add(this.workersLabel);
    467513      this.Controls.Add(this.samplesEndStringConvertibleValueView);
    468514      this.Controls.Add(this.samplesEndLabel);
    469       this.Controls.Add(this.samplesStartStringConvertibleValueView);
    470       this.Controls.Add(this.samplesStartLabel);
    471       this.Controls.Add(this.workersNumericUpDown);
    472       this.Controls.Add(this.workersLabel);
     515      this.Controls.Add(this.pauseButton);
    473516      this.Controls.Add(this.foldsNumericUpDown);
    474517      this.Controls.Add(this.foldsLabel);
    475       this.Controls.Add(this.executionTimeTextBox);
    476       this.Controls.Add(this.executionTimeLabel);
    477       this.Controls.Add(this.startButton);
    478       this.Controls.Add(this.pauseButton);
     518      this.Controls.Add(this.samplesStartLabel);
    479519      this.Controls.Add(this.stopButton);
    480520      this.Controls.Add(this.resetButton);
    481521      this.Name = "CrossValidationView";
    482       this.Size = new System.Drawing.Size(657, 538);
     522      this.Size = new System.Drawing.Size(614, 538);
    483523      this.Controls.SetChildIndex(this.resetButton, 0);
    484524      this.Controls.SetChildIndex(this.stopButton, 0);
     525      this.Controls.SetChildIndex(this.samplesStartLabel, 0);
     526      this.Controls.SetChildIndex(this.foldsLabel, 0);
     527      this.Controls.SetChildIndex(this.foldsNumericUpDown, 0);
    485528      this.Controls.SetChildIndex(this.pauseButton, 0);
     529      this.Controls.SetChildIndex(this.samplesEndLabel, 0);
     530      this.Controls.SetChildIndex(this.samplesEndStringConvertibleValueView, 0);
     531      this.Controls.SetChildIndex(this.workersLabel, 0);
     532      this.Controls.SetChildIndex(this.workersNumericUpDown, 0);
    486533      this.Controls.SetChildIndex(this.startButton, 0);
     534      this.Controls.SetChildIndex(this.samplesStartStringConvertibleValueView, 0);
    487535      this.Controls.SetChildIndex(this.executionTimeLabel, 0);
    488536      this.Controls.SetChildIndex(this.executionTimeTextBox, 0);
     537      this.Controls.SetChildIndex(this.tabControl, 0);
    489538      this.Controls.SetChildIndex(this.nameLabel, 0);
    490539      this.Controls.SetChildIndex(this.descriptionLabel, 0);
    491540      this.Controls.SetChildIndex(this.nameTextBox, 0);
    492541      this.Controls.SetChildIndex(this.descriptionTextBox, 0);
    493       this.Controls.SetChildIndex(this.foldsLabel, 0);
    494       this.Controls.SetChildIndex(this.foldsNumericUpDown, 0);
    495       this.Controls.SetChildIndex(this.workersLabel, 0);
    496       this.Controls.SetChildIndex(this.workersNumericUpDown, 0);
    497       this.Controls.SetChildIndex(this.samplesStartLabel, 0);
    498       this.Controls.SetChildIndex(this.samplesStartStringConvertibleValueView, 0);
    499       this.Controls.SetChildIndex(this.samplesEndLabel, 0);
    500       this.Controls.SetChildIndex(this.samplesEndStringConvertibleValueView, 0);
    501       this.Controls.SetChildIndex(this.tabControl, 0);
    502542      ((System.ComponentModel.ISupportInitialize)(this.errorProvider)).EndInit();
    503543      ((System.ComponentModel.ISupportInitialize)(this.foldsNumericUpDown)).EndInit();
     
    509549      this.algorithmParametersTabPage.ResumeLayout(false);
    510550      this.foldsTabPage.ResumeLayout(false);
     551      this.runsTabPage.ResumeLayout(false);
     552      this.runsTabPage.PerformLayout();
    511553      this.ResumeLayout(false);
    512554      this.PerformLayout();
     
    545587    private Core.Views.ParameterCollectionView algorithmParameterCollectionView;
    546588    private System.Windows.Forms.OpenFileDialog openFileDialog;
     589    private System.Windows.Forms.TabPage runsTabPage;
     590    private Optimization.Views.RunCollectionView runCollectionView;
     591    private System.Windows.Forms.CheckBox storeAlgorithmInEachRunCheckBox;
    547592  }
    548593}
  • branches/HeuristicLab.Classification/HeuristicLab.Algorithms.DataAnalysis.Views/3.3/CrossValidationView.cs

    r4542 r4561  
    5858        algorithmParameterCollectionView.Content = null;
    5959        algorithmResultsCollectionView.Content = null;
     60        runCollectionView.Content = null;
     61        storeAlgorithmInEachRunCheckBox.Checked = true;
    6062      } else {
    6163        Locked = ReadOnly = Content.ExecutionState == ExecutionState.Started;
     
    6668        UpdateAlgorithmView();
    6769        UpdateProblemView();
     70        runCollectionView.Content = Content.Runs;
     71        algorithmParameterCollectionView.Content = ((IParameterizedNamedItem)Content).Parameters;
    6872        algorithmResultsCollectionView.Content = Content.ClonedAlgorithms;
    6973        executionTimeTextBox.Text = Content.ExecutionTime.ToString();
     74        storeAlgorithmInEachRunCheckBox.Checked = Content.StoreAlgorithmInEachRun;
    7075      }
    7176    }
     
    8186      Content.ExecutionStateChanged += new EventHandler(Content_ExecutionStateChanged);
    8287      Content.ExecutionTimeChanged += new EventHandler(Content_ExecutionTimeChanged);
     88      Content.StoreAlgorithmInEachRunChanged += new EventHandler(Content_StoreAlgorithmInEachRunChanged);
    8389    }
    8490
    8591    protected override void DeregisterContentEvents() {
    86       base.DeregisterContentEvents();
    8792      Content.AlgorithmChanged -= new EventHandler(Content_AlgorithmChanged);
    8893      Content.ProblemChanged -= new EventHandler(Content_ProblemChanged);
     
    9398      Content.ExecutionStateChanged -= new EventHandler(Content_ExecutionStateChanged);
    9499      Content.ExecutionTimeChanged -= new EventHandler(Content_ExecutionTimeChanged);
     100      Content.StoreAlgorithmInEachRunChanged -= new EventHandler(Content_StoreAlgorithmInEachRunChanged);
     101      base.DeregisterContentEvents();
    95102    }
    96103
     
    100107        base.SetEnabledStateOfControls();
    101108        this.Enabled = Content != null;
     109
    102110        if (Content != null) {
    103           algorithmNamedItemView.Enabled = Content.Algorithm != null;
    104           algorithmTabControl.Enabled = Content.Algorithm != null;
    105           samplesStartStringConvertibleValueView.Enabled = Content.Problem != null;
    106           samplesEndStringConvertibleValueView.Enabled = Content.Problem != null;
    107         }
    108         SetEnabledStateOfExecutableButtons();
    109       }
    110     }
    111     private void SetEnabledStateOfExecutableButtons() {
    112       if (Content == null) {
    113         startButton.Enabled = pauseButton.Enabled = stopButton.Enabled = resetButton.Enabled = false;
    114         foldsNumericUpDown.Enabled = workersNumericUpDown.Enabled = false;
    115         samplesStartStringConvertibleValueView.Enabled = samplesEndStringConvertibleValueView.Enabled = false;
    116       } else {
    117         startButton.Enabled = (Content.ExecutionState == ExecutionState.Prepared) || (Content.ExecutionState == ExecutionState.Paused);
    118         pauseButton.Enabled = Content.ExecutionState == ExecutionState.Started;
    119         stopButton.Enabled = (Content.ExecutionState == ExecutionState.Started) || (Content.ExecutionState == ExecutionState.Paused);
    120         resetButton.Enabled = Content.ExecutionState != ExecutionState.Started;
    121         foldsNumericUpDown.Enabled = Content.ExecutionState == ExecutionState.Prepared;
    122         samplesStartStringConvertibleValueView.Enabled = Content.ExecutionState == ExecutionState.Prepared;
    123         samplesEndStringConvertibleValueView.Enabled = Content.ExecutionState == ExecutionState.Prepared;
    124         workersNumericUpDown.Enabled = (Content.ExecutionState == ExecutionState.Prepared) || (Content.ExecutionState == ExecutionState.Paused);
     111          storeAlgorithmInEachRunCheckBox.Enabled = !ReadOnly;
     112
     113          algorithmNamedItemView.Enabled = Content.Algorithm != null && (Content.ExecutionState == ExecutionState.Prepared || Content.ExecutionState == ExecutionState.Stopped);
     114          algorithmTabControl.Enabled = Content.Algorithm != null && (Content.ExecutionState == ExecutionState.Prepared || Content.ExecutionState == ExecutionState.Stopped);
     115          foldsNumericUpDown.Enabled = Content.ExecutionState == ExecutionState.Prepared;
     116          samplesStartStringConvertibleValueView.Enabled = Content.ExecutionState == ExecutionState.Prepared;
     117          samplesEndStringConvertibleValueView.Enabled = Content.ExecutionState == ExecutionState.Prepared;
     118          workersNumericUpDown.Enabled = (Content.ExecutionState == ExecutionState.Prepared) || (Content.ExecutionState == ExecutionState.Paused);
     119
     120          startButton.Enabled = (Content.ExecutionState == ExecutionState.Prepared) || (Content.ExecutionState == ExecutionState.Paused);
     121          pauseButton.Enabled = Content.ExecutionState == ExecutionState.Started;
     122          stopButton.Enabled = (Content.ExecutionState == ExecutionState.Started) || (Content.ExecutionState == ExecutionState.Paused);
     123          resetButton.Enabled = Content.ExecutionState != ExecutionState.Started;
     124        }
    125125      }
    126126    }
     
    135135      algorithmNamedItemView.Content = Content.Algorithm;
    136136      UpdateProblemView();
    137       if (Content.Algorithm != null) algorithmParameterCollectionView.Content = Content.Algorithm.Parameters;
    138       else algorithmParameterCollectionView.Content = null;
    139137    }
    140138
     
    159157      else {
    160158        Locked = ReadOnly = Content.ExecutionState == ExecutionState.Started;
    161         SetEnabledStateOfExecutableButtons();
     159        SetEnabledStateOfControls();
    162160      }
    163161    }
     
    174172      else
    175173        ErrorHandling.ShowErrorDialog(this, e.Value);
     174    }
     175    private void Content_StoreAlgorithmInEachRunChanged(object sender, EventArgs e) {
     176      if (InvokeRequired)
     177        Invoke(new EventHandler(Content_StoreAlgorithmInEachRunChanged), sender, e);
     178      else
     179        storeAlgorithmInEachRunCheckBox.Checked = Content.StoreAlgorithmInEachRun;
    176180    }
    177181    #endregion
     
    300304    private void algorithmTabPage_DragEnterOver(object sender, DragEventArgs e) {
    301305      e.Effect = DragDropEffects.None;
    302       if (ReadOnly)
    303         return;
     306      if (ReadOnly) return;
    304307      Type type = e.Data.GetData("Type") as Type;
    305       if ((type != null) && (typeof(IAlgorithm).IsAssignableFrom(type))) {
     308      IAlgorithm algorithm = e.Data.GetData("Value") as IAlgorithm;
     309      if ((type != null) && (typeof(IAlgorithm).IsAssignableFrom(type)) &&
     310        algorithm != null && Content.ProblemType.IsAssignableFrom(algorithm.Problem.GetType())) {
    306311        if ((e.KeyState & 32) == 32) e.Effect = DragDropEffects.Link;  // ALT key
    307312        else if ((e.KeyState & 4) == 4) e.Effect = DragDropEffects.Move;  // SHIFT key
     
    321326    private void algorithmProblemTabPage_DragEnterOver(object sender, DragEventArgs e) {
    322327      e.Effect = DragDropEffects.None;
     328      if (ReadOnly) return;
    323329      Type type = e.Data.GetData("Type") as Type;
    324       if ((type != null) && (typeof(IDataAnalysisProblem).IsAssignableFrom(type)) &&
     330      if ((type != null) && (Content.ProblemType.IsAssignableFrom(type)) &&
    325331        (Content.Algorithm.ProblemType.IsAssignableFrom(type))) {
    326332        if ((e.KeyState & 32) == 32) e.Effect = DragDropEffects.Link;  // ALT key
     
    338344      }
    339345    }
     346
     347    private void storeAlgorithmInEachRunCheckBox_CheckedChanged(object sender, EventArgs e) {
     348      if (Content != null) Content.StoreAlgorithmInEachRun = storeAlgorithmInEachRunCheckBox.Checked;
     349    }
    340350    #endregion
    341351  }
  • branches/HeuristicLab.Classification/HeuristicLab.Algorithms.DataAnalysis.Views/3.3/HeuristicLab.Algorithms.DataAnalysis.Views.csproj

    r4536 r4561  
    102102  </PropertyGroup>
    103103  <ItemGroup>
    104     <Reference Include="HeuristicLab.Algorithms.OffspringSelectionGeneticAlgorithm-3.3">
    105       <HintPath>..\..\..\..\..\..\Program Files\HeuristicLab 3.3\HeuristicLab.Algorithms.OffspringSelectionGeneticAlgorithm-3.3.dll</HintPath>
    106     </Reference>
    107104    <Reference Include="HeuristicLab.Collections-3.3">
    108105      <HintPath>..\..\..\..\..\..\Program Files\HeuristicLab 3.3\HeuristicLab.Collections-3.3.dll</HintPath>
     
    111108      <HintPath>..\..\..\..\..\..\Program Files\HeuristicLab 3.3\HeuristicLab.Common-3.3.dll</HintPath>
    112109    </Reference>
     110    <Reference Include="HeuristicLab.Common.Resources-3.3, Version=3.2.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=x86" />
    113111    <Reference Include="HeuristicLab.Core-3.3">
    114112      <HintPath>..\..\..\..\..\..\Program Files\HeuristicLab 3.3\HeuristicLab.Core-3.3.dll</HintPath>
     
    131129    <Reference Include="HeuristicLab.Optimization-3.3">
    132130      <HintPath>..\..\..\..\..\..\Program Files\HeuristicLab 3.3\HeuristicLab.Optimization-3.3.dll</HintPath>
     131    </Reference>
     132    <Reference Include="HeuristicLab.Optimization.Views-3.3">
     133      <HintPath>..\..\..\..\..\..\Program Files\HeuristicLab 3.3\HeuristicLab.Optimization.Views-3.3.dll</HintPath>
    133134    </Reference>
    134135    <Reference Include="HeuristicLab.PluginInfrastructure-3.3">
     
    142143    <Reference Include="System.Drawing" />
    143144    <Reference Include="System.Windows.Forms" />
     145    <Reference Include="System.Windows.Forms.DataVisualization, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35" />
    144146    <Reference Include="System.Xml.Linq" />
    145147    <Reference Include="System.Data.DataSetExtensions" />
  • branches/HeuristicLab.Classification/HeuristicLab.Algorithms.DataAnalysis/3.3/CrossValidation.cs

    r4542 r4561  
    2121
    2222using System;
     23using System.Collections.Generic;
    2324using System.Drawing;
    2425using System.Linq;
     
    3536  [Creatable("Data Analysis")]
    3637  [StorableClass]
    37   public sealed class CrossValidation : NamedItem, IOptimizer {
     38  public sealed class CrossValidation : ParameterizedNamedItem, IAlgorithm {
    3839    public CrossValidation()
    3940      : base() {
     
    4445      executionTime = TimeSpan.Zero;
    4546      runs = new RunCollection();
     47      runsCounter = 0;
    4648
    4749      algorithm = null;
    4850      clonedAlgorithms = new ItemCollection<IAlgorithm>();
    4951      readOnlyClonedAlgorithms = null;
    50 
    51       folds = new IntValue(1);
     52      results = new ResultCollection();
     53
     54      folds = new IntValue(2);
    5255      numberOfWorkers = new IntValue(1);
    5356      samplesStart = new IntValue(0);
    5457      samplesEnd = new IntValue(0);
    55 
     58      storeAlgorithmInEachRun = false;
    5659
    5760      RegisterEvents();
     
    6972
    7073    public override IDeepCloneable Clone(Cloner cloner) {
    71       if (ExecutionState == ExecutionState.Started) throw new InvalidOperationException(string.Format("Clone not allowed in execution state \"{0}\".", ExecutionState));
    72       CrossValidation clone = new CrossValidation(false);
    73       cloner.RegisterClonedObject(this, clone);
    74       clone.name = name;
    75       clone.description = description;
     74      CrossValidation clone = (CrossValidation)base.Clone(cloner);
     75      clone.DeregisterEvents();
    7676      clone.executionState = executionState;
    7777      clone.executionTime = executionTime;
     78      clone.storeAlgorithmInEachRun = storeAlgorithmInEachRun;
    7879      clone.runs = (RunCollection)cloner.Clone(runs);
     80      clone.runsCounter = runsCounter;
    7981      clone.algorithm = (IAlgorithm)cloner.Clone(algorithm);
    8082      clone.clonedAlgorithms = (ItemCollection<IAlgorithm>)cloner.Clone(clonedAlgorithms);
     
    102104          if (algorithm != null) DeregisterAlgorithmEvents();
    103105          algorithm = value;
     106          Parameters.Clear();
    104107
    105108          if (algorithm != null) {
     109            algorithm.StoreAlgorithmInEachRun = StoreAlgorithmInEachRun;
    106110            RegisterAlgorithmEvents();
    107111            algorithm.Prepare(true);
     112            Parameters.AddRange(algorithm.Parameters);
    108113          }
    109114          OnAlgorithmChanged();
     115          if (algorithm != null) OnProblemChanged();
    110116          Prepare();
    111117        }
    112118      }
    113119    }
     120
    114121
    115122    [Storable]
     
    130137    }
    131138
     139    IProblem IAlgorithm.Problem {
     140      get { return Problem; }
     141      set {
     142        if (value != null && !ProblemType.IsInstanceOfType(value))
     143          throw new ArgumentException("Only DataAnalysisProblems could be used for the cross validation.");
     144        Problem = (IDataAnalysisProblem)value;
     145      }
     146    }
     147    public Type ProblemType {
     148      get { return typeof(IDataAnalysisProblem); }
     149    }
     150
    132151    [Storable]
    133152    private ItemCollection<IAlgorithm> clonedAlgorithms;
     
    141160
    142161    [Storable]
     162    private ResultCollection results;
     163    public ResultCollection Results {
     164      get { return results; }
     165    }
     166
     167    [Storable]
    143168    private IntValue folds;
    144169    public IntValue Folds {
     
    162187
    163188    [Storable]
     189    private bool storeAlgorithmInEachRun;
     190    public bool StoreAlgorithmInEachRun {
     191      get { return storeAlgorithmInEachRun; }
     192      set {
     193        if (storeAlgorithmInEachRun != value) {
     194          storeAlgorithmInEachRun = value;
     195          OnStoreAlgorithmInEachRunChanged();
     196        }
     197      }
     198    }
     199
     200    [Storable]
     201    private int runsCounter;
     202    [Storable]
    164203    private RunCollection runs;
    165204    public RunCollection Runs {
    166205      get { return runs; }
    167206    }
     207
    168208    [Storable]
    169209    private ExecutionState executionState;
     
    192232    public TimeSpan ExecutionTime {
    193233      get {
    194         if (ExecutionState != ExecutionState.Stopped)
     234        if (ExecutionState != ExecutionState.Stopped && ExecutionState != ExecutionState.Prepared)
    195235          return executionTime + TimeSpan.FromMilliseconds(clonedAlgorithms.Select(x => x.ExecutionTime.TotalMilliseconds).Sum());
    196236        else
     
    227267        //create cloned algorithms
    228268        if (clonedAlgorithms.Count == 0) {
     269          int testSamplesCount = (SamplesEnd.Value - SamplesStart.Value) / Folds.Value;
    229270          for (int i = 0; i < Folds.Value; i++) {
    230271            IAlgorithm clonedAlgorithm = (IAlgorithm)algorithm.Clone();
    231272            clonedAlgorithm.Name = algorithm.Name + " Fold " + i;
     273            IDataAnalysisProblem problem = clonedAlgorithm.Problem as IDataAnalysisProblem;
     274            problem.DataAnalysisProblemData.TestSamplesEnd.Value = (i + 1) == Folds.Value ? SamplesEnd.Value : (i + 1) * testSamplesCount + SamplesStart.Value;
     275            problem.DataAnalysisProblemData.TestSamplesStart.Value = (i * testSamplesCount) + SamplesStart.Value;
    232276            clonedAlgorithms.Add(clonedAlgorithm);
    233277          }
     
    283327    }
    284328
     329    #region collect parameters and results
     330    public override void CollectParameterValues(IDictionary<string, IItem> values) {
     331      values.Add("Algorithm Name", new StringValue(Name));
     332      values.Add("Algorithm Type", new StringValue(GetType().GetPrettyName()));
     333      values.Add("Folds", new IntValue(Folds.Value));
     334
     335      if (algorithm != null) {
     336        values.Add("CrossValidation Algorithm Name", new StringValue(Algorithm.Name));
     337        values.Add("CrossValidation Algorithm Type", new StringValue(Algorithm.GetType().GetPrettyName()));
     338        base.CollectParameterValues(values);
     339      }
     340      if (Problem != null) {
     341        values.Add("Problem Name", new StringValue(Problem.Name));
     342        values.Add("Problem Type", new StringValue(Problem.GetType().GetPrettyName()));
     343        Problem.CollectParameterValues(values);
     344      }
     345    }
     346
     347    public void CollectResultValues(IDictionary<string, IItem> results) {
     348      Dictionary<string, List<double>> resultValues = new Dictionary<string, List<double>>();
     349      IEnumerable<IRun> runs = ClonedAlgorithms.Select(alg => alg.Runs.FirstOrDefault()).Where(run => run != null);
     350      IEnumerable<KeyValuePair<string, IItem>> resultCollections = runs.Where(x => x != null).SelectMany(x => x.Results).ToList();
     351
     352      foreach (IResult result in ExtractAndAggregateResults<IntValue>(resultCollections))
     353        results.Add(result.Name, result.Value);
     354      foreach (IResult result in ExtractAndAggregateResults<DoubleValue>(resultCollections))
     355        results.Add(result.Name, result.Value);
     356      foreach (IResult result in ExtractAndAggregateResults<PercentValue>(resultCollections))
     357        results.Add(result.Name, result.Value);
     358
     359      results.Add("Execution Time", new TimeSpanValue(TimeSpan.FromMilliseconds(clonedAlgorithms.Select(x => x.ExecutionTime.TotalMilliseconds).Sum())));
     360      results.Add("CrossValidation Folds", new RunCollection(runs));
     361    }
     362
     363    private static IEnumerable<IResult> ExtractAndAggregateResults<T>(IEnumerable<KeyValuePair<string, IItem>> results)
     364  where T : class, IItem, new() {
     365      Dictionary<string, List<double>> resultValues = new Dictionary<string, List<double>>();
     366      foreach (var resultValue in results.Where(r => r.Value.GetType() == typeof(T))) {
     367        if (!resultValues.ContainsKey(resultValue.Key))
     368          resultValues[resultValue.Key] = new List<double>();
     369        resultValues[resultValue.Key].Add(ConvertToDouble(resultValue.Value));
     370      }
     371
     372      DoubleValue doubleValue;
     373      if (typeof(T) == typeof(PercentValue))
     374        doubleValue = new PercentValue();
     375      else if (typeof(T) == typeof(DoubleValue))
     376        doubleValue = new DoubleValue();
     377      else if (typeof(T) == typeof(IntValue))
     378        doubleValue = new DoubleValue();
     379      else
     380        throw new NotSupportedException();
     381
     382      List<IResult> aggregatedResults = new List<IResult>();
     383      foreach (KeyValuePair<string, List<double>> resultValue in resultValues) {
     384        doubleValue.Value = resultValue.Value.Average();
     385        aggregatedResults.Add(new Result(resultValue.Key, (IItem)doubleValue.Clone()));
     386        doubleValue.Value = resultValue.Value.StandardDeviation();
     387        aggregatedResults.Add(new Result(resultValue.Key + " StdDev", (IItem)doubleValue.Clone()));
     388      }
     389      return aggregatedResults;
     390    }
     391
     392    private static double ConvertToDouble(IItem item) {
     393      if (item is DoubleValue) return ((DoubleValue)item).Value;
     394      else if (item is IntValue) return ((IntValue)item).Value;
     395      else throw new NotSupportedException("Could not convert any item type to double");
     396    }
     397
     398    #endregion
     399
    285400    #region events
    286401    private void RegisterEvents() {
    287402      Folds.ValueChanged += new EventHandler(Folds_ValueChanged);
    288       NumberOfWorkers.ValueChanged += new EventHandler(NumberOfWorkers_ValueChanged);
     403      SamplesStart.ValueChanged += new EventHandler(SamplesStart_ValueChanged);
     404      SamplesEnd.ValueChanged += new EventHandler(SamplesEnd_ValueChanged);
    289405      RegisterClonedAlgorithmsEvents();
    290406      RegisterRunsEvents();
     407    }
     408    private void DeregisterEvents() {
     409      Folds.ValueChanged -= new EventHandler(Folds_ValueChanged);
     410      SamplesStart.ValueChanged -= new EventHandler(SamplesStart_ValueChanged);
     411      SamplesEnd.ValueChanged -= new EventHandler(SamplesEnd_ValueChanged);
     412      DeregisterClonedAlgorithmsEvents();
     413      DeregisterRunsEvents();
     414
    291415    }
    292416    private void Folds_ValueChanged(object sender, EventArgs e) {
     
    294418        throw new InvalidOperationException("Can not change number of folds if the execution state is not prepared.");
    295419    }
    296     private void NumberOfWorkers_ValueChanged(object sender, EventArgs e) {
    297       if (ExecutionState == ExecutionState.Started) {
    298         int workers = numberOfWorkers.Value;
    299         int runningWorkers = clonedAlgorithms.Count(alg => alg.ExecutionState == ExecutionState.Started);
    300 
    301         foreach (IAlgorithm algorithm in clonedAlgorithms) {
    302           if (algorithm.ExecutionState == ExecutionState.Prepared ||
    303               algorithm.ExecutionState == ExecutionState.Paused) {
    304             if (runningWorkers < workers) {
    305               algorithm.Start();
    306               runningWorkers++;
    307             }
    308           } else if (algorithm.ExecutionState == ExecutionState.Started) {
    309             if (runningWorkers > workers) {
    310               algorithm.Pause();
    311               runningWorkers--;
    312             }
    313           }
    314         }
    315       }
     420    private void SamplesStart_ValueChanged(object sender, EventArgs e) {
     421      if (Problem != null) Problem.DataAnalysisProblemData.TrainingSamplesStart.Value = SamplesStart.Value;
     422    }
     423    private void SamplesEnd_ValueChanged(object sender, EventArgs e) {
     424      if (Problem != null) Problem.DataAnalysisProblemData.TrainingSamplesEnd.Value = SamplesEnd.Value;
    316425    }
    317426
     
    338447      }
    339448      cachedProblem = (IDataAnalysisProblem)algorithm.Problem;
     449      OnProblemChanged();
     450    }
     451    public event EventHandler ProblemChanged;
     452    private void OnProblemChanged() {
     453      EventHandler handler = ProblemChanged;
     454      if (handler != null) handler(this, EventArgs.Empty);
     455
    340456      SamplesStart.Value = 0;
    341       if (algorithm.Problem != null)
     457      if (Problem != null)
    342458        SamplesEnd.Value = Problem.DataAnalysisProblemData.Dataset.Rows;
    343459      else
    344460        SamplesEnd.Value = 0;
    345       OnProblemChanged();
    346     }
    347     public event EventHandler ProblemChanged;
    348     private void OnProblemChanged() {
    349       EventHandler handler = ProblemChanged;
    350       if (handler != null) handler(this, EventArgs.Empty);
    351461    }
    352462
     
    371481        RegisterClonedAlgorithmEvents(algorithm);
    372482    }
     483    private void DeregisterClonedAlgorithmsEvents() {
     484      clonedAlgorithms.ItemsAdded -= new CollectionItemsChangedEventHandler<IAlgorithm>(ClonedAlgorithms_ItemsAdded);
     485      clonedAlgorithms.ItemsRemoved -= new CollectionItemsChangedEventHandler<IAlgorithm>(ClonedAlgorithms_ItemsRemoved);
     486      clonedAlgorithms.CollectionReset -= new CollectionItemsChangedEventHandler<IAlgorithm>(ClonedAlgorithms_CollectionReset);
     487      foreach (IAlgorithm algorithm in clonedAlgorithms)
     488        DeregisterClonedAlgorithmEvents(algorithm);
     489    }
    373490    private void ClonedAlgorithms_ItemsAdded(object sender, CollectionItemsChangedEventArgs<IAlgorithm> e) {
    374491      foreach (IAlgorithm algorithm in e.Items)
     
    435552          if (preparedAlgorithm != null) preparedAlgorithm.Start();
    436553        }
    437         if (clonedAlgorithms.All(alg => alg.ExecutionState == ExecutionState.Stopped))
    438           OnStopped();
    439         else if (stopPending && clonedAlgorithms.All(alg => alg.ExecutionState == ExecutionState.Prepared || alg.ExecutionState == ExecutionState.Stopped))
    440           OnStopped();
     554        if (ExecutionState != ExecutionState.Stopped) {
     555          if (clonedAlgorithms.All(alg => alg.ExecutionState == ExecutionState.Stopped))
     556            OnStopped();
     557          else if (stopPending &&
     558                   clonedAlgorithms.All(
     559                     alg => alg.ExecutionState == ExecutionState.Prepared || alg.ExecutionState == ExecutionState.Stopped))
     560            OnStopped();
     561        }
    441562      }
    442563    }
     
    449570      runs.ItemsRemoved += new CollectionItemsChangedEventHandler<IRun>(Runs_ItemsRemoved);
    450571    }
     572    private void DeregisterRunsEvents() {
     573      runs.CollectionReset -= new CollectionItemsChangedEventHandler<IRun>(Runs_CollectionReset);
     574      runs.ItemsAdded -= new CollectionItemsChangedEventHandler<IRun>(Runs_ItemsAdded);
     575      runs.ItemsRemoved -= new CollectionItemsChangedEventHandler<IRun>(Runs_ItemsRemoved);
     576    }
    451577    private void Runs_CollectionReset(object sender, CollectionItemsChangedEventArgs<IRun> e) {
    452578      foreach (IRun run in e.OldItems) {
     
    454580        run.Results.TryGetValue("Execution Time", out item);
    455581        TimeSpanValue executionTime = item as TimeSpanValue;
    456         if (executionTime != null) ExecutionTime -= executionTime.Value;
     582        if (executionTime != null) ExecutionTime = this.executionTime - executionTime.Value;
    457583      }
    458584      foreach (IRun run in e.Items) {
     
    460586        run.Results.TryGetValue("Execution Time", out item);
    461587        TimeSpanValue executionTime = item as TimeSpanValue;
    462         if (executionTime != null) ExecutionTime += executionTime.Value;
    463       }
     588        if (executionTime != null) ExecutionTime = this.executionTime + executionTime.Value;
     589      }
     590      runsCounter = Runs.Count;
    464591    }
    465592    private void Runs_ItemsAdded(object sender, CollectionItemsChangedEventArgs<IRun> e) {
     
    468595        run.Results.TryGetValue("Execution Time", out item);
    469596        TimeSpanValue executionTime = item as TimeSpanValue;
    470         if (executionTime != null) ExecutionTime += executionTime.Value;
     597        if (executionTime != null) this.executionTime = this.executionTime + executionTime.Value;
    471598      }
    472599    }
     
    476603        run.Results.TryGetValue("Execution Time", out item);
    477604        TimeSpanValue executionTime = item as TimeSpanValue;
    478         if (executionTime != null) ExecutionTime -= executionTime.Value;
     605        if (executionTime != null) ExecutionTime = this.executionTime - executionTime.Value;
    479606      }
    480607    }
     
    516643    private void OnStopped() {
    517644      stopPending = false;
     645      runsCounter++;
     646      runs.Add(new Run(string.Format("{0} Run {1}", Name, runsCounter), this));
    518647      ExecutionState = ExecutionState.Stopped;
    519       //TODO create run;
    520648      EventHandler handler = Stopped;
    521649      if (handler != null) handler(this, EventArgs.Empty);
     
    526654      if (handler != null) handler(this, new EventArgs<Exception>(exception));
    527655    }
     656    public event EventHandler StoreAlgorithmInEachRunChanged;
     657    private void OnStoreAlgorithmInEachRunChanged() {
     658      EventHandler handler = StoreAlgorithmInEachRunChanged;
     659      if (handler != null) handler(this, EventArgs.Empty);
     660    }
    528661    #endregion
    529662  }
  • branches/HeuristicLab.Classification/HeuristicLab.Algorithms.DataAnalysis/3.3/HeuristicLab.Algorithms.DataAnalysis-3.3.csproj

    r4536 r4561  
    148148    <Reference Include="System.Data" />
    149149    <Reference Include="System.Drawing" />
     150    <Reference Include="System.Windows.Forms" />
    150151    <Reference Include="System.Xml" />
    151152  </ItemGroup>
Note: See TracChangeset for help on using the changeset viewer.