Free cookie consent management tool by TermsFeed Policy Generator

source: branches/HeuristicLab.Hive_Milestone2/sources/HeuristicLab.CEDMA.DB.Interfaces/3.3/Ontology.cs @ 5593

Last change on this file since 5593 was 1529, checked in by gkronber, 16 years ago

Moved source files of plugins AdvancedOptimizationFrontEnd ... Grid into version-specific sub-folders. #576

File size: 11.5 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.CEDMA.DB.Interfaces;
27using System.Runtime.Serialization;
28
29namespace HeuristicLab.CEDMA.DB.Interfaces {
30  public static class Ontology {
31    public static string CedmaNameSpace {
32      get { return "http://www.heuristiclab.com/cedma/"; }
33    }
34
35    #region model attribute types
36    /// <summary>
37    /// Attribute value is ordinal, values can be sorted.
38    /// Examples are quality measures or complexity measures.
39    /// </summary>
40    public static Entity TypeOrdinalAttribute {
41      get { return new Entity(CedmaNameSpace + "TypeOrdinalAttribute"); }
42    }
43    /// <summary>
44    /// Attribute value is categorical and thus can't be sorted.
45    /// Examples is target-variable.
46    /// </summary>
47    public static Entity TypeCategoricalAttribute {
48      get { return new Entity(CedmaNameSpace + "TypeCategoricalAttribute"); }
49    }
50    /// <summary>
51    /// Attribute is a quality measure
52    /// </summary>
53    public static Entity TypeQualityAttribute {
54      get { return new Entity(CedmaNameSpace + "TypeQualityAttribute"); }
55    }
56    /// <summary>
57    /// Attribute is a complexity measure
58    /// </summary>
59    public static Entity TypeComplexityAttribute {
60      get { return new Entity(CedmaNameSpace + "TypeComplexityAttribute"); }
61    }
62    #endregion
63
64    #region meta-data predicates
65    public static Entity PredicateName {
66      get { return new Entity(CedmaNameSpace + "Name"); }
67    }
68    /// <summary>
69    /// Each entity can have a serialized XML representation that can be loaded in HL.
70    /// </summary>
71    public static Entity PredicateSerializedData {
72      get { return new Entity(CedmaNameSpace + "SerializedData"); }
73    }
74    /// <summary>
75    /// Link from data set to model.
76    /// A data set can have multiple models.
77    /// </summary>
78    public static Entity PredicateHasModel {
79      get { return new Entity(CedmaNameSpace + "Model"); }
80    }
81    /// <summary>
82    /// Link from model to algorithm.
83    /// An algorithm can generate multiple models, each model is generated by exactly one algorithm.
84    /// </summary>
85    public static Entity PredicateGeneratedBy {
86      get { return new Entity(CedmaNameSpace + "GeneratedBy"); }
87    }
88    #endregion
89
90    #region types and type relations
91    public static Entity PredicateInstanceOf {
92      get { return new Entity(CedmaNameSpace + "InstanceOf"); }
93    }
94    public static Entity TypeGeneticProgrammingFunctionTree {
95      get { return new Entity(CedmaNameSpace + "FunctionTree"); }
96    }
97    public static Entity TypeDataSet {
98      get { return new Entity(CedmaNameSpace + "DataSet"); }
99    }
100    public static Entity TypeAlgorithm {
101      get { return new Entity(CedmaNameSpace + "Algorithm"); }
102    }
103    public static Entity TypeModel {
104      get { return new Entity(CedmaNameSpace + "Model"); }
105    }
106    #endregion
107
108    #region default attributes
109    public static Entity TargetVariable {
110      get { return new Entity(CedmaNameSpace + "TargetVariable"); }
111    }
112    public static Entity AlgorithmName {
113      get { return new Entity(CedmaNameSpace + "AlgorithmName"); }
114    }
115    public static Entity TrainingMeanSquaredError {
116      get { return new Entity(CedmaNameSpace + "TrainingMeanSquaredError"); }
117    }
118    public static Entity ValidationMeanSquaredError {
119      get { return new Entity(CedmaNameSpace + "ValidationMeanSquaredError"); }
120    }
121    public static Entity TestMeanSquaredError {
122      get { return new Entity(CedmaNameSpace + "TestMeanSquaredError"); }
123    }
124    public static Entity TrainingMeanAbsolutePercentageError {
125      get { return new Entity(CedmaNameSpace + "TrainingMeanAbsolutePercentageError"); }
126    }
127    public static Entity ValidationMeanAbsolutePercentageError {
128      get { return new Entity(CedmaNameSpace + "ValidationMeanAbsolutePercentageError"); }
129    }
130    public static Entity TestMeanAbsolutePercentageError {
131      get { return new Entity(CedmaNameSpace + "TestMeanAbsolutePercentageError"); }
132    }
133    public static Entity TrainingMeanAbsolutePercentageOfRangeError {
134      get { return new Entity(CedmaNameSpace + "TrainingMeanAbsolutePercentageOfRangeError"); }
135    }
136    public static Entity ValidationMeanAbsolutePercentageOfRangeError {
137      get { return new Entity(CedmaNameSpace + "ValidationMeanAbsolutePercentageOfRangeError"); }
138    }
139    public static Entity TestMeanAbsolutePercentageOfRangeError {
140      get { return new Entity(CedmaNameSpace + "TestMeanAbsolutePercentageOfRangeError"); }
141    }
142    public static Entity TrainingCoefficientOfDetermination {
143      get { return new Entity(CedmaNameSpace + "TrainingCoefficientOfDetermination"); }
144    }
145    public static Entity ValidationCoefficientOfDetermination {
146      get { return new Entity(CedmaNameSpace + "ValidationCoefficientOfDetermination"); }
147    }
148    public static Entity TestCoefficientOfDetermination {
149      get { return new Entity(CedmaNameSpace + "TestCoefficientOfDetermination"); }
150    }
151    public static Entity TrainingAccuracy {
152      get { return new Entity(CedmaNameSpace + "TrainingAccuracy"); }
153    }
154    public static Entity ValidationAccuracy {
155      get { return new Entity(CedmaNameSpace + "ValidationAccuracy"); }
156    }
157    public static Entity TestAccuracy {
158      get { return new Entity(CedmaNameSpace + "TestAccuracy"); }
159    }
160    public static Entity TrainingTheilsInequalityCoefficient {
161      get { return new Entity(CedmaNameSpace + "TrainingTheilsInequalityCoefficient"); }
162    }
163    public static Entity ValidationTheilsInequalityCoefficient {
164      get { return new Entity(CedmaNameSpace + "ValidationTheilsInequalityCoefficient"); }
165    }
166    public static Entity TestTheilsInequalityCoefficient {
167      get { return new Entity(CedmaNameSpace + "TestTheilsInequalityCoefficient"); }
168    }
169    public static Entity TreeSize {
170      get { return new Entity(CedmaNameSpace + "TreeSize"); }
171    }
172    public static Entity TreeHeight {
173      get { return new Entity(CedmaNameSpace + "TreeHeight"); }
174    }
175    public static Entity EvaluatedSolutions {
176      get { return new Entity(CedmaNameSpace + "EvaluatedSolutions"); }
177    }
178    #endregion
179
180    public static ICollection<Statement> InitialStatements {
181      get {
182        return new List<Statement> {
183          new Statement(TargetVariable, PredicateInstanceOf, TypeCategoricalAttribute),
184          new Statement(AlgorithmName, PredicateInstanceOf, TypeCategoricalAttribute),
185          new Statement(TrainingMeanSquaredError, PredicateInstanceOf, TypeOrdinalAttribute),
186          new Statement(TrainingMeanSquaredError, PredicateInstanceOf, TypeQualityAttribute),
187          new Statement(ValidationMeanSquaredError, PredicateInstanceOf, TypeOrdinalAttribute),
188          new Statement(ValidationMeanSquaredError, PredicateInstanceOf, TypeQualityAttribute),
189          new Statement(TestMeanSquaredError, PredicateInstanceOf, TypeOrdinalAttribute),
190          new Statement(TestMeanSquaredError, PredicateInstanceOf, TypeQualityAttribute),
191          new Statement(TrainingMeanAbsolutePercentageError, PredicateInstanceOf, TypeOrdinalAttribute),
192          new Statement(TrainingMeanAbsolutePercentageError, PredicateInstanceOf, TypeQualityAttribute),
193          new Statement(ValidationMeanAbsolutePercentageError, PredicateInstanceOf, TypeOrdinalAttribute),
194          new Statement(ValidationMeanAbsolutePercentageError, PredicateInstanceOf, TypeQualityAttribute),
195          new Statement(TestMeanAbsolutePercentageError, PredicateInstanceOf, TypeOrdinalAttribute),
196          new Statement(TestMeanAbsolutePercentageError, PredicateInstanceOf, TypeQualityAttribute),
197          new Statement(TrainingMeanAbsolutePercentageOfRangeError, PredicateInstanceOf, TypeOrdinalAttribute),
198          new Statement(TrainingMeanAbsolutePercentageOfRangeError, PredicateInstanceOf, TypeQualityAttribute),
199          new Statement(ValidationMeanAbsolutePercentageOfRangeError, PredicateInstanceOf, TypeOrdinalAttribute),
200          new Statement(ValidationMeanAbsolutePercentageOfRangeError, PredicateInstanceOf, TypeQualityAttribute),
201          new Statement(TestMeanAbsolutePercentageOfRangeError, PredicateInstanceOf, TypeOrdinalAttribute),
202          new Statement(TestMeanAbsolutePercentageOfRangeError, PredicateInstanceOf, TypeQualityAttribute),
203          new Statement(TrainingCoefficientOfDetermination, PredicateInstanceOf, TypeOrdinalAttribute),
204          new Statement(TrainingCoefficientOfDetermination, PredicateInstanceOf, TypeQualityAttribute),
205          new Statement(ValidationCoefficientOfDetermination, PredicateInstanceOf, TypeOrdinalAttribute),
206          new Statement(ValidationCoefficientOfDetermination, PredicateInstanceOf, TypeQualityAttribute),
207          new Statement(TestCoefficientOfDetermination, PredicateInstanceOf, TypeOrdinalAttribute),
208          new Statement(TestCoefficientOfDetermination, PredicateInstanceOf, TypeQualityAttribute),
209          new Statement(TrainingAccuracy, PredicateInstanceOf, TypeOrdinalAttribute),
210          new Statement(TrainingAccuracy, PredicateInstanceOf, TypeQualityAttribute),
211          new Statement(ValidationAccuracy, PredicateInstanceOf, TypeOrdinalAttribute),
212          new Statement(ValidationAccuracy, PredicateInstanceOf, TypeQualityAttribute),
213          new Statement(TestAccuracy, PredicateInstanceOf, TypeOrdinalAttribute),
214          new Statement(TestAccuracy, PredicateInstanceOf, TypeQualityAttribute),
215          new Statement(TrainingTheilsInequalityCoefficient, PredicateInstanceOf, TypeOrdinalAttribute),
216          new Statement(TrainingTheilsInequalityCoefficient, PredicateInstanceOf, TypeQualityAttribute),
217          new Statement(ValidationTheilsInequalityCoefficient, PredicateInstanceOf, TypeOrdinalAttribute),
218          new Statement(ValidationTheilsInequalityCoefficient, PredicateInstanceOf, TypeQualityAttribute),
219          new Statement(TestTheilsInequalityCoefficient, PredicateInstanceOf, TypeOrdinalAttribute),
220          new Statement(TestTheilsInequalityCoefficient, PredicateInstanceOf, TypeQualityAttribute),
221
222          new Statement(TreeSize, PredicateInstanceOf, TypeOrdinalAttribute),
223          new Statement(TreeSize, PredicateInstanceOf, TypeComplexityAttribute),
224          new Statement(TreeHeight, PredicateInstanceOf, TypeOrdinalAttribute),
225          new Statement(TreeHeight, PredicateInstanceOf, TypeComplexityAttribute),
226          new Statement(EvaluatedSolutions, PredicateInstanceOf, TypeOrdinalAttribute)
227        };
228      }
229    }
230
231
232    /// <summary>
233    /// Wildcard entity for filtering.
234    /// </summary>
235    public static Entity AnyEntity {
236      get { return new Entity(null); }
237    }
238  }
239}
Note: See TracBrowser for help on using the repository browser.