Changeset 2047
- Timestamp:
- 06/16/09 09:42:50 (16 years ago)
- Location:
- trunk/sources
- Files:
-
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.CEDMA.Charting/3.3/BubbleChart.cs
r1529 r2047 266 266 ResultsEntry entry = GetResultsEntry(point); 267 267 if (entry != null) { 268 string serializedData = (string)entry.Get(Ontology. PredicateSerializedData.Uri.Replace(Ontology.CedmaNameSpace, ""));268 string serializedData = (string)entry.Get(Ontology.SerializedData.Uri.Replace(Ontology.CedmaNameSpace, "")); 269 269 var model = (IItem)PersistenceManager.RestoreFromGZip(Convert.FromBase64String(serializedData)); 270 270 PluginManager.ControlManager.ShowControl(model.CreateView()); -
trunk/sources/HeuristicLab.CEDMA.Core/3.3/Console.cs
r2000 r2047 72 72 internal void Connect(string serverUri) { 73 73 IStore store = new StoreProxy(serverUri); 74 var variableBindings = store.Query("?Dataset <" + Ontology. PredicateInstanceOf + "> <" + Ontology.TypeDataSet + "> .", 0, 10).ToArray();74 var variableBindings = store.Query("?Dataset <" + Ontology.InstanceOf + "> <" + Ontology.TypeDataSet + "> .", 0, 10).ToArray(); 75 75 if (variableBindings.Length > 0) { 76 76 dataSet = new DataSet(store, (Entity)variableBindings[0].Get("Dataset")); -
trunk/sources/HeuristicLab.CEDMA.Core/3.3/DataSet.cs
r2000 r2047 50 50 if (problem == null) { 51 51 var persistedData = Store.Query( 52 "<" + Ontology.CedmaNameSpace + Guid + "> <" + Ontology. PredicateSerializedData.Uri + "> ?SerializedData .", 0, 10);52 "<" + Ontology.CedmaNameSpace + Guid + "> <" + Ontology.SerializedData.Uri + "> ?SerializedData .", 0, 10); 53 53 if (persistedData.Count() == 1) { 54 54 Literal persistedLiteral = (Literal)persistedData.First().Get("SerializedData"); … … 83 83 public void Activate() { 84 84 Entity myEntity = new Entity(Ontology.CedmaNameSpace + Guid); 85 Store.Add(new Statement(myEntity, Ontology. PredicateInstanceOf, Ontology.TypeDataSet));86 Store.Add(new Statement(myEntity, Ontology. PredicateSerializedData, new Literal(Convert.ToBase64String(PersistenceManager.SaveToGZip(problem)))));87 Store.Add(new Statement(myEntity, Ontology. PredicateName, new Literal(name)));85 Store.Add(new Statement(myEntity, Ontology.InstanceOf, Ontology.TypeDataSet)); 86 Store.Add(new Statement(myEntity, Ontology.SerializedData, new Literal(Convert.ToBase64String(PersistenceManager.SaveToGZip(problem))))); 87 Store.Add(new Statement(myEntity, Ontology.Name, new Literal(name))); 88 88 activated = true; 89 89 } -
trunk/sources/HeuristicLab.CEDMA.Core/3.3/Results.cs
r2000 r2047 87 87 entries = new List<ResultsEntry>(); 88 88 do { 89 var allBindings = store.Query("?Dataset <" + Ontology. PredicateHasModel + "> ?Model ." + Environment.NewLine +89 var allBindings = store.Query("?Dataset <" + Ontology.HasModel + "> ?Model ." + Environment.NewLine + 90 90 "?Model ?Attribute ?Value .", page, PAGE_SIZE); 91 91 var allModelBindings = allBindings.GroupBy(x => (Entity)x.Get("Model")); … … 125 125 private void LoadModelAttributes() { 126 126 this.ordinalVariables = 127 store.Query("?ModelAttribute <" + Ontology. PredicateInstanceOf + "> <" + Ontology.TypeOrdinalAttribute + "> .", 0, 100)127 store.Query("?ModelAttribute <" + Ontology.InstanceOf + "> <" + Ontology.TypeOrdinalAttribute + "> .", 0, 100) 128 128 .Select(s => ((Entity)s.Get("ModelAttribute")).Uri.Replace(Ontology.CedmaNameSpace, "")) 129 129 .ToArray(); 130 130 this.categoricalVariables = 131 store.Query("?ModelAttribute <" + Ontology. PredicateInstanceOf + "> <" + Ontology.TypeCategoricalAttribute + "> .", 0, 100)131 store.Query("?ModelAttribute <" + Ontology.InstanceOf + "> <" + Ontology.TypeCategoricalAttribute + "> .", 0, 100) 132 132 .Select(s => ((Entity)s.Get("ModelAttribute")).Uri.Replace(Ontology.CedmaNameSpace, "")) 133 133 .ToArray(); -
trunk/sources/HeuristicLab.CEDMA.Core/3.3/TableResultsView.cs
r1529 r2047 68 68 DataGridView.HitTestInfo hitInfo = dataGridView.HitTest(e.X, e.Y); 69 69 ResultsEntry entry = (ResultsEntry)dataGridView.Rows[hitInfo.RowIndex].Tag; 70 string serializedData = (string)entry.Get(Ontology. PredicateSerializedData.Uri.Replace(Ontology.CedmaNameSpace, ""));70 string serializedData = (string)entry.Get(Ontology.SerializedData.Uri.Replace(Ontology.CedmaNameSpace, "")); 71 71 var model = (IItem)PersistenceManager.RestoreFromGZip(Convert.FromBase64String(serializedData)); 72 72 PluginManager.ControlManager.ShowControl(model.CreateView()); -
trunk/sources/HeuristicLab.CEDMA.DB.Interfaces/3.3/Ontology.cs
r2045 r2047 63 63 64 64 #region meta-data predicates 65 public static Entity PredicateName {65 public static Entity Name { 66 66 get { return new Entity(CedmaNameSpace + "Name"); } 67 67 } … … 69 69 /// Each entity can have a serialized XML representation that can be loaded in HL. 70 70 /// </summary> 71 public static Entity PredicateSerializedData {71 public static Entity SerializedData { 72 72 get { return new Entity(CedmaNameSpace + "SerializedData"); } 73 73 } … … 76 76 /// A data set can have multiple models. 77 77 /// </summary> 78 public static Entity PredicateHasModel {78 public static Entity HasModel { 79 79 get { return new Entity(CedmaNameSpace + "Model"); } 80 80 } … … 83 83 /// An algorithm can generate multiple models, each model is generated by exactly one algorithm. 84 84 /// </summary> 85 public static Entity PredicateGeneratedBy {85 public static Entity GeneratedBy { 86 86 get { return new Entity(CedmaNameSpace + "GeneratedBy"); } 87 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 } 88 95 #endregion 89 96 90 97 #region types and type relations 91 public static Entity PredicateInstanceOf {98 public static Entity InstanceOf { 92 99 get { return new Entity(CedmaNameSpace + "InstanceOf"); } 93 100 } … … 102 109 } 103 110 public static Entity TypeVariableImpact { 104 get { return new Entity(CedmaNameSpace + "Variable QualityImpact"); }105 } 106 #endregion 107 108 #region default attributes111 get { return new Entity(CedmaNameSpace + "VariableImpact"); } 112 } 113 #endregion 114 115 #region attributes for models 109 116 public static Entity TargetVariable { 110 117 get { return new Entity(CedmaNameSpace + "TargetVariable"); } 111 118 } 112 public static Entity AlgorithmName {113 get { return new Entity(CedmaNameSpace + "AlgorithmName"); }114 }115 119 public static Entity TrainingMeanSquaredError { 116 120 get { return new Entity(CedmaNameSpace + "TrainingMeanSquaredError"); } … … 184 188 public static Entity EvaluatedSolutions { 185 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"); } 186 198 } 187 199 #endregion … … 190 202 get { 191 203 return new List<Statement> { 192 new Statement(TargetVariable, PredicateInstanceOf, TypeCategoricalAttribute), 193 new Statement(AlgorithmName, PredicateInstanceOf, TypeCategoricalAttribute), 194 new Statement(TrainingMeanSquaredError, PredicateInstanceOf, TypeOrdinalAttribute), 195 new Statement(TrainingMeanSquaredError, PredicateInstanceOf, TypeQualityAttribute), 196 new Statement(ValidationMeanSquaredError, PredicateInstanceOf, TypeOrdinalAttribute), 197 new Statement(ValidationMeanSquaredError, PredicateInstanceOf, TypeQualityAttribute), 198 new Statement(TestMeanSquaredError, PredicateInstanceOf, TypeOrdinalAttribute), 199 new Statement(TestMeanSquaredError, PredicateInstanceOf, TypeQualityAttribute), 200 new Statement(TrainingMeanAbsolutePercentageError, PredicateInstanceOf, TypeOrdinalAttribute), 201 new Statement(TrainingMeanAbsolutePercentageError, PredicateInstanceOf, TypeQualityAttribute), 202 new Statement(ValidationMeanAbsolutePercentageError, PredicateInstanceOf, TypeOrdinalAttribute), 203 new Statement(ValidationMeanAbsolutePercentageError, PredicateInstanceOf, TypeQualityAttribute), 204 new Statement(TestMeanAbsolutePercentageError, PredicateInstanceOf, TypeOrdinalAttribute), 205 new Statement(TestMeanAbsolutePercentageError, PredicateInstanceOf, TypeQualityAttribute), 206 new Statement(TrainingMeanAbsolutePercentageOfRangeError, PredicateInstanceOf, TypeOrdinalAttribute), 207 new Statement(TrainingMeanAbsolutePercentageOfRangeError, PredicateInstanceOf, TypeQualityAttribute), 208 new Statement(ValidationMeanAbsolutePercentageOfRangeError, PredicateInstanceOf, TypeOrdinalAttribute), 209 new Statement(ValidationMeanAbsolutePercentageOfRangeError, PredicateInstanceOf, TypeQualityAttribute), 210 new Statement(TestMeanAbsolutePercentageOfRangeError, PredicateInstanceOf, TypeOrdinalAttribute), 211 new Statement(TestMeanAbsolutePercentageOfRangeError, PredicateInstanceOf, TypeQualityAttribute), 212 new Statement(TrainingCoefficientOfDetermination, PredicateInstanceOf, TypeOrdinalAttribute), 213 new Statement(TrainingCoefficientOfDetermination, PredicateInstanceOf, TypeQualityAttribute), 214 new Statement(ValidationCoefficientOfDetermination, PredicateInstanceOf, TypeOrdinalAttribute), 215 new Statement(ValidationCoefficientOfDetermination, PredicateInstanceOf, TypeQualityAttribute), 216 new Statement(TestCoefficientOfDetermination, PredicateInstanceOf, TypeOrdinalAttribute), 217 new Statement(TestCoefficientOfDetermination, PredicateInstanceOf, TypeQualityAttribute), 218 new Statement(TrainingAccuracy, PredicateInstanceOf, TypeOrdinalAttribute), 219 new Statement(TrainingAccuracy, PredicateInstanceOf, TypeQualityAttribute), 220 new Statement(ValidationAccuracy, PredicateInstanceOf, TypeOrdinalAttribute), 221 new Statement(ValidationAccuracy, PredicateInstanceOf, TypeQualityAttribute), 222 new Statement(TestAccuracy, PredicateInstanceOf, TypeOrdinalAttribute), 223 new Statement(TestAccuracy, PredicateInstanceOf, TypeQualityAttribute), 224 new Statement(TrainingTheilsInequalityCoefficient, PredicateInstanceOf, TypeOrdinalAttribute), 225 new Statement(TrainingTheilsInequalityCoefficient, PredicateInstanceOf, TypeQualityAttribute), 226 new Statement(ValidationTheilsInequalityCoefficient, PredicateInstanceOf, TypeOrdinalAttribute), 227 new Statement(ValidationTheilsInequalityCoefficient, PredicateInstanceOf, TypeQualityAttribute), 228 new Statement(TestTheilsInequalityCoefficient, PredicateInstanceOf, TypeOrdinalAttribute), 229 new Statement(TestTheilsInequalityCoefficient, PredicateInstanceOf, TypeQualityAttribute), 230 231 new Statement(TreeSize, PredicateInstanceOf, TypeOrdinalAttribute), 232 new Statement(TreeSize, PredicateInstanceOf, TypeComplexityAttribute), 233 new Statement(TreeHeight, PredicateInstanceOf, TypeOrdinalAttribute), 234 new Statement(TreeHeight, PredicateInstanceOf, TypeComplexityAttribute), 235 new Statement(EvaluatedSolutions, PredicateInstanceOf, TypeOrdinalAttribute) 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) 236 251 }; 237 252 } -
trunk/sources/HeuristicLab.CEDMA.Server/3.3/DispatcherBase.cs
r2012 r2047 48 48 public IAlgorithm GetNextJob() { 49 49 if (dataset == null) { 50 var datasetEntities = store.Query("?DataSet <" + Ontology. PredicateInstanceOf.Uri + "> <" + Ontology.TypeDataSet.Uri + "> .", 0, 1)50 var datasetEntities = store.Query("?DataSet <" + Ontology.InstanceOf.Uri + "> <" + Ontology.TypeDataSet.Uri + "> .", 0, 1) 51 51 .Select(x => (Entity)x.Get("DataSet")); 52 52 if (datasetEntities.Count() == 0) return null; -
trunk/sources/HeuristicLab.CEDMA.Server/3.3/ExecuterBase.cs
r2045 r2047 71 71 protected void StoreResults(IAlgorithm finishedAlgorithm) { 72 72 Entity modelEntity = new Entity(Ontology.CedmaNameSpace + Guid.NewGuid()); 73 // store.Add(new Statement(finishedAlgorithm.DataSetEntity, Ontology.PredicateHasModel, modelEntity));74 Store ModelAttribute(modelEntity, Ontology.TargetVariable, finishedAlgorithm.Model.TargetVariable);75 Store ModelAttribute(modelEntity, Ontology.AlgorithmName, finishedAlgorithm.Description);73 store.Add(new Statement(modelEntity, Ontology.InstanceOf, Ontology.TypeModel)); 74 StoreEntityAttribute(modelEntity, Ontology.TargetVariable, finishedAlgorithm.Model.TargetVariable); 75 StoreEntityAttribute(modelEntity, Ontology.AlgorithmName, finishedAlgorithm.Description); 76 76 77 77 IModel model = finishedAlgorithm.Model; 78 Store ModelAttribute(modelEntity, Ontology.TrainingMeanSquaredError, model.TrainingMeanSquaredError);79 Store ModelAttribute(modelEntity, Ontology.ValidationMeanSquaredError, model.ValidationMeanSquaredError);80 Store ModelAttribute(modelEntity, Ontology.TestMeanSquaredError, model.TestMeanSquaredError);81 Store ModelAttribute(modelEntity, Ontology.TrainingCoefficientOfDetermination, model.TrainingCoefficientOfDetermination);82 Store ModelAttribute(modelEntity, Ontology.ValidationCoefficientOfDetermination, model.ValidationCoefficientOfDetermination);83 Store ModelAttribute(modelEntity, Ontology.TestCoefficientOfDetermination, model.TestCoefficientOfDetermination);84 Store ModelAttribute(modelEntity, Ontology.TrainingVarianceAccountedFor, model.TrainingVarianceAccountedFor);85 Store ModelAttribute(modelEntity, Ontology.ValidationVarianceAccountedFor, model.ValidationVarianceAccountedFor);86 Store ModelAttribute(modelEntity, Ontology.TestVarianceAccountedFor, model.TestVarianceAccountedFor);87 Store ModelAttribute(modelEntity, Ontology.TrainingMeanAbsolutePercentageError, model.TrainingMeanAbsolutePercentageError);88 Store ModelAttribute(modelEntity, Ontology.ValidationMeanAbsolutePercentageError, model.ValidationMeanAbsolutePercentageError);89 Store ModelAttribute(modelEntity, Ontology.TestMeanAbsolutePercentageError, model.TestMeanAbsolutePercentageError);90 Store ModelAttribute(modelEntity, Ontology.TrainingMeanAbsolutePercentageOfRangeError, model.TrainingMeanAbsolutePercentageOfRangeError);91 Store ModelAttribute(modelEntity, Ontology.ValidationMeanAbsolutePercentageOfRangeError, model.ValidationMeanAbsolutePercentageOfRangeError);92 Store ModelAttribute(modelEntity, Ontology.TestMeanAbsolutePercentageOfRangeError, model.TestMeanAbsolutePercentageOfRangeError);78 StoreEntityAttribute(modelEntity, Ontology.TrainingMeanSquaredError, model.TrainingMeanSquaredError); 79 StoreEntityAttribute(modelEntity, Ontology.ValidationMeanSquaredError, model.ValidationMeanSquaredError); 80 StoreEntityAttribute(modelEntity, Ontology.TestMeanSquaredError, model.TestMeanSquaredError); 81 StoreEntityAttribute(modelEntity, Ontology.TrainingCoefficientOfDetermination, model.TrainingCoefficientOfDetermination); 82 StoreEntityAttribute(modelEntity, Ontology.ValidationCoefficientOfDetermination, model.ValidationCoefficientOfDetermination); 83 StoreEntityAttribute(modelEntity, Ontology.TestCoefficientOfDetermination, model.TestCoefficientOfDetermination); 84 StoreEntityAttribute(modelEntity, Ontology.TrainingVarianceAccountedFor, model.TrainingVarianceAccountedFor); 85 StoreEntityAttribute(modelEntity, Ontology.ValidationVarianceAccountedFor, model.ValidationVarianceAccountedFor); 86 StoreEntityAttribute(modelEntity, Ontology.TestVarianceAccountedFor, model.TestVarianceAccountedFor); 87 StoreEntityAttribute(modelEntity, Ontology.TrainingMeanAbsolutePercentageError, model.TrainingMeanAbsolutePercentageError); 88 StoreEntityAttribute(modelEntity, Ontology.ValidationMeanAbsolutePercentageError, model.ValidationMeanAbsolutePercentageError); 89 StoreEntityAttribute(modelEntity, Ontology.TestMeanAbsolutePercentageError, model.TestMeanAbsolutePercentageError); 90 StoreEntityAttribute(modelEntity, Ontology.TrainingMeanAbsolutePercentageOfRangeError, model.TrainingMeanAbsolutePercentageOfRangeError); 91 StoreEntityAttribute(modelEntity, Ontology.ValidationMeanAbsolutePercentageOfRangeError, model.ValidationMeanAbsolutePercentageOfRangeError); 92 StoreEntityAttribute(modelEntity, Ontology.TestMeanAbsolutePercentageOfRangeError, model.TestMeanAbsolutePercentageOfRangeError); 93 93 94 94 for (int i = 0; i < finishedAlgorithm.Dataset.Columns; i++) { 95 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))); 96 string variableName = finishedAlgorithm.Dataset.GetVariableName(i); 97 double qualImpact = model.GetVariableQualityImpact(variableName); 98 double evalImpact = model.GetVariableEvaluationImpact(variableName); 99 100 Entity inputVariableEntity = new Entity(Ontology.CedmaNameSpace + Guid.NewGuid()); 101 store.Add(new Statement(inputVariableEntity, Ontology.InstanceOf, Ontology.TypeVariableImpact)); 102 store.Add(new Statement(modelEntity, Ontology.HasInputVariable, inputVariableEntity)); 103 StoreEntityAttribute(inputVariableEntity, Ontology.EvaluationImpact, evalImpact); 104 StoreEntityAttribute(inputVariableEntity, Ontology.QualityImpact, qualImpact); 105 StoreEntityAttribute(inputVariableEntity, Ontology.Name, variableName); 100 106 } 101 107 catch (ArgumentException) { … … 105 111 106 112 byte[] serializedModel = PersistenceManager.SaveToGZip(model.Data); 107 store.Add(new Statement(modelEntity, Ontology. PredicateSerializedData, new Literal(Convert.ToBase64String(serializedModel))));113 store.Add(new Statement(modelEntity, Ontology.SerializedData, new Literal(Convert.ToBase64String(serializedModel)))); 108 114 } 109 115 110 private void Store ModelAttribute(Entity model, Entity predicate, object value) {111 store.Add(new Statement( model, predicate, new Literal(value)));116 private void StoreEntityAttribute(Entity entity, Entity predicate, object value) { 117 store.Add(new Statement(entity, predicate, new Literal(value))); 112 118 } 113 119 -
trunk/sources/HeuristicLab.CEDMA.Server/3.3/SimpleDispatcher.cs
r2012 r2047 100 100 var datasetEntity = store 101 101 .Query( 102 "?Dataset <" + Ontology. PredicateInstanceOf + "> <" + Ontology.TypeDataSet + "> .", 0, 1)102 "?Dataset <" + Ontology.InstanceOf + "> <" + Ontology.TypeDataSet + "> .", 0, 1) 103 103 .Select(x => (Entity)x.Get("Dataset")).ElementAt(0); 104 104 DataSet ds = new DataSet(store, datasetEntity); … … 107 107 .Query( 108 108 "?Model <" + Ontology.TargetVariable + "> ?TargetVariable ." + Environment.NewLine + 109 "?Model <" + Ontology. AlgorithmName + "> ?AlgoName .",109 "?Model <" + Ontology.Name + "> ?AlgoName .", 110 110 0, 1000) 111 111 .Select(x => new Resource[] { (Literal)x.Get("TargetVariable"), (Literal)x.Get("AlgoName") });
Note: See TracChangeset
for help on using the changeset viewer.