Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
06/09/09 14:34:56 (15 years ago)
Author:
gkronber
Message:

Implemented a first version of an operator to calculate variable impacts of models (generated by GP or SVM). #644 (Variable impact of CEDMA models should be calculated and stored in the result DB)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Modeling/3.2/Model.cs

    r1922 r2034  
    120120    }
    121121
     122    public double GetVariableImpact(string variableName) {
     123      if (variableImpacts.ContainsKey(variableName)) return variableImpacts[variableName];
     124      else return 0.0;
     125    }
     126
    122127    private IItem data;
    123128    public IItem Data {
     
    127132
    128133    #endregion
     134
     135    private Dictionary<string, double> variableImpacts = new Dictionary<string, double>();
     136    public void SetVariableImpact(string variableName, double impact) {
     137      variableImpacts[variableName] = impact;
     138    }
     139
     140    public void SetVariableImpact(int variableIndex, double impact) {
     141      variableImpacts[dataset.GetVariableName(variableIndex)] = impact;
     142    }
    129143  }
    130144}
Note: See TracChangeset for help on using the changeset viewer.