Free cookie consent management tool by TermsFeed Policy Generator

source: trunk/sources/HeuristicLab.CEDMA.DB.Interfaces/3.3/Ontology.cs @ 1875

Last change on this file since 1875 was 1873, checked in by gkronber, 16 years ago

Worked on different dispatching of deterministic and non-deterministic modeling algorithms. #635

File size: 11.4 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 TypeDataSet {
95      get { return new Entity(CedmaNameSpace + "DataSet"); }
96    }
97    public static Entity TypeAlgorithm {
98      get { return new Entity(CedmaNameSpace + "Algorithm"); }
99    }
100    public static Entity TypeModel {
101      get { return new Entity(CedmaNameSpace + "Model"); }
102    }
103    #endregion
104
105    #region default attributes
106    public static Entity TargetVariable {
107      get { return new Entity(CedmaNameSpace + "TargetVariable"); }
108    }
109    public static Entity AlgorithmName {
110      get { return new Entity(CedmaNameSpace + "AlgorithmName"); }
111    }
112    public static Entity TrainingMeanSquaredError {
113      get { return new Entity(CedmaNameSpace + "TrainingMeanSquaredError"); }
114    }
115    public static Entity ValidationMeanSquaredError {
116      get { return new Entity(CedmaNameSpace + "ValidationMeanSquaredError"); }
117    }
118    public static Entity TestMeanSquaredError {
119      get { return new Entity(CedmaNameSpace + "TestMeanSquaredError"); }
120    }
121    public static Entity TrainingMeanAbsolutePercentageError {
122      get { return new Entity(CedmaNameSpace + "TrainingMeanAbsolutePercentageError"); }
123    }
124    public static Entity ValidationMeanAbsolutePercentageError {
125      get { return new Entity(CedmaNameSpace + "ValidationMeanAbsolutePercentageError"); }
126    }
127    public static Entity TestMeanAbsolutePercentageError {
128      get { return new Entity(CedmaNameSpace + "TestMeanAbsolutePercentageError"); }
129    }
130    public static Entity TrainingMeanAbsolutePercentageOfRangeError {
131      get { return new Entity(CedmaNameSpace + "TrainingMeanAbsolutePercentageOfRangeError"); }
132    }
133    public static Entity ValidationMeanAbsolutePercentageOfRangeError {
134      get { return new Entity(CedmaNameSpace + "ValidationMeanAbsolutePercentageOfRangeError"); }
135    }
136    public static Entity TestMeanAbsolutePercentageOfRangeError {
137      get { return new Entity(CedmaNameSpace + "TestMeanAbsolutePercentageOfRangeError"); }
138    }
139    public static Entity TrainingCoefficientOfDetermination {
140      get { return new Entity(CedmaNameSpace + "TrainingCoefficientOfDetermination"); }
141    }
142    public static Entity ValidationCoefficientOfDetermination {
143      get { return new Entity(CedmaNameSpace + "ValidationCoefficientOfDetermination"); }
144    }
145    public static Entity TestCoefficientOfDetermination {
146      get { return new Entity(CedmaNameSpace + "TestCoefficientOfDetermination"); }
147    }
148    public static Entity TrainingAccuracy {
149      get { return new Entity(CedmaNameSpace + "TrainingAccuracy"); }
150    }
151    public static Entity ValidationAccuracy {
152      get { return new Entity(CedmaNameSpace + "ValidationAccuracy"); }
153    }
154    public static Entity TestAccuracy {
155      get { return new Entity(CedmaNameSpace + "TestAccuracy"); }
156    }
157    public static Entity TrainingTheilsInequalityCoefficient {
158      get { return new Entity(CedmaNameSpace + "TrainingTheilsInequalityCoefficient"); }
159    }
160    public static Entity ValidationTheilsInequalityCoefficient {
161      get { return new Entity(CedmaNameSpace + "ValidationTheilsInequalityCoefficient"); }
162    }
163    public static Entity TestTheilsInequalityCoefficient {
164      get { return new Entity(CedmaNameSpace + "TestTheilsInequalityCoefficient"); }
165    }
166    public static Entity TreeSize {
167      get { return new Entity(CedmaNameSpace + "TreeSize"); }
168    }
169    public static Entity TreeHeight {
170      get { return new Entity(CedmaNameSpace + "TreeHeight"); }
171    }
172    public static Entity EvaluatedSolutions {
173      get { return new Entity(CedmaNameSpace + "EvaluatedSolutions"); }
174    }
175    #endregion
176
177    public static ICollection<Statement> InitialStatements {
178      get {
179        return new List<Statement> {
180          new Statement(TargetVariable, PredicateInstanceOf, TypeCategoricalAttribute),
181          new Statement(AlgorithmName, PredicateInstanceOf, TypeCategoricalAttribute),
182          new Statement(TrainingMeanSquaredError, PredicateInstanceOf, TypeOrdinalAttribute),
183          new Statement(TrainingMeanSquaredError, PredicateInstanceOf, TypeQualityAttribute),
184          new Statement(ValidationMeanSquaredError, PredicateInstanceOf, TypeOrdinalAttribute),
185          new Statement(ValidationMeanSquaredError, PredicateInstanceOf, TypeQualityAttribute),
186          new Statement(TestMeanSquaredError, PredicateInstanceOf, TypeOrdinalAttribute),
187          new Statement(TestMeanSquaredError, PredicateInstanceOf, TypeQualityAttribute),
188          new Statement(TrainingMeanAbsolutePercentageError, PredicateInstanceOf, TypeOrdinalAttribute),
189          new Statement(TrainingMeanAbsolutePercentageError, PredicateInstanceOf, TypeQualityAttribute),
190          new Statement(ValidationMeanAbsolutePercentageError, PredicateInstanceOf, TypeOrdinalAttribute),
191          new Statement(ValidationMeanAbsolutePercentageError, PredicateInstanceOf, TypeQualityAttribute),
192          new Statement(TestMeanAbsolutePercentageError, PredicateInstanceOf, TypeOrdinalAttribute),
193          new Statement(TestMeanAbsolutePercentageError, PredicateInstanceOf, TypeQualityAttribute),
194          new Statement(TrainingMeanAbsolutePercentageOfRangeError, PredicateInstanceOf, TypeOrdinalAttribute),
195          new Statement(TrainingMeanAbsolutePercentageOfRangeError, PredicateInstanceOf, TypeQualityAttribute),
196          new Statement(ValidationMeanAbsolutePercentageOfRangeError, PredicateInstanceOf, TypeOrdinalAttribute),
197          new Statement(ValidationMeanAbsolutePercentageOfRangeError, PredicateInstanceOf, TypeQualityAttribute),
198          new Statement(TestMeanAbsolutePercentageOfRangeError, PredicateInstanceOf, TypeOrdinalAttribute),
199          new Statement(TestMeanAbsolutePercentageOfRangeError, PredicateInstanceOf, TypeQualityAttribute),
200          new Statement(TrainingCoefficientOfDetermination, PredicateInstanceOf, TypeOrdinalAttribute),
201          new Statement(TrainingCoefficientOfDetermination, PredicateInstanceOf, TypeQualityAttribute),
202          new Statement(ValidationCoefficientOfDetermination, PredicateInstanceOf, TypeOrdinalAttribute),
203          new Statement(ValidationCoefficientOfDetermination, PredicateInstanceOf, TypeQualityAttribute),
204          new Statement(TestCoefficientOfDetermination, PredicateInstanceOf, TypeOrdinalAttribute),
205          new Statement(TestCoefficientOfDetermination, PredicateInstanceOf, TypeQualityAttribute),
206          new Statement(TrainingAccuracy, PredicateInstanceOf, TypeOrdinalAttribute),
207          new Statement(TrainingAccuracy, PredicateInstanceOf, TypeQualityAttribute),
208          new Statement(ValidationAccuracy, PredicateInstanceOf, TypeOrdinalAttribute),
209          new Statement(ValidationAccuracy, PredicateInstanceOf, TypeQualityAttribute),
210          new Statement(TestAccuracy, PredicateInstanceOf, TypeOrdinalAttribute),
211          new Statement(TestAccuracy, PredicateInstanceOf, TypeQualityAttribute),
212          new Statement(TrainingTheilsInequalityCoefficient, PredicateInstanceOf, TypeOrdinalAttribute),
213          new Statement(TrainingTheilsInequalityCoefficient, PredicateInstanceOf, TypeQualityAttribute),
214          new Statement(ValidationTheilsInequalityCoefficient, PredicateInstanceOf, TypeOrdinalAttribute),
215          new Statement(ValidationTheilsInequalityCoefficient, PredicateInstanceOf, TypeQualityAttribute),
216          new Statement(TestTheilsInequalityCoefficient, PredicateInstanceOf, TypeOrdinalAttribute),
217          new Statement(TestTheilsInequalityCoefficient, PredicateInstanceOf, TypeQualityAttribute),
218
219          new Statement(TreeSize, PredicateInstanceOf, TypeOrdinalAttribute),
220          new Statement(TreeSize, PredicateInstanceOf, TypeComplexityAttribute),
221          new Statement(TreeHeight, PredicateInstanceOf, TypeOrdinalAttribute),
222          new Statement(TreeHeight, PredicateInstanceOf, TypeComplexityAttribute),
223          new Statement(EvaluatedSolutions, PredicateInstanceOf, TypeOrdinalAttribute)
224        };
225      }
226    }
227
228
229    /// <summary>
230    /// Wildcard entity for filtering.
231    /// </summary>
232    public static Entity AnyEntity {
233      get { return new Entity(null); }
234    }
235  }
236}
Note: See TracBrowser for help on using the repository browser.