Free cookie consent management tool by TermsFeed Policy Generator

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

Last change on this file since 2016 was 1890, checked in by gkronber, 15 years ago

Added evaluation of VAF to hard-coded GP algorithms. VAF values for training, validation, test are stored as model attributes. #641 (CEDMA should also store VAF of models)

File size: 11.8 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 TrainingVarianceAccountedFor {
149      get { return new Entity(CedmaNameSpace + "TrainingVarianceAccountedFor"); }
150    }
151    public static Entity ValidationVarianceAccountedFor {
152      get { return new Entity(CedmaNameSpace + "ValidationVarianceAccountedFor"); }
153    }
154    public static Entity TestVarianceAccountedFor {
155      get { return new Entity(CedmaNameSpace + "TestVarianceAccountedFor"); }
156    }
157    public static Entity TrainingAccuracy {
158      get { return new Entity(CedmaNameSpace + "TrainingAccuracy"); }
159    }
160    public static Entity ValidationAccuracy {
161      get { return new Entity(CedmaNameSpace + "ValidationAccuracy"); }
162    }
163    public static Entity TestAccuracy {
164      get { return new Entity(CedmaNameSpace + "TestAccuracy"); }
165    }
166    public static Entity TrainingTheilsInequalityCoefficient {
167      get { return new Entity(CedmaNameSpace + "TrainingTheilsInequalityCoefficient"); }
168    }
169    public static Entity ValidationTheilsInequalityCoefficient {
170      get { return new Entity(CedmaNameSpace + "ValidationTheilsInequalityCoefficient"); }
171    }
172    public static Entity TestTheilsInequalityCoefficient {
173      get { return new Entity(CedmaNameSpace + "TestTheilsInequalityCoefficient"); }
174    }
175    public static Entity TreeSize {
176      get { return new Entity(CedmaNameSpace + "TreeSize"); }
177    }
178    public static Entity TreeHeight {
179      get { return new Entity(CedmaNameSpace + "TreeHeight"); }
180    }
181    public static Entity EvaluatedSolutions {
182      get { return new Entity(CedmaNameSpace + "EvaluatedSolutions"); }
183    }
184    #endregion
185
186    public static ICollection<Statement> InitialStatements {
187      get {
188        return new List<Statement> {
189          new Statement(TargetVariable, PredicateInstanceOf, TypeCategoricalAttribute),
190          new Statement(AlgorithmName, PredicateInstanceOf, TypeCategoricalAttribute),
191          new Statement(TrainingMeanSquaredError, PredicateInstanceOf, TypeOrdinalAttribute),
192          new Statement(TrainingMeanSquaredError, PredicateInstanceOf, TypeQualityAttribute),
193          new Statement(ValidationMeanSquaredError, PredicateInstanceOf, TypeOrdinalAttribute),
194          new Statement(ValidationMeanSquaredError, PredicateInstanceOf, TypeQualityAttribute),
195          new Statement(TestMeanSquaredError, PredicateInstanceOf, TypeOrdinalAttribute),
196          new Statement(TestMeanSquaredError, PredicateInstanceOf, TypeQualityAttribute),
197          new Statement(TrainingMeanAbsolutePercentageError, PredicateInstanceOf, TypeOrdinalAttribute),
198          new Statement(TrainingMeanAbsolutePercentageError, PredicateInstanceOf, TypeQualityAttribute),
199          new Statement(ValidationMeanAbsolutePercentageError, PredicateInstanceOf, TypeOrdinalAttribute),
200          new Statement(ValidationMeanAbsolutePercentageError, PredicateInstanceOf, TypeQualityAttribute),
201          new Statement(TestMeanAbsolutePercentageError, PredicateInstanceOf, TypeOrdinalAttribute),
202          new Statement(TestMeanAbsolutePercentageError, PredicateInstanceOf, TypeQualityAttribute),
203          new Statement(TrainingMeanAbsolutePercentageOfRangeError, PredicateInstanceOf, TypeOrdinalAttribute),
204          new Statement(TrainingMeanAbsolutePercentageOfRangeError, PredicateInstanceOf, TypeQualityAttribute),
205          new Statement(ValidationMeanAbsolutePercentageOfRangeError, PredicateInstanceOf, TypeOrdinalAttribute),
206          new Statement(ValidationMeanAbsolutePercentageOfRangeError, PredicateInstanceOf, TypeQualityAttribute),
207          new Statement(TestMeanAbsolutePercentageOfRangeError, PredicateInstanceOf, TypeOrdinalAttribute),
208          new Statement(TestMeanAbsolutePercentageOfRangeError, PredicateInstanceOf, TypeQualityAttribute),
209          new Statement(TrainingCoefficientOfDetermination, PredicateInstanceOf, TypeOrdinalAttribute),
210          new Statement(TrainingCoefficientOfDetermination, PredicateInstanceOf, TypeQualityAttribute),
211          new Statement(ValidationCoefficientOfDetermination, PredicateInstanceOf, TypeOrdinalAttribute),
212          new Statement(ValidationCoefficientOfDetermination, PredicateInstanceOf, TypeQualityAttribute),
213          new Statement(TestCoefficientOfDetermination, PredicateInstanceOf, TypeOrdinalAttribute),
214          new Statement(TestCoefficientOfDetermination, PredicateInstanceOf, TypeQualityAttribute),
215          new Statement(TrainingAccuracy, PredicateInstanceOf, TypeOrdinalAttribute),
216          new Statement(TrainingAccuracy, PredicateInstanceOf, TypeQualityAttribute),
217          new Statement(ValidationAccuracy, PredicateInstanceOf, TypeOrdinalAttribute),
218          new Statement(ValidationAccuracy, PredicateInstanceOf, TypeQualityAttribute),
219          new Statement(TestAccuracy, PredicateInstanceOf, TypeOrdinalAttribute),
220          new Statement(TestAccuracy, PredicateInstanceOf, TypeQualityAttribute),
221          new Statement(TrainingTheilsInequalityCoefficient, PredicateInstanceOf, TypeOrdinalAttribute),
222          new Statement(TrainingTheilsInequalityCoefficient, PredicateInstanceOf, TypeQualityAttribute),
223          new Statement(ValidationTheilsInequalityCoefficient, PredicateInstanceOf, TypeOrdinalAttribute),
224          new Statement(ValidationTheilsInequalityCoefficient, PredicateInstanceOf, TypeQualityAttribute),
225          new Statement(TestTheilsInequalityCoefficient, PredicateInstanceOf, TypeOrdinalAttribute),
226          new Statement(TestTheilsInequalityCoefficient, PredicateInstanceOf, TypeQualityAttribute),
227
228          new Statement(TreeSize, PredicateInstanceOf, TypeOrdinalAttribute),
229          new Statement(TreeSize, PredicateInstanceOf, TypeComplexityAttribute),
230          new Statement(TreeHeight, PredicateInstanceOf, TypeOrdinalAttribute),
231          new Statement(TreeHeight, PredicateInstanceOf, TypeComplexityAttribute),
232          new Statement(EvaluatedSolutions, PredicateInstanceOf, TypeOrdinalAttribute)
233        };
234      }
235    }
236
237
238    /// <summary>
239    /// Wildcard entity for filtering.
240    /// </summary>
241    public static Entity AnyEntity {
242      get { return new Entity(null); }
243    }
244  }
245}
Note: See TracBrowser for help on using the repository browser.