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 |
|
---|
22 | using System;
|
---|
23 | using System.Collections.Generic;
|
---|
24 | using System.Linq;
|
---|
25 | using System.Text;
|
---|
26 | using HeuristicLab.CEDMA.DB.Interfaces;
|
---|
27 | using System.Runtime.Serialization;
|
---|
28 |
|
---|
29 | namespace 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 Name {
|
---|
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 SerializedData {
|
---|
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 HasModel {
|
---|
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 GeneratedBy {
|
---|
86 | get { return new Entity(CedmaNameSpace + "GeneratedBy"); }
|
---|
87 | }
|
---|
88 | /// <summary>
|
---|
89 | /// Link from model to input variable impact
|
---|
90 | /// Each model can have multiple input variables and each of the input variables can have a different impact on the model.
|
---|
91 | /// </summary>
|
---|
92 | public static Entity HasInputVariable {
|
---|
93 | get { return new Entity(CedmaNameSpace + "InputVariable"); }
|
---|
94 | }
|
---|
95 | #endregion
|
---|
96 |
|
---|
97 | #region types and type relations
|
---|
98 | public static Entity InstanceOf {
|
---|
99 | get { return new Entity(CedmaNameSpace + "InstanceOf"); }
|
---|
100 | }
|
---|
101 | public static Entity TypeDataSet {
|
---|
102 | get { return new Entity(CedmaNameSpace + "DataSet"); }
|
---|
103 | }
|
---|
104 | public static Entity TypeAlgorithm {
|
---|
105 | get { return new Entity(CedmaNameSpace + "Algorithm"); }
|
---|
106 | }
|
---|
107 | public static Entity TypeModel {
|
---|
108 | get { return new Entity(CedmaNameSpace + "Model"); }
|
---|
109 | }
|
---|
110 | public static Entity TypeVariableImpact {
|
---|
111 | get { return new Entity(CedmaNameSpace + "VariableImpact"); }
|
---|
112 | }
|
---|
113 | #endregion
|
---|
114 |
|
---|
115 | #region attributes for models
|
---|
116 | public static Entity TargetVariable {
|
---|
117 | get { return new Entity(CedmaNameSpace + "TargetVariable"); }
|
---|
118 | }
|
---|
119 | public static Entity TrainingMeanSquaredError {
|
---|
120 | get { return new Entity(CedmaNameSpace + "TrainingMeanSquaredError"); }
|
---|
121 | }
|
---|
122 | public static Entity ValidationMeanSquaredError {
|
---|
123 | get { return new Entity(CedmaNameSpace + "ValidationMeanSquaredError"); }
|
---|
124 | }
|
---|
125 | public static Entity TestMeanSquaredError {
|
---|
126 | get { return new Entity(CedmaNameSpace + "TestMeanSquaredError"); }
|
---|
127 | }
|
---|
128 | public static Entity TrainingMeanAbsolutePercentageError {
|
---|
129 | get { return new Entity(CedmaNameSpace + "TrainingMeanAbsolutePercentageError"); }
|
---|
130 | }
|
---|
131 | public static Entity ValidationMeanAbsolutePercentageError {
|
---|
132 | get { return new Entity(CedmaNameSpace + "ValidationMeanAbsolutePercentageError"); }
|
---|
133 | }
|
---|
134 | public static Entity TestMeanAbsolutePercentageError {
|
---|
135 | get { return new Entity(CedmaNameSpace + "TestMeanAbsolutePercentageError"); }
|
---|
136 | }
|
---|
137 | public static Entity TrainingMeanAbsolutePercentageOfRangeError {
|
---|
138 | get { return new Entity(CedmaNameSpace + "TrainingMeanAbsolutePercentageOfRangeError"); }
|
---|
139 | }
|
---|
140 | public static Entity ValidationMeanAbsolutePercentageOfRangeError {
|
---|
141 | get { return new Entity(CedmaNameSpace + "ValidationMeanAbsolutePercentageOfRangeError"); }
|
---|
142 | }
|
---|
143 | public static Entity TestMeanAbsolutePercentageOfRangeError {
|
---|
144 | get { return new Entity(CedmaNameSpace + "TestMeanAbsolutePercentageOfRangeError"); }
|
---|
145 | }
|
---|
146 | public static Entity TrainingCoefficientOfDetermination {
|
---|
147 | get { return new Entity(CedmaNameSpace + "TrainingCoefficientOfDetermination"); }
|
---|
148 | }
|
---|
149 | public static Entity ValidationCoefficientOfDetermination {
|
---|
150 | get { return new Entity(CedmaNameSpace + "ValidationCoefficientOfDetermination"); }
|
---|
151 | }
|
---|
152 | public static Entity TestCoefficientOfDetermination {
|
---|
153 | get { return new Entity(CedmaNameSpace + "TestCoefficientOfDetermination"); }
|
---|
154 | }
|
---|
155 | public static Entity TrainingVarianceAccountedFor {
|
---|
156 | get { return new Entity(CedmaNameSpace + "TrainingVarianceAccountedFor"); }
|
---|
157 | }
|
---|
158 | public static Entity ValidationVarianceAccountedFor {
|
---|
159 | get { return new Entity(CedmaNameSpace + "ValidationVarianceAccountedFor"); }
|
---|
160 | }
|
---|
161 | public static Entity TestVarianceAccountedFor {
|
---|
162 | get { return new Entity(CedmaNameSpace + "TestVarianceAccountedFor"); }
|
---|
163 | }
|
---|
164 | public static Entity TrainingAccuracy {
|
---|
165 | get { return new Entity(CedmaNameSpace + "TrainingAccuracy"); }
|
---|
166 | }
|
---|
167 | public static Entity ValidationAccuracy {
|
---|
168 | get { return new Entity(CedmaNameSpace + "ValidationAccuracy"); }
|
---|
169 | }
|
---|
170 | public static Entity TestAccuracy {
|
---|
171 | get { return new Entity(CedmaNameSpace + "TestAccuracy"); }
|
---|
172 | }
|
---|
173 | public static Entity TrainingTheilsInequalityCoefficient {
|
---|
174 | get { return new Entity(CedmaNameSpace + "TrainingTheilsInequalityCoefficient"); }
|
---|
175 | }
|
---|
176 | public static Entity ValidationTheilsInequalityCoefficient {
|
---|
177 | get { return new Entity(CedmaNameSpace + "ValidationTheilsInequalityCoefficient"); }
|
---|
178 | }
|
---|
179 | public static Entity TestTheilsInequalityCoefficient {
|
---|
180 | get { return new Entity(CedmaNameSpace + "TestTheilsInequalityCoefficient"); }
|
---|
181 | }
|
---|
182 | public static Entity TreeSize {
|
---|
183 | get { return new Entity(CedmaNameSpace + "TreeSize"); }
|
---|
184 | }
|
---|
185 | public static Entity TreeHeight {
|
---|
186 | get { return new Entity(CedmaNameSpace + "TreeHeight"); }
|
---|
187 | }
|
---|
188 | public static Entity EvaluatedSolutions {
|
---|
189 | get { return new Entity(CedmaNameSpace + "EvaluatedSolutions"); }
|
---|
190 | }
|
---|
191 | #endregion
|
---|
192 | #region attributes for input variables
|
---|
193 | public static Entity EvaluationImpact {
|
---|
194 | get { return new Entity(CedmaNameSpace + "EvaluationImpact"); }
|
---|
195 | }
|
---|
196 | public static Entity QualityImpact {
|
---|
197 | get { return new Entity(CedmaNameSpace + "QualityImpact"); }
|
---|
198 | }
|
---|
199 | #endregion
|
---|
200 |
|
---|
201 | public static ICollection<Statement> InitialStatements {
|
---|
202 | get {
|
---|
203 | return new List<Statement> {
|
---|
204 | new Statement(TargetVariable, InstanceOf, TypeCategoricalAttribute),
|
---|
205 | new Statement(TrainingMeanSquaredError, InstanceOf, TypeOrdinalAttribute),
|
---|
206 | new Statement(TrainingMeanSquaredError, InstanceOf, TypeQualityAttribute),
|
---|
207 | new Statement(ValidationMeanSquaredError, InstanceOf, TypeOrdinalAttribute),
|
---|
208 | new Statement(ValidationMeanSquaredError, InstanceOf, TypeQualityAttribute),
|
---|
209 | new Statement(TestMeanSquaredError, InstanceOf, TypeOrdinalAttribute),
|
---|
210 | new Statement(TestMeanSquaredError, InstanceOf, TypeQualityAttribute),
|
---|
211 | new Statement(TrainingMeanAbsolutePercentageError, InstanceOf, TypeOrdinalAttribute),
|
---|
212 | new Statement(TrainingMeanAbsolutePercentageError, InstanceOf, TypeQualityAttribute),
|
---|
213 | new Statement(ValidationMeanAbsolutePercentageError, InstanceOf, TypeOrdinalAttribute),
|
---|
214 | new Statement(ValidationMeanAbsolutePercentageError, InstanceOf, TypeQualityAttribute),
|
---|
215 | new Statement(TestMeanAbsolutePercentageError, InstanceOf, TypeOrdinalAttribute),
|
---|
216 | new Statement(TestMeanAbsolutePercentageError, InstanceOf, TypeQualityAttribute),
|
---|
217 | new Statement(TrainingMeanAbsolutePercentageOfRangeError, InstanceOf, TypeOrdinalAttribute),
|
---|
218 | new Statement(TrainingMeanAbsolutePercentageOfRangeError, InstanceOf, TypeQualityAttribute),
|
---|
219 | new Statement(ValidationMeanAbsolutePercentageOfRangeError, InstanceOf, TypeOrdinalAttribute),
|
---|
220 | new Statement(ValidationMeanAbsolutePercentageOfRangeError, InstanceOf, TypeQualityAttribute),
|
---|
221 | new Statement(TestMeanAbsolutePercentageOfRangeError, InstanceOf, TypeOrdinalAttribute),
|
---|
222 | new Statement(TestMeanAbsolutePercentageOfRangeError, InstanceOf, TypeQualityAttribute),
|
---|
223 | new Statement(TrainingCoefficientOfDetermination, InstanceOf, TypeOrdinalAttribute),
|
---|
224 | new Statement(TrainingCoefficientOfDetermination, InstanceOf, TypeQualityAttribute),
|
---|
225 | new Statement(ValidationCoefficientOfDetermination, InstanceOf, TypeOrdinalAttribute),
|
---|
226 | new Statement(ValidationCoefficientOfDetermination, InstanceOf, TypeQualityAttribute),
|
---|
227 | new Statement(TestCoefficientOfDetermination, InstanceOf, TypeOrdinalAttribute),
|
---|
228 | new Statement(TestCoefficientOfDetermination, InstanceOf, TypeQualityAttribute),
|
---|
229 | new Statement(TrainingAccuracy, InstanceOf, TypeOrdinalAttribute),
|
---|
230 | new Statement(TrainingAccuracy, InstanceOf, TypeQualityAttribute),
|
---|
231 | new Statement(ValidationAccuracy, InstanceOf, TypeOrdinalAttribute),
|
---|
232 | new Statement(ValidationAccuracy, InstanceOf, TypeQualityAttribute),
|
---|
233 | new Statement(TestAccuracy, InstanceOf, TypeOrdinalAttribute),
|
---|
234 | new Statement(TestAccuracy, InstanceOf, TypeQualityAttribute),
|
---|
235 | new Statement(TrainingTheilsInequalityCoefficient, InstanceOf, TypeOrdinalAttribute),
|
---|
236 | new Statement(TrainingTheilsInequalityCoefficient, InstanceOf, TypeQualityAttribute),
|
---|
237 | new Statement(ValidationTheilsInequalityCoefficient, InstanceOf, TypeOrdinalAttribute),
|
---|
238 | new Statement(ValidationTheilsInequalityCoefficient, InstanceOf, TypeQualityAttribute),
|
---|
239 | new Statement(TestTheilsInequalityCoefficient, InstanceOf, TypeOrdinalAttribute),
|
---|
240 | new Statement(TestTheilsInequalityCoefficient, InstanceOf, TypeQualityAttribute),
|
---|
241 |
|
---|
242 | new Statement(TreeSize, InstanceOf, TypeOrdinalAttribute),
|
---|
243 | new Statement(TreeSize, InstanceOf, TypeComplexityAttribute),
|
---|
244 | new Statement(TreeHeight, InstanceOf, TypeOrdinalAttribute),
|
---|
245 | new Statement(TreeHeight, InstanceOf, TypeComplexityAttribute),
|
---|
246 | new Statement(EvaluatedSolutions, InstanceOf, TypeOrdinalAttribute),
|
---|
247 |
|
---|
248 | new Statement(Name, InstanceOf, TypeCategoricalAttribute),
|
---|
249 | new Statement(QualityImpact, InstanceOf, TypeOrdinalAttribute),
|
---|
250 | new Statement(EvaluationImpact, InstanceOf, TypeOrdinalAttribute)
|
---|
251 | };
|
---|
252 | }
|
---|
253 | }
|
---|
254 |
|
---|
255 |
|
---|
256 | /// <summary>
|
---|
257 | /// Wildcard entity for filtering.
|
---|
258 | /// </summary>
|
---|
259 | public static Entity AnyEntity {
|
---|
260 | get { return new Entity(null); }
|
---|
261 | }
|
---|
262 | }
|
---|
263 | }
|
---|