Changeset 18202
- Timestamp:
- 01/17/22 15:43:46 (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/3040_VectorBasedGP/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/SegmentOptimization/SegmentOptimizationProblem.cs
r18186 r18202 156 156 double diff = target - prediction; 157 157 158 if (results.TryGetValue("AggValue Diff", out var oldDiffResult)) { 159 var oldDiff = (DoubleValue)oldDiffResult.Value; 160 if (Math.Abs(oldDiff.Value) < Math.Abs(diff)) return; 161 } 162 158 163 results.AddOrUpdateResult("Bounds", bounds); 159 164 … … 180 185 var array = new double[data.Columns]; 181 186 for (int row = 0; row < data.Rows; row++) { 182 for (int i = 0; i < array.Length; i++) array[i] = data[row, i]; 183 184 var vector = DoubleVector.Build.DenseOfArray(array); 185 var segment = vector.SubVector(bounds.Start, bounds.Size); 187 for (int i = 0; i < array.Length; i++) 188 array[i] = data[row, i]; 189 190 //var vector = DoubleVector.Build.DenseOfArray(array); 191 //var segment = vector.SubVector(bounds.Start, bounds.Size); 192 var segment = DoubleVector.Build.DenseOfEnumerable(array.Skip(bounds.Start).Take(bounds.Size)); 186 193 187 194 switch (aggregation) {
Note: See TracChangeset
for help on using the changeset viewer.