Changeset 2275


Ignore:
Timestamp:
08/11/09 15:43:58 (12 years ago)
Author:
gkronber
Message:
  • Fixed bugs in the SQL comact backend for HL.Modeling.
  • Readded dispatching of stochastic algorithms in CEDMA dispatcher after it was deactivated unintentionally
  • Show algorithm name as model attribute in CEDMA results.

#712.

Location:
trunk/sources
Files:
3 edited

Legend:

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

    r2223 r2275  
    9494        modelEntry.Set("PersistedData", database.GetModelData(model));
    9595        modelEntry.Set("TargetVariable", model.TargetVariable.Name);
     96        modelEntry.Set("Algorithm", model.Algorithm.Name);
    9697        Dictionary<HeuristicLab.Modeling.Database.IVariable, ResultsEntry> inputVariableResultsEntries =
    9798          new Dictionary<HeuristicLab.Modeling.Database.IVariable, ResultsEntry>();
     
    123124    private void LoadModelAttributes() {
    124125      ordinalVariables = database.GetAllResults().Select(r => r.Name).ToArray();
    125       categoricalVariables = new string[] { "TargetVariable" };
     126      categoricalVariables = new string[] { "TargetVariable", "Algorithm" };
    126127    }
    127128
  • trunk/sources/HeuristicLab.CEDMA.Server/3.3/SimpleDispatcher.cs

    r2270 r2275  
    6060        case LearningTask.Regression: {
    6161            var regressionAlgos = algos.Where(a => (a as IClassificationAlgorithm) == null && (a as ITimeSeriesAlgorithm) == null);
    62             selectedAlgorithm = ChooseDeterministic(targetVariable, inputVariables, regressionAlgos); // ?? ChooseStochastic(regressionAlgos);
     62            selectedAlgorithm = ChooseDeterministic(targetVariable, inputVariables, regressionAlgos) ?? ChooseStochastic(regressionAlgos);
    6363            break;
    6464          }
  • trunk/sources/HeuristicLab.Modeling.Database.SQLServerCompact/3.2/DatabaseService.cs

    r2271 r2275  
    9494      using (ModelingDataContext ctx = new ModelingDataContext(connection)) {
    9595        ctx.ModelData.InsertOnSubmit(new ModelData(m, PersistenceManager.SaveToGZip(model.Data)));
     96        ctx.SubmitChanges();
    9697      }
    9798
     
    124125        foreach (MethodInfo inputVariableResultInfo in inputVariableResultInfos) {
    125126          Result result = GetOrCreateResult(inputVariableResultInfo.Name.Substring(3));
    126           foreach (InputVariable variable in ctx.InputVariables.Where(iv => iv.Model == model)) {
     127          foreach (InputVariable variable in ctx.InputVariables.Where(iv => iv.Model == m)) {
    127128            double value = (double)inputVariableResultInfo.Invoke(model, new object[] { variable.Variable.Name });
    128129            ctx.InputVariableResults.InsertOnSubmit(new InputVariableResult(variable, result, value));
Note: See TracChangeset for help on using the changeset viewer.