Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
08/14/09 19:56:04 (15 years ago)
Author:
gkronber
Message:
  • introduced a variablename to index mapping for SVM models (to make sure we can use the model for prediction in the model analyzer)
  • added support to enable and disable algorithms in the dispatcher and removed DispatcherBase
  • fixed bugs when calculating variable impacts and reading the final model of GP algorithms

#722 (IModel should provide a Predict() method to get predicted values for an input vector)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.SupportVectorMachines/3.2/SupportVectorRegression.cs

    r2285 r2290  
    448448      model.TestSamplesStart = bestModelScope.GetVariableValue<IntData>("TestSamplesStart", true).Data;
    449449      model.TestSamplesEnd = bestModelScope.GetVariableValue<IntData>("TestSamplesEnd", true).Data;
    450       model.Predictor = new Predictor(bestModelScope.GetVariableValue<SVMModel>("Model", false), model.TargetVariable);
     450      Dictionary<string, int> variableNames = new Dictionary<string, int>();
     451      for (int i = 0; i < ds.Columns; i++) variableNames[ds.GetVariableName(i)] = i;
     452      model.Predictor = new Predictor(bestModelScope.GetVariableValue<SVMModel>("Model", false), model.TargetVariable, variableNames);
    451453
    452454
Note: See TracChangeset for help on using the changeset viewer.