Changeset 14311 for branches/HeuristicLab.Problems.GeneticProgramming.BloodGlucosePrediction/Model.cs
- Timestamp:
- 09/28/16 12:53:51 (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HeuristicLab.Problems.GeneticProgramming.BloodGlucosePrediction/Model.cs
r14310 r14311 18 18 public sealed class Model : NamedItem, IRegressionModel { 19 19 [Storable] 20 private readonly IRegressionProblemData problemData;21 [Storable]22 20 private readonly ISymbolicExpressionTree tree; 23 21 [Storable] … … 26 24 private string[] variablesUsedForPrediction; 27 25 26 [StorableConstructor] 27 private Model(bool deserializing) : base(deserializing) { 28 } 29 28 30 private Model(Model original, Cloner cloner) { 29 this.problemData = cloner.Clone(original.problemData);30 31 this.tree = cloner.Clone(original.tree); 31 32 this.variablesUsedForPrediction = original.variablesUsedForPrediction; … … 33 34 } 34 35 35 public Model(IRegressionProblemData problemData, ISymbolicExpressionTree tree, string targetVariable, string[] variablesUsedForPrediction) { 36 this.problemData = problemData; 36 public Model(ISymbolicExpressionTree tree, string targetVariable, string[] variablesUsedForPrediction) { 37 37 this.tree = tree; 38 38 this.variablesUsedForPrediction = variablesUsedForPrediction; … … 45 45 46 46 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); 48 48 } 49 49
Note: See TracChangeset
for help on using the changeset viewer.