Free cookie consent management tool by TermsFeed Policy Generator

Changeset 2081 for trunk


Ignore:
Timestamp:
06/22/09 17:49:10 (15 years ago)
Author:
gkronber
Message:

Added new types to CEDMA ontology to discriminate between attributes of problems (data sets), models and input variables. And changed class Results to read only model attributes. In preparation for the display of variable impacts of each model. #286 (Variable-usage diagrams for the CEDMA frontend)

Location:
trunk/sources
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.CEDMA.Core/3.3/Results.cs

    r2047 r2081  
    8787      entries = new List<ResultsEntry>();
    8888      do {
    89         var allBindings = store.Query("?Dataset <" + Ontology.HasModel + "> ?Model ." + Environment.NewLine +
     89        var allBindings = store.Query("?Model <" + Ontology.InstanceOf + "> <" + Ontology.TypeModel + "> ." + Environment.NewLine +
    9090          "?Model ?Attribute ?Value .", page, PAGE_SIZE);
    9191        var allModelBindings = allBindings.GroupBy(x => (Entity)x.Get("Model"));
     
    125125    private void LoadModelAttributes() {
    126126      this.ordinalVariables =
    127         store.Query("?ModelAttribute <" + Ontology.InstanceOf + "> <" + Ontology.TypeOrdinalAttribute + "> .", 0, 100)
    128         .Select(s => ((Entity)s.Get("ModelAttribute")).Uri.Replace(Ontology.CedmaNameSpace, ""))
    129         .ToArray();
     127        store
     128          .Query(
     129            "?ModelAttribute <" + Ontology.InstanceOf + "> <" + Ontology.TypeModelAttribute + "> ." + Environment.NewLine +
     130            "?ModelAttribute <" + Ontology.InstanceOf + "> <" + Ontology.TypeOrdinalAttribute + "> .", 0, 100)
     131          .Select(s => ((Entity)s.Get("ModelAttribute")).Uri.Replace(Ontology.CedmaNameSpace, ""))
     132          .Distinct()
     133          .ToArray();
    130134      this.categoricalVariables =
    131         store.Query("?ModelAttribute <" + Ontology.InstanceOf + "> <" + Ontology.TypeCategoricalAttribute + "> .", 0, 100)
    132         .Select(s => ((Entity)s.Get("ModelAttribute")).Uri.Replace(Ontology.CedmaNameSpace, ""))
    133         .ToArray();
     135        store
     136          .Query(
     137            "?ModelAttribute <" + Ontology.InstanceOf + "> <" + Ontology.TypeModelAttribute + "> ." + Environment.NewLine +
     138            "?ModelAttribute <" + Ontology.InstanceOf + "> <" + Ontology.TypeCategoricalAttribute + "> .", 0, 100)
     139          .Select(s => ((Entity)s.Get("ModelAttribute")).Uri.Replace(Ontology.CedmaNameSpace, ""))
     140          .Distinct()
     141          .ToArray();
    134142    }
    135143
  • trunk/sources/HeuristicLab.CEDMA.DB.Interfaces/3.3/Ontology.cs

    r2047 r2081  
    3535    #region model attribute types
    3636    /// <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>
    3755    /// Attribute value is ordinal, values can be sorted.
    3856    /// Examples are quality measures or complexity measures.
     
    203221        return new List<Statement> {
    204222          new Statement(TargetVariable, InstanceOf, TypeCategoricalAttribute),
     223          new Statement(TargetVariable, InstanceOf, TypeModelAttribute),
     224         
    205225          new Statement(TrainingMeanSquaredError, InstanceOf, TypeOrdinalAttribute),
    206226          new Statement(TrainingMeanSquaredError, InstanceOf, TypeQualityAttribute),
     227          new Statement(TrainingMeanSquaredError, InstanceOf, TypeModelAttribute),
     228         
    207229          new Statement(ValidationMeanSquaredError, InstanceOf, TypeOrdinalAttribute),
    208230          new Statement(ValidationMeanSquaredError, InstanceOf, TypeQualityAttribute),
     231          new Statement(ValidationMeanSquaredError, InstanceOf, TypeModelAttribute),
     232
    209233          new Statement(TestMeanSquaredError, InstanceOf, TypeOrdinalAttribute),
    210234          new Statement(TestMeanSquaredError, InstanceOf, TypeQualityAttribute),
     235          new Statement(TestMeanSquaredError, InstanceOf, TypeModelAttribute),
     236         
    211237          new Statement(TrainingMeanAbsolutePercentageError, InstanceOf, TypeOrdinalAttribute),
    212238          new Statement(TrainingMeanAbsolutePercentageError, InstanceOf, TypeQualityAttribute),
     239          new Statement(TrainingMeanAbsolutePercentageError, InstanceOf, TypeModelAttribute),
     240         
    213241          new Statement(ValidationMeanAbsolutePercentageError, InstanceOf, TypeOrdinalAttribute),
    214242          new Statement(ValidationMeanAbsolutePercentageError, InstanceOf, TypeQualityAttribute),
     243          new Statement(ValidationMeanAbsolutePercentageError, InstanceOf, TypeModelAttribute),
     244         
    215245          new Statement(TestMeanAbsolutePercentageError, InstanceOf, TypeOrdinalAttribute),
    216246          new Statement(TestMeanAbsolutePercentageError, InstanceOf, TypeQualityAttribute),
     247          new Statement(TestMeanAbsolutePercentageError, InstanceOf, TypeModelAttribute),
     248         
    217249          new Statement(TrainingMeanAbsolutePercentageOfRangeError, InstanceOf, TypeOrdinalAttribute),
    218250          new Statement(TrainingMeanAbsolutePercentageOfRangeError, InstanceOf, TypeQualityAttribute),
     251          new Statement(TrainingMeanAbsolutePercentageOfRangeError, InstanceOf, TypeModelAttribute),
     252         
    219253          new Statement(ValidationMeanAbsolutePercentageOfRangeError, InstanceOf, TypeOrdinalAttribute),
    220254          new Statement(ValidationMeanAbsolutePercentageOfRangeError, InstanceOf, TypeQualityAttribute),
     255          new Statement(ValidationMeanAbsolutePercentageOfRangeError, InstanceOf, TypeModelAttribute),
     256         
    221257          new Statement(TestMeanAbsolutePercentageOfRangeError, InstanceOf, TypeOrdinalAttribute),
    222258          new Statement(TestMeanAbsolutePercentageOfRangeError, InstanceOf, TypeQualityAttribute),
     259          new Statement(TestMeanAbsolutePercentageOfRangeError, InstanceOf, TypeModelAttribute),
     260         
    223261          new Statement(TrainingCoefficientOfDetermination, InstanceOf, TypeOrdinalAttribute),
    224262          new Statement(TrainingCoefficientOfDetermination, InstanceOf, TypeQualityAttribute),
     263          new Statement(TrainingCoefficientOfDetermination, InstanceOf, TypeModelAttribute),
     264         
    225265          new Statement(ValidationCoefficientOfDetermination, InstanceOf, TypeOrdinalAttribute),
    226266          new Statement(ValidationCoefficientOfDetermination, InstanceOf, TypeQualityAttribute),
     267          new Statement(ValidationCoefficientOfDetermination, InstanceOf, TypeModelAttribute),
     268         
    227269          new Statement(TestCoefficientOfDetermination, InstanceOf, TypeOrdinalAttribute),
    228270          new Statement(TestCoefficientOfDetermination, InstanceOf, TypeQualityAttribute),
     271          new Statement(TestCoefficientOfDetermination, InstanceOf, TypeModelAttribute),
     272         
    229273          new Statement(TrainingAccuracy, InstanceOf, TypeOrdinalAttribute),
    230274          new Statement(TrainingAccuracy, InstanceOf, TypeQualityAttribute),
     275          new Statement(TrainingAccuracy, InstanceOf, TypeModelAttribute),
     276         
    231277          new Statement(ValidationAccuracy, InstanceOf, TypeOrdinalAttribute),
    232278          new Statement(ValidationAccuracy, InstanceOf, TypeQualityAttribute),
     279          new Statement(ValidationAccuracy, InstanceOf, TypeModelAttribute),
     280
    233281          new Statement(TestAccuracy, InstanceOf, TypeOrdinalAttribute),
    234282          new Statement(TestAccuracy, InstanceOf, TypeQualityAttribute),
     283          new Statement(TestAccuracy, InstanceOf, TypeModelAttribute),
     284         
    235285          new Statement(TrainingTheilsInequalityCoefficient, InstanceOf, TypeOrdinalAttribute),
    236286          new Statement(TrainingTheilsInequalityCoefficient, InstanceOf, TypeQualityAttribute),
     287          new Statement(TrainingTheilsInequalityCoefficient, InstanceOf, TypeModelAttribute),
     288         
    237289          new Statement(ValidationTheilsInequalityCoefficient, InstanceOf, TypeOrdinalAttribute),
    238290          new Statement(ValidationTheilsInequalityCoefficient, InstanceOf, TypeQualityAttribute),
     291          new Statement(ValidationTheilsInequalityCoefficient, InstanceOf, TypeModelAttribute),
     292         
    239293          new Statement(TestTheilsInequalityCoefficient, InstanceOf, TypeOrdinalAttribute),
    240294          new Statement(TestTheilsInequalityCoefficient, InstanceOf, TypeQualityAttribute),
     295          new Statement(TestTheilsInequalityCoefficient, InstanceOf, TypeModelAttribute),
    241296
    242297          new Statement(TreeSize, InstanceOf, TypeOrdinalAttribute),
    243298          new Statement(TreeSize, InstanceOf, TypeComplexityAttribute),
     299          new Statement(TreeSize, InstanceOf, TypeModelAttribute),
     300         
    244301          new Statement(TreeHeight, InstanceOf, TypeOrdinalAttribute),
    245302          new Statement(TreeHeight, InstanceOf, TypeComplexityAttribute),
     303          new Statement(TreeHeight, InstanceOf, TypeModelAttribute),
     304         
    246305          new Statement(EvaluatedSolutions, InstanceOf, TypeOrdinalAttribute),
     306          new Statement(EvaluatedSolutions, InstanceOf, TypeModelAttribute),
    247307
    248308          new Statement(Name, InstanceOf, TypeCategoricalAttribute),
     309          new Statement(Name, InstanceOf, TypeModelAttribute),
     310          new Statement(Name, InstanceOf, TypeProblemAttribute),
     311          new Statement(Name, InstanceOf, TypeInputVariableAttribute),
     312         
    249313          new Statement(QualityImpact, InstanceOf, TypeOrdinalAttribute),
    250           new Statement(EvaluationImpact, InstanceOf, TypeOrdinalAttribute)
     314          new Statement(QualityImpact, InstanceOf, TypeInputVariableAttribute),
     315
     316          new Statement(EvaluationImpact, InstanceOf, TypeOrdinalAttribute),
     317          new Statement(EvaluationImpact, InstanceOf, TypeInputVariableAttribute)
    251318        };
    252319      }
Note: See TracChangeset for help on using the changeset viewer.