Changeset 13870 for branches/HeuristicLab.Problems.GeneticProgramming.BloodGlucosePrediction/Interpreter.cs
- Timestamp:
- 06/01/16 17:59:36 (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HeuristicLab.Problems.GeneticProgramming.BloodGlucosePrediction/Interpreter.cs
r13867 r13870 7 7 using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding; 8 8 using HeuristicLab.Problems.DataAnalysis; 9 using HeuristicLab.Problems.DataAnalysis.Symbolic; 9 10 10 11 namespace HeuristicLab.Problems.GeneticProgramming.GlucosePrediction { … … 26 27 }; 27 28 data.predGluc = new double[data.realGluc.Length]; 29 Array.Copy(data.realGluc, data.predGluc, data.predGluc.Length); 28 30 for (int k = 0; k < data.predGluc.Length; k++) { 29 31 if (double.IsNaN(targetGluc[k])) { … … 122 124 GetMaxValueAndDistance(data.realIns, k, out maxVal, out maxValDistance, maxDistance: 48); 123 125 return n.Weight * (sum - maxVal) * maxVal * Beta(maxValDistance / 48.0, n.Alpha, n.Beta); 126 } else if (node.Symbol is Constant) { 127 var n = (ConstantTreeNode)node; 128 return n.Value; 124 129 } else { 125 130 throw new InvalidProgramException("found unknown symbol " + node.Symbol);
Note: See TracChangeset
for help on using the changeset viewer.