Free cookie consent management tool by TermsFeed Policy Generator

Changeset 2567


Ignore:
Timestamp:
12/21/09 16:23:49 (15 years ago)
Author:
gkronber
Message:

Implemented #818 (Additional model meta data field that stores the number of input variables of the model).

Location:
trunk/sources
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.GP.StructureIdentification/3.3/Predictor.cs

    r2537 r2567  
    4141    private ITreeEvaluator treeEvaluator;
    4242    public ITreeEvaluator TreeEvaluator {
    43       get { return (ITreeEvaluator) this.treeEvaluator.Clone(); }
     43      get { return (ITreeEvaluator)this.treeEvaluator.Clone(); }
    4444    }
    4545
     
    7272      HashSet<string> inputVariables = new HashSet<string>();
    7373      foreach (IFunctionTree ft in FunctionTreeIterator.IteratePrefix(functionTree.FunctionTree)) {
    74         if (ft is VariableFunctionTree) {
    75           VariableFunctionTree variable = (VariableFunctionTree)ft;
    76           inputVariables.Add(variable.VariableName);
     74        VariableFunctionTree varFunTree = ft as VariableFunctionTree;
     75        if (varFunTree != null) {
     76          inputVariables.Add(varFunTree.VariableName);
    7777        }
    7878      }
  • trunk/sources/HeuristicLab.Modeling/3.2/DefaultModelAnalyzerOperators.cs

    r2454 r2567  
    2525using HeuristicLab.Modeling;
    2626using HeuristicLab.Data;
     27using System.Linq;
    2728
    2829namespace HeuristicLab.Modeling {
     
    5960        model.ExtractResult(modelScope, r);
    6061      }
     62     
     63      model.SetMetaData("NumberOfInputVariables", model.Predictor.GetInputVariables().Count());
    6164
    6265      return model;
Note: See TracChangeset for help on using the changeset viewer.