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 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 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(TrainingMeanSquaredError, PredicateInstanceOf, TypeOrdinalAttribute),
|
---|
182 | new Statement(TrainingMeanSquaredError, PredicateInstanceOf, TypeQualityAttribute),
|
---|
183 | new Statement(ValidationMeanSquaredError, PredicateInstanceOf, TypeOrdinalAttribute),
|
---|
184 | new Statement(ValidationMeanSquaredError, PredicateInstanceOf, TypeQualityAttribute),
|
---|
185 | new Statement(TestMeanSquaredError, PredicateInstanceOf, TypeOrdinalAttribute),
|
---|
186 | new Statement(TestMeanSquaredError, PredicateInstanceOf, TypeQualityAttribute),
|
---|
187 | new Statement(TrainingMeanAbsolutePercentageError, PredicateInstanceOf, TypeOrdinalAttribute),
|
---|
188 | new Statement(TrainingMeanAbsolutePercentageError, PredicateInstanceOf, TypeQualityAttribute),
|
---|
189 | new Statement(ValidationMeanAbsolutePercentageError, PredicateInstanceOf, TypeOrdinalAttribute),
|
---|
190 | new Statement(ValidationMeanAbsolutePercentageError, PredicateInstanceOf, TypeQualityAttribute),
|
---|
191 | new Statement(TestMeanAbsolutePercentageError, PredicateInstanceOf, TypeOrdinalAttribute),
|
---|
192 | new Statement(TestMeanAbsolutePercentageError, PredicateInstanceOf, TypeQualityAttribute),
|
---|
193 | new Statement(TrainingMeanAbsolutePercentageOfRangeError, PredicateInstanceOf, TypeOrdinalAttribute),
|
---|
194 | new Statement(TrainingMeanAbsolutePercentageOfRangeError, PredicateInstanceOf, TypeQualityAttribute),
|
---|
195 | new Statement(ValidationMeanAbsolutePercentageOfRangeError, PredicateInstanceOf, TypeOrdinalAttribute),
|
---|
196 | new Statement(ValidationMeanAbsolutePercentageOfRangeError, PredicateInstanceOf, TypeQualityAttribute),
|
---|
197 | new Statement(TestMeanAbsolutePercentageOfRangeError, PredicateInstanceOf, TypeOrdinalAttribute),
|
---|
198 | new Statement(TestMeanAbsolutePercentageOfRangeError, PredicateInstanceOf, TypeQualityAttribute),
|
---|
199 | new Statement(TrainingCoefficientOfDetermination, PredicateInstanceOf, TypeOrdinalAttribute),
|
---|
200 | new Statement(TrainingCoefficientOfDetermination, PredicateInstanceOf, TypeQualityAttribute),
|
---|
201 | new Statement(ValidationCoefficientOfDetermination, PredicateInstanceOf, TypeOrdinalAttribute),
|
---|
202 | new Statement(ValidationCoefficientOfDetermination, PredicateInstanceOf, TypeQualityAttribute),
|
---|
203 | new Statement(TestCoefficientOfDetermination, PredicateInstanceOf, TypeOrdinalAttribute),
|
---|
204 | new Statement(TestCoefficientOfDetermination, PredicateInstanceOf, TypeQualityAttribute),
|
---|
205 | new Statement(TrainingAccuracy, PredicateInstanceOf, TypeOrdinalAttribute),
|
---|
206 | new Statement(TrainingAccuracy, PredicateInstanceOf, TypeQualityAttribute),
|
---|
207 | new Statement(ValidationAccuracy, PredicateInstanceOf, TypeOrdinalAttribute),
|
---|
208 | new Statement(ValidationAccuracy, PredicateInstanceOf, TypeQualityAttribute),
|
---|
209 | new Statement(TestAccuracy, PredicateInstanceOf, TypeOrdinalAttribute),
|
---|
210 | new Statement(TestAccuracy, PredicateInstanceOf, TypeQualityAttribute),
|
---|
211 | new Statement(TrainingTheilsInequalityCoefficient, PredicateInstanceOf, TypeOrdinalAttribute),
|
---|
212 | new Statement(TrainingTheilsInequalityCoefficient, PredicateInstanceOf, TypeQualityAttribute),
|
---|
213 | new Statement(ValidationTheilsInequalityCoefficient, PredicateInstanceOf, TypeOrdinalAttribute),
|
---|
214 | new Statement(ValidationTheilsInequalityCoefficient, PredicateInstanceOf, TypeQualityAttribute),
|
---|
215 | new Statement(TestTheilsInequalityCoefficient, PredicateInstanceOf, TypeOrdinalAttribute),
|
---|
216 | new Statement(TestTheilsInequalityCoefficient, PredicateInstanceOf, TypeQualityAttribute),
|
---|
217 |
|
---|
218 | new Statement(TreeSize, PredicateInstanceOf, TypeOrdinalAttribute),
|
---|
219 | new Statement(TreeSize, PredicateInstanceOf, TypeComplexityAttribute),
|
---|
220 | new Statement(TreeHeight, PredicateInstanceOf, TypeOrdinalAttribute),
|
---|
221 | new Statement(TreeHeight, PredicateInstanceOf, TypeComplexityAttribute),
|
---|
222 | new Statement(EvaluatedSolutions, PredicateInstanceOf, TypeOrdinalAttribute)
|
---|
223 | };
|
---|
224 | }
|
---|
225 | }
|
---|
226 |
|
---|
227 |
|
---|
228 | /// <summary>
|
---|
229 | /// Wildcard entity for filtering.
|
---|
230 | /// </summary>
|
---|
231 | public static Entity AnyEntity {
|
---|
232 | get { return new Entity(null); }
|
---|
233 | }
|
---|
234 | }
|
---|
235 | }
|
---|