Changeset 4194 for branches/DataAnalysis/HeuristicLab.Problems.DataAnalysis.MultiVariate.Regression/3.3/Symbolic/Evaluators/SymbolicVectorRegressionEvaluator.cs
- Timestamp:
- 08/11/10 13:00:53 (14 years ago)
- Location:
- branches/DataAnalysis/HeuristicLab.Problems.DataAnalysis.MultiVariate.Regression
- Files:
-
- 1 edited
- 1 copied
Legend:
- Unmodified
- Added
- Removed
-
branches/DataAnalysis/HeuristicLab.Problems.DataAnalysis.MultiVariate.Regression/3.3/Symbolic/Evaluators/SymbolicVectorRegressionEvaluator.cs
r4068 r4194 105 105 #endregion 106 106 107 public SymbolicVectorRegressionEvaluator(bool deserializing) : base(deserializing) { } 107 108 public SymbolicVectorRegressionEvaluator() 108 109 : base() { … … 118 119 } 119 120 120 public override IOperation Apply() { 121 var interpreter = SymbolicExpressionTreeInterpreter; 122 var tree = SymbolicExpressionTree; 123 var problemData = MultiVariateDataAnalysisProblemData; 124 125 IEnumerable<string> selectedTargetVariables = 126 problemData.TargetVariables.CheckedItems 127 .Select(x => x.Value.Value); 128 129 // check if there is a vector component for each target variable 130 if (selectedTargetVariables.Count() != tree.Root.SubTrees[0].SubTrees.Count) 131 throw new ArgumentException("The dimension of the output-vector of the tree doesn't match the number of selected target variables."); 132 int start = SamplesStart.Value; 133 int end = SamplesEnd.Value; 134 135 IEnumerable<int> rows = GenerateRowsToEvaluate((uint)Random.Next(), RelativeNumberOfEvaluatedSamples.Value, start, end); 136 137 Evaluate(tree, interpreter, problemData, selectedTargetVariables, rows, LowerEstimationLimit, UpperEstimationLimit); 138 139 return base.Apply(); 140 } 141 142 public abstract void Evaluate(SymbolicExpressionTree tree, ISymbolicExpressionTreeInterpreter interpreter, MultiVariateDataAnalysisProblemData problemData, IEnumerable<string> targetVariables, IEnumerable<int> rows, DoubleArray lowerEstimationBound, DoubleArray upperEstimationBound); 143 144 private static IEnumerable<int> GenerateRowsToEvaluate(uint seed, double relativeAmount, int start, int end) { 121 public static IEnumerable<int> GenerateRowsToEvaluate(uint seed, double relativeAmount, int start, int end) { 145 122 if (end < start) throw new ArgumentException("Start value is larger than end value."); 146 123 int count = (int)((end - start) * relativeAmount);
Note: See TracChangeset
for help on using the changeset viewer.