Changeset 2045
- Timestamp:
- 06/15/09 17:30:45 (15 years ago)
- Location:
- trunk/sources
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.CEDMA.DB.Interfaces/3.3/Ontology.cs
r1890 r2045 100 100 public static Entity TypeModel { 101 101 get { return new Entity(CedmaNameSpace + "Model"); } 102 } 103 public static Entity TypeVariableImpact { 104 get { return new Entity(CedmaNameSpace + "VariableQualityImpact"); } 102 105 } 103 106 #endregion -
trunk/sources/HeuristicLab.CEDMA.Server/3.3/ExecuterBase.cs
r2000 r2045 92 92 StoreModelAttribute(modelEntity, Ontology.TestMeanAbsolutePercentageOfRangeError, model.TestMeanAbsolutePercentageOfRangeError); 93 93 94 for (int i = 0; i < finishedAlgorithm.Dataset.Columns; i++) { 95 try { 96 double qualImpact = model.GetVariableQualityImpact(finishedAlgorithm.Dataset.GetVariableName(i)); 97 Entity impactEntity = new Entity(Ontology.CedmaNameSpace + Guid.NewGuid()); 98 store.Add(new Statement(impactEntity, Ontology.PredicateInstanceOf, Ontology.TypeVariableQualityImpact)); 99 store.Add(new Statement(modelEntity, impactEntity, new Literal(qualImpact))); 100 } 101 catch (ArgumentException) { 102 // ignore 103 } 104 } 105 94 106 byte[] serializedModel = PersistenceManager.SaveToGZip(model.Data); 95 107 store.Add(new Statement(modelEntity, Ontology.PredicateSerializedData, new Literal(Convert.ToBase64String(serializedModel)))); -
trunk/sources/HeuristicLab.Modeling/3.2/Model.cs
r2041 r2045 122 122 public double GetVariableQualityImpact(string variableName) { 123 123 if (variableQualityImpacts.ContainsKey(variableName)) return variableQualityImpacts[variableName]; 124 else return 1.0;124 else throw new ArgumentException("Impact of variable "+variableName+" is not available."); 125 125 } 126 126 127 127 public double GetVariableEvaluationImpact(string variableName) { 128 128 if (variableEvaluationImpacts.ContainsKey(variableName)) return variableEvaluationImpacts[variableName]; 129 else return 0.0;129 else throw new ArgumentException("Impact of variable " + variableName + " is not available."); 130 130 } 131 131
Note: See TracChangeset
for help on using the changeset viewer.