Last change
on this file since 9674 was
7953,
checked in by spimming, 13 years ago
|
#1807:
- added file dialog to select csv problem file
- wizard page to select target variable
- plugin dependencies updated
|
File size:
1.5 KB
|
Line | |
---|
1 |
|
---|
2 | using System.Linq;
|
---|
3 | using HeuristicLab.Core;
|
---|
4 | using HeuristicLab.Data;
|
---|
5 | using HeuristicLab.Problems.DataAnalysis;
|
---|
6 | namespace HeuristicLab.ExperimentGeneration.DataAnalysis.ExperimentWizard {
|
---|
7 | public partial class TargetVariablePage : HeuristicLab.ExperimentGeneration.DataAnalysis.Wizard.WizardPage {
|
---|
8 | private RegressionProblemData problem;
|
---|
9 | private DataAnalysisWizardContext context;
|
---|
10 | public DataAnalysisWizardContext Context {
|
---|
11 | get { return context; }
|
---|
12 | }
|
---|
13 |
|
---|
14 | public TargetVariablePage(DataAnalysisWizardContext context) {
|
---|
15 | InitializeComponent();
|
---|
16 | this.context = context;
|
---|
17 | }
|
---|
18 |
|
---|
19 | private void ProblemDataViewPage_WizardNext(object sender, Wizard.WizardPageEventArgs e) {
|
---|
20 | StringValue selectedValue = problem.TargetVariableParameter.ValidValues.FirstOrDefault(x => x.Value == (string)cmbTargetVariable.SelectedItem);
|
---|
21 | problem.TargetVariableParameter.Value = selectedValue;
|
---|
22 | }
|
---|
23 |
|
---|
24 | private void ProblemDataViewPage_SetActive(object sender, System.ComponentModel.CancelEventArgs e) {
|
---|
25 | cmbTargetVariable.Items.Clear();
|
---|
26 | problem = (RegressionProblemData)Context.Problem.ProblemData;
|
---|
27 | ItemSet<StringValue> targetValues = problem.TargetVariableParameter.ValidValues;
|
---|
28 | foreach (StringValue value in targetValues) {
|
---|
29 | cmbTargetVariable.Items.Add(value.Value);
|
---|
30 | }
|
---|
31 | cmbTargetVariable.SelectedItem = problem.TargetVariable;
|
---|
32 | stringConvertibleMatrixView.Content = Context.Problem.ProblemData.Dataset;
|
---|
33 | SetWizardButton(Wizard.WizardButtons.Next);
|
---|
34 | }
|
---|
35 | }
|
---|
36 | }
|
---|
Note: See
TracBrowser
for help on using the repository browser.