Free cookie consent management tool by TermsFeed Policy Generator

Changeset 2381


Ignore:
Timestamp:
09/23/09 13:58:07 (15 years ago)
Author:
mkommend
Message:

added GetInputVariables to IPredictor (ticket #760)

Location:
trunk/sources
Files:
4 edited

Legend:

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

    r2328 r2381  
    5959    }
    6060
     61    public override IEnumerable<string> GetInputVariables() {
     62      HashSet<string> inputVariables = new HashSet<string>();
     63      foreach (IFunctionTree ft in FunctionTreeIterator.IteratePrefix(functionTree.FunctionTree)) {
     64        if (ft is VariableFunctionTree) {
     65          VariableFunctionTree variable = (VariableFunctionTree) ft;
     66          inputVariables.Add(variable.VariableName);
     67        }
     68      }
     69      return inputVariables;
     70    }
     71
    6172    public override IView CreateView() {
    6273      return new PredictorView(this);
  • trunk/sources/HeuristicLab.Modeling/3.2/IPredictor.cs

    r2328 r2381  
    3131    double LowerPredictionLimit { get; set; }
    3232    double[] Predict(Dataset dataset, int start, int end);
     33    IEnumerable<string> GetInputVariables();
    3334  }
    3435}
  • trunk/sources/HeuristicLab.Modeling/3.2/PredictorBase.cs

    r2328 r2381  
    3232    public double LowerPredictionLimit { get; set; }
    3333    public abstract double[] Predict(Dataset dataset, int start, int end);
     34    public abstract IEnumerable<string> GetInputVariables();
    3435
    3536    public PredictorBase() : this(double.MinValue, double.MaxValue) { } // for persistence
  • trunk/sources/HeuristicLab.SupportVectorMachines/3.2/Predictor.cs

    r2373 r2381  
    8888    }
    8989
     90    public override IEnumerable<string> GetInputVariables() {
     91      return variableNames.Keys;
     92    }
     93
    9094    public override IView CreateView() {
    9195      return new PredictorView(this);
Note: See TracChangeset for help on using the changeset viewer.