Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
09/08/09 11:11:50 (15 years ago)
Author:
gkronber
Message:

Extended IAnalyzerModel and the default implementation AnalyzerModel to hold a dictionary of result values and extended GP algorithms for time-series prognosis and classification to store specific results (TheilInequalityCoefficient and Accuracy in the model) (#736). Also prepared IAnalyzerModel and AnalyzerModel and modeling algorithms to store meta-information about models (#731).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Modeling.Database.SQLServerCompact/3.2/DatabaseService.cs

    r2339 r2344  
    3838      Connect();
    3939      if (!ctx.DatabaseExists())
    40         ctx.CreateDatabase();     
     40        ctx.CreateDatabase();
    4141    }
    4242
     
    109109
    110110      using (ModelingDataContext ctx = new ModelingDataContext(connection)) {
    111         //get all double properties to save as modelResult
    112         IEnumerable<PropertyInfo> modelResultInfos = model.GetType().GetProperties().Where(
    113           info => info.PropertyType == typeof(double));
    114         foreach (PropertyInfo modelResultInfo in modelResultInfos) {
    115           Result result = GetOrCreateResult(modelResultInfo.Name);
    116           double value = (double)modelResultInfo.GetValue(model, null);
    117           ctx.ModelResults.InsertOnSubmit(new ModelResult(m, result, value));
     111        foreach (KeyValuePair<string, double> pair in model.Results) {
     112          Result result = GetOrCreateResult(pair.Key);
     113          ctx.ModelResults.InsertOnSubmit(new ModelResult(m, result, pair.Value));
    118114        }
    119115        ctx.SubmitChanges();
    120116      }
     117
     118      // code to store meta-information for models (gkronber (8.9.09))
     119      //using (ModelingDataContext ctx = new ModelingDataContext(connection)) {
     120      //  foreach (KeyValuePair<string, double> pair in model.MetaData) {
     121      //    MetaData metaData = GetOrCreateMetaData(pair.Key);
     122      //    ctx.ModelMetaData.InsertOnSubmit(new ModelMetaData(m, metaData, pair.Value));
     123      //  }
     124      //  ctx.SubmitChanges();
     125      //}
    121126
    122127      using (ModelingDataContext ctx = new ModelingDataContext(connection)) {
Note: See TracChangeset for help on using the changeset viewer.