Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
09/28/16 12:53:51 (8 years ago)
Author:
gkronber
Message:

simplification of grammar and problem and bug fixes related to precalculated smoothed features

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/HeuristicLab.Problems.GeneticProgramming.BloodGlucosePrediction/Model.cs

    r14310 r14311  
    1818  public sealed class Model : NamedItem, IRegressionModel {
    1919    [Storable]
    20     private readonly IRegressionProblemData problemData;
    21     [Storable]
    2220    private readonly ISymbolicExpressionTree tree;
    2321    [Storable]
     
    2624    private string[] variablesUsedForPrediction;
    2725
     26    [StorableConstructor]
     27    private Model(bool deserializing) : base(deserializing) {
     28    }
     29
    2830    private Model(Model original, Cloner cloner) {
    29       this.problemData = cloner.Clone(original.problemData);
    3031      this.tree = cloner.Clone(original.tree);
    3132      this.variablesUsedForPrediction = original.variablesUsedForPrediction;
     
    3334    }
    3435
    35     public Model(IRegressionProblemData problemData, ISymbolicExpressionTree tree, string targetVariable, string[] variablesUsedForPrediction) {
    36       this.problemData = problemData;
     36    public Model(ISymbolicExpressionTree tree, string targetVariable, string[] variablesUsedForPrediction) {
    3737      this.tree = tree;
    3838      this.variablesUsedForPrediction = variablesUsedForPrediction;
     
    4545
    4646    public IEnumerable<double> GetEstimatedValues(IDataset dataset, IEnumerable<int> rows) {
    47       return Interpreter.Apply(tree.Root.GetSubtree(0).GetSubtree(0), problemData.Dataset, rows);
     47      return Interpreter.Apply(tree.Root.GetSubtree(0).GetSubtree(0), dataset, rows);
    4848    }
    4949
Note: See TracChangeset for help on using the changeset viewer.