Free cookie consent management tool by TermsFeed Policy Generator

source: branches/3.2/tools/CedmaExporter/Ontology.cs @ 10963

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

Added first crude implementation of CEDMA exporter. #715

File size: 16.1 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 System.Runtime.Serialization;
27using SemWeb;
28
29namespace CedmaExporter {
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    /// Meta attribute to indicate potential attributes of models.
38    /// </summary>
39    public static Entity TypeModelAttribute {
40      get { return new Entity(CedmaNameSpace + "TypeModelAttribute"); }
41    }
42    /// <summary>
43    /// Meta attribute to indicate potential attributes of input variables.
44    /// </summary>
45    public static Entity TypeInputVariableAttribute {
46      get { return new Entity(CedmaNameSpace + "TypeInputVariableAttribute"); }
47    }
48    /// <summary>
49    /// Meta attribute to indicate potential attributes of problems (data sets).
50    /// </summary>
51    public static Entity TypeProblemAttribute {
52      get { return new Entity(CedmaNameSpace + "TypeProblemAttribute"); }
53    }
54    /// <summary>
55    /// Attribute value is ordinal, values can be sorted.
56    /// Examples are quality measures or complexity measures.
57    /// </summary>
58    public static Entity TypeOrdinalAttribute {
59      get { return new Entity(CedmaNameSpace + "TypeOrdinalAttribute"); }
60    }
61    /// <summary>
62    /// Attribute value is categorical and thus can't be sorted.
63    /// Examples is target-variable.
64    /// </summary>
65    public static Entity TypeCategoricalAttribute {
66      get { return new Entity(CedmaNameSpace + "TypeCategoricalAttribute"); }
67    }
68    /// <summary>
69    /// Attribute is a quality measure
70    /// </summary>
71    public static Entity TypeQualityAttribute {
72      get { return new Entity(CedmaNameSpace + "TypeQualityAttribute"); }
73    }
74    /// <summary>
75    /// Attribute is a complexity measure
76    /// </summary>
77    public static Entity TypeComplexityAttribute {
78      get { return new Entity(CedmaNameSpace + "TypeComplexityAttribute"); }
79    }
80    #endregion
81
82    #region meta-data predicates
83    public static Entity Name {
84      get { return new Entity(CedmaNameSpace + "Name"); }
85    }
86    /// <summary>
87    /// Each entity can have a serialized XML representation that can be loaded in HL.
88    /// </summary>
89    public static Entity SerializedData {
90      get { return new Entity(CedmaNameSpace + "SerializedData"); }
91    }
92    /// <summary>
93    /// Link from data set to model.
94    /// A data set can have multiple models.
95    /// </summary>
96    public static Entity HasModel {
97      get { return new Entity(CedmaNameSpace + "Model"); }
98    }
99    /// <summary>
100    /// Link from model to algorithm.
101    /// An algorithm can generate multiple models, each model is generated by exactly one algorithm.
102    /// </summary>
103    public static Entity GeneratedBy {
104      get { return new Entity(CedmaNameSpace + "GeneratedBy"); }
105    }
106    /// <summary>
107    /// Link from model to input variable impact
108    /// Each model can have multiple input variables and each of the input variables can have a different impact on the model.
109    /// </summary>
110    public static Entity HasInputVariable {
111      get { return new Entity(CedmaNameSpace + "InputVariable"); }
112    }
113    #endregion
114
115    #region types and type relations
116    public static Entity InstanceOf {
117      get { return new Entity(CedmaNameSpace + "InstanceOf"); }
118    }
119    public static Entity TypeDataSet {
120      get { return new Entity(CedmaNameSpace + "DataSet"); }
121    }
122    public static Entity TypeAlgorithm {
123      get { return new Entity(CedmaNameSpace + "Algorithm"); }
124    }
125    public static Entity TypeModel {
126      get { return new Entity(CedmaNameSpace + "Model"); }
127    }
128    public static Entity TypeVariableImpact {
129      get { return new Entity(CedmaNameSpace + "VariableImpact"); }
130    }
131    #endregion
132
133    #region attributes for models
134    public static Entity TargetVariable {
135      get { return new Entity(CedmaNameSpace + "TargetVariable"); }
136    }
137    public static Entity TrainingMeanSquaredError {
138      get { return new Entity(CedmaNameSpace + "TrainingMeanSquaredError"); }
139    }
140    public static Entity ValidationMeanSquaredError {
141      get { return new Entity(CedmaNameSpace + "ValidationMeanSquaredError"); }
142    }
143    public static Entity TestMeanSquaredError {
144      get { return new Entity(CedmaNameSpace + "TestMeanSquaredError"); }
145    }
146    public static Entity TrainingMeanAbsolutePercentageError {
147      get { return new Entity(CedmaNameSpace + "TrainingMeanAbsolutePercentageError"); }
148    }
149    public static Entity ValidationMeanAbsolutePercentageError {
150      get { return new Entity(CedmaNameSpace + "ValidationMeanAbsolutePercentageError"); }
151    }
152    public static Entity TestMeanAbsolutePercentageError {
153      get { return new Entity(CedmaNameSpace + "TestMeanAbsolutePercentageError"); }
154    }
155    public static Entity TrainingMeanAbsolutePercentageOfRangeError {
156      get { return new Entity(CedmaNameSpace + "TrainingMeanAbsolutePercentageOfRangeError"); }
157    }
158    public static Entity ValidationMeanAbsolutePercentageOfRangeError {
159      get { return new Entity(CedmaNameSpace + "ValidationMeanAbsolutePercentageOfRangeError"); }
160    }
161    public static Entity TestMeanAbsolutePercentageOfRangeError {
162      get { return new Entity(CedmaNameSpace + "TestMeanAbsolutePercentageOfRangeError"); }
163    }
164    public static Entity TrainingCoefficientOfDetermination {
165      get { return new Entity(CedmaNameSpace + "TrainingCoefficientOfDetermination"); }
166    }
167    public static Entity ValidationCoefficientOfDetermination {
168      get { return new Entity(CedmaNameSpace + "ValidationCoefficientOfDetermination"); }
169    }
170    public static Entity TestCoefficientOfDetermination {
171      get { return new Entity(CedmaNameSpace + "TestCoefficientOfDetermination"); }
172    }
173    public static Entity TrainingVarianceAccountedFor {
174      get { return new Entity(CedmaNameSpace + "TrainingVarianceAccountedFor"); }
175    }
176    public static Entity ValidationVarianceAccountedFor {
177      get { return new Entity(CedmaNameSpace + "ValidationVarianceAccountedFor"); }
178    }
179    public static Entity TestVarianceAccountedFor {
180      get { return new Entity(CedmaNameSpace + "TestVarianceAccountedFor"); }
181    }
182    public static Entity TrainingAccuracy {
183      get { return new Entity(CedmaNameSpace + "TrainingAccuracy"); }
184    }
185    public static Entity ValidationAccuracy {
186      get { return new Entity(CedmaNameSpace + "ValidationAccuracy"); }
187    }
188    public static Entity TestAccuracy {
189      get { return new Entity(CedmaNameSpace + "TestAccuracy"); }
190    }
191    public static Entity TrainingTheilsInequalityCoefficient {
192      get { return new Entity(CedmaNameSpace + "TrainingTheilsInequalityCoefficient"); }
193    }
194    public static Entity ValidationTheilsInequalityCoefficient {
195      get { return new Entity(CedmaNameSpace + "ValidationTheilsInequalityCoefficient"); }
196    }
197    public static Entity TestTheilsInequalityCoefficient {
198      get { return new Entity(CedmaNameSpace + "TestTheilsInequalityCoefficient"); }
199    }
200    public static Entity TreeSize {
201      get { return new Entity(CedmaNameSpace + "TreeSize"); }
202    }
203    public static Entity TreeHeight {
204      get { return new Entity(CedmaNameSpace + "TreeHeight"); }
205    }
206    public static Entity EvaluatedSolutions {
207      get { return new Entity(CedmaNameSpace + "EvaluatedSolutions"); }
208    }
209    #endregion
210    #region attributes for input variables
211    public static Entity EvaluationImpact {
212      get { return new Entity(CedmaNameSpace + "EvaluationImpact"); }
213    }
214    public static Entity QualityImpact {
215      get { return new Entity(CedmaNameSpace + "QualityImpact"); }
216    }
217    #endregion
218
219    public static ICollection<Statement> InitialStatements {
220      get {
221        return new List<Statement> {
222          new Statement(TargetVariable, InstanceOf, TypeCategoricalAttribute),
223          new Statement(TargetVariable, InstanceOf, TypeModelAttribute),
224         
225          new Statement(TrainingMeanSquaredError, InstanceOf, TypeOrdinalAttribute),
226          new Statement(TrainingMeanSquaredError, InstanceOf, TypeQualityAttribute),
227          new Statement(TrainingMeanSquaredError, InstanceOf, TypeModelAttribute),
228         
229          new Statement(ValidationMeanSquaredError, InstanceOf, TypeOrdinalAttribute),
230          new Statement(ValidationMeanSquaredError, InstanceOf, TypeQualityAttribute),
231          new Statement(ValidationMeanSquaredError, InstanceOf, TypeModelAttribute),
232
233          new Statement(TestMeanSquaredError, InstanceOf, TypeOrdinalAttribute),
234          new Statement(TestMeanSquaredError, InstanceOf, TypeQualityAttribute),
235          new Statement(TestMeanSquaredError, InstanceOf, TypeModelAttribute),
236         
237          new Statement(TrainingMeanAbsolutePercentageError, InstanceOf, TypeOrdinalAttribute),
238          new Statement(TrainingMeanAbsolutePercentageError, InstanceOf, TypeQualityAttribute),
239          new Statement(TrainingMeanAbsolutePercentageError, InstanceOf, TypeModelAttribute),
240         
241          new Statement(ValidationMeanAbsolutePercentageError, InstanceOf, TypeOrdinalAttribute),
242          new Statement(ValidationMeanAbsolutePercentageError, InstanceOf, TypeQualityAttribute),
243          new Statement(ValidationMeanAbsolutePercentageError, InstanceOf, TypeModelAttribute),
244         
245          new Statement(TestMeanAbsolutePercentageError, InstanceOf, TypeOrdinalAttribute),
246          new Statement(TestMeanAbsolutePercentageError, InstanceOf, TypeQualityAttribute),
247          new Statement(TestMeanAbsolutePercentageError, InstanceOf, TypeModelAttribute),
248         
249          new Statement(TrainingMeanAbsolutePercentageOfRangeError, InstanceOf, TypeOrdinalAttribute),
250          new Statement(TrainingMeanAbsolutePercentageOfRangeError, InstanceOf, TypeQualityAttribute),
251          new Statement(TrainingMeanAbsolutePercentageOfRangeError, InstanceOf, TypeModelAttribute),
252         
253          new Statement(ValidationMeanAbsolutePercentageOfRangeError, InstanceOf, TypeOrdinalAttribute),
254          new Statement(ValidationMeanAbsolutePercentageOfRangeError, InstanceOf, TypeQualityAttribute),
255          new Statement(ValidationMeanAbsolutePercentageOfRangeError, InstanceOf, TypeModelAttribute),
256         
257          new Statement(TestMeanAbsolutePercentageOfRangeError, InstanceOf, TypeOrdinalAttribute),
258          new Statement(TestMeanAbsolutePercentageOfRangeError, InstanceOf, TypeQualityAttribute),
259          new Statement(TestMeanAbsolutePercentageOfRangeError, InstanceOf, TypeModelAttribute),
260         
261          new Statement(TrainingCoefficientOfDetermination, InstanceOf, TypeOrdinalAttribute),
262          new Statement(TrainingCoefficientOfDetermination, InstanceOf, TypeQualityAttribute),
263          new Statement(TrainingCoefficientOfDetermination, InstanceOf, TypeModelAttribute),
264         
265          new Statement(ValidationCoefficientOfDetermination, InstanceOf, TypeOrdinalAttribute),
266          new Statement(ValidationCoefficientOfDetermination, InstanceOf, TypeQualityAttribute),
267          new Statement(ValidationCoefficientOfDetermination, InstanceOf, TypeModelAttribute),
268         
269          new Statement(TestCoefficientOfDetermination, InstanceOf, TypeOrdinalAttribute),
270          new Statement(TestCoefficientOfDetermination, InstanceOf, TypeQualityAttribute),
271          new Statement(TestCoefficientOfDetermination, InstanceOf, TypeModelAttribute),
272         
273          new Statement(TrainingVarianceAccountedFor, InstanceOf, TypeOrdinalAttribute),
274          new Statement(TrainingVarianceAccountedFor, InstanceOf, TypeQualityAttribute),
275          new Statement(TrainingVarianceAccountedFor, InstanceOf, TypeModelAttribute),
276         
277          new Statement(ValidationVarianceAccountedFor, InstanceOf, TypeOrdinalAttribute),
278          new Statement(ValidationVarianceAccountedFor, InstanceOf, TypeQualityAttribute),
279          new Statement(ValidationVarianceAccountedFor, InstanceOf, TypeModelAttribute),
280         
281          new Statement(TestVarianceAccountedFor, InstanceOf, TypeOrdinalAttribute),
282          new Statement(TestVarianceAccountedFor, InstanceOf, TypeQualityAttribute),
283          new Statement(TestVarianceAccountedFor, InstanceOf, TypeModelAttribute),
284         
285          new Statement(TrainingAccuracy, InstanceOf, TypeOrdinalAttribute),
286          new Statement(TrainingAccuracy, InstanceOf, TypeQualityAttribute),
287          new Statement(TrainingAccuracy, InstanceOf, TypeModelAttribute),
288         
289          new Statement(ValidationAccuracy, InstanceOf, TypeOrdinalAttribute),
290          new Statement(ValidationAccuracy, InstanceOf, TypeQualityAttribute),
291          new Statement(ValidationAccuracy, InstanceOf, TypeModelAttribute),
292
293          new Statement(TestAccuracy, InstanceOf, TypeOrdinalAttribute),
294          new Statement(TestAccuracy, InstanceOf, TypeQualityAttribute),
295          new Statement(TestAccuracy, InstanceOf, TypeModelAttribute),
296         
297          new Statement(TrainingTheilsInequalityCoefficient, InstanceOf, TypeOrdinalAttribute),
298          new Statement(TrainingTheilsInequalityCoefficient, InstanceOf, TypeQualityAttribute),
299          new Statement(TrainingTheilsInequalityCoefficient, InstanceOf, TypeModelAttribute),
300         
301          new Statement(ValidationTheilsInequalityCoefficient, InstanceOf, TypeOrdinalAttribute),
302          new Statement(ValidationTheilsInequalityCoefficient, InstanceOf, TypeQualityAttribute),
303          new Statement(ValidationTheilsInequalityCoefficient, InstanceOf, TypeModelAttribute),
304         
305          new Statement(TestTheilsInequalityCoefficient, InstanceOf, TypeOrdinalAttribute),
306          new Statement(TestTheilsInequalityCoefficient, InstanceOf, TypeQualityAttribute),
307          new Statement(TestTheilsInequalityCoefficient, InstanceOf, TypeModelAttribute),
308
309          new Statement(TreeSize, InstanceOf, TypeOrdinalAttribute),
310          new Statement(TreeSize, InstanceOf, TypeComplexityAttribute),
311          new Statement(TreeSize, InstanceOf, TypeModelAttribute),
312         
313          new Statement(TreeHeight, InstanceOf, TypeOrdinalAttribute),
314          new Statement(TreeHeight, InstanceOf, TypeComplexityAttribute),
315          new Statement(TreeHeight, InstanceOf, TypeModelAttribute),
316         
317          new Statement(EvaluatedSolutions, InstanceOf, TypeOrdinalAttribute),
318          new Statement(EvaluatedSolutions, InstanceOf, TypeModelAttribute),
319
320          new Statement(Name, InstanceOf, TypeCategoricalAttribute),
321          new Statement(Name, InstanceOf, TypeModelAttribute),
322          new Statement(Name, InstanceOf, TypeProblemAttribute),
323          new Statement(Name, InstanceOf, TypeInputVariableAttribute),
324         
325          new Statement(QualityImpact, InstanceOf, TypeOrdinalAttribute),
326          new Statement(QualityImpact, InstanceOf, TypeInputVariableAttribute),
327
328          new Statement(EvaluationImpact, InstanceOf, TypeOrdinalAttribute),
329          new Statement(EvaluationImpact, InstanceOf, TypeInputVariableAttribute)
330        };
331      }
332    }
333
334
335    /// <summary>
336    /// Wildcard entity for filtering.
337    /// </summary>
338    public static Entity AnyEntity {
339      get { return new Entity(null); }
340    }
341  }
342}
Note: See TracBrowser for help on using the repository browser.