Free cookie consent management tool by TermsFeed Policy Generator

source: branches/HeuristicLab.Modeling Database Backend/sources/HeuristicLab.CEDMA.Server/3.3/Problem.cs @ 2198

Last change on this file since 2198 was 2198, checked in by gkronber, 15 years ago

Fixed a few bugs in CEDMA dispatching. #712

File size: 4.0 KB
Line 
1#region License Information
2/* HeuristicLab
3 * Copyright (C) 2002-2008 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
4 *
5 * This file is part of HeuristicLab.
6 *
7 * HeuristicLab is free software: you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation, either version 3 of the License, or
10 * (at your option) any later version.
11 *
12 * HeuristicLab is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU General Public License
18 * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
19 */
20#endregion
21
22using System;
23using System.Collections.Generic;
24using System.Linq;
25using System.Text;
26using HeuristicLab.Core;
27using System.Xml;
28using HeuristicLab.CEDMA.DB.Interfaces;
29using HeuristicLab.Operators;
30
31namespace HeuristicLab.CEDMA.Server {
32
33
34  /// <summary>
35  /// Problem describes the data mining task.
36  /// Contains the actual data and meta-data:
37  ///  * which variables should be modelled
38  ///  * regression, time-series or classification problem
39  /// </summary>
40  public class Problem {
41    internal event EventHandler Changed;
42
43    private HeuristicLab.DataAnalysis.Dataset dataset;
44    public HeuristicLab.DataAnalysis.Dataset Dataset {
45      get { return dataset; }
46      set {
47        if (value != dataset) {
48          dataset = value;
49        }
50      }
51    }
52
53    private int trainingSamplesStart;
54    public int TrainingSamplesStart {
55      get { return trainingSamplesStart; }
56      set { trainingSamplesStart = value; }
57    }
58
59    private int trainingSamplesEnd;
60    public int TrainingSamplesEnd {
61      get { return trainingSamplesEnd; }
62      set { trainingSamplesEnd = value; }
63    }
64
65    private int validationSamplesStart;
66    public int ValidationSamplesStart {
67      get { return validationSamplesStart; }
68      set { validationSamplesStart = value; }
69    }
70
71    private int validationSamplesEnd;
72    public int ValidationSamplesEnd {
73      get { return validationSamplesEnd; }
74      set { validationSamplesEnd = value; }
75    }
76
77    private int testSamplesStart;
78    public int TestSamplesStart {
79      get { return testSamplesStart; }
80      set { testSamplesStart = value; }
81    }
82
83    private int testSamplesEnd;
84    public int TestSamplesEnd {
85      get { return testSamplesEnd; }
86      set { testSamplesEnd = value; }
87    }
88
89    private List<int> allowedInputVariables;
90    public List<int> AllowedInputVariables {
91      get { return allowedInputVariables; }
92    }
93
94    private List<int> allowedTargetVariables;
95    public List<int> AllowedTargetVariables {
96      get { return allowedTargetVariables; }
97    }
98
99    private bool autoRegressive;
100    public bool AutoRegressive {
101      get { return autoRegressive; }
102      set { autoRegressive = value; }
103    }
104
105    private int minTimeOffset;
106    public int MinTimeOffset {
107      get { return minTimeOffset; }
108      set { minTimeOffset = value; }
109    }
110
111    private int maxTimeOffset;
112    public int MaxTimeOffset {
113      get { return maxTimeOffset; }
114      set { maxTimeOffset = value; }
115    }
116
117    private LearningTask learningTask;
118    public LearningTask LearningTask {
119      get { return learningTask; }
120      set { learningTask = value; }
121    }
122
123    public Problem()
124      : base() {
125      allowedInputVariables = new List<int>();
126      allowedTargetVariables = new List<int>();
127      Dataset = new HeuristicLab.DataAnalysis.Dataset();
128    }
129
130    public string GetVariableName(int index) {
131      return dataset.GetVariableName(index);
132    }
133
134    public IView CreateView() {
135      return new ProblemView(this);
136    }
137
138    internal void FireChanged() {
139      if (Changed != null) Changed(this, new EventArgs());
140    }
141  }
142}
Note: See TracBrowser for help on using the repository browser.