This method returns a dataset that is a subset of this dataset, where only the rows that have no missing values are kept. The new dataset is backed by this dataset. @return a subset of this dataset that has all data points with missing features dropped
()
| 437 | * features dropped |
| 438 | */ |
| 439 | public Type getMissingDropped() |
| 440 | { |
| 441 | List<Integer> hasNoMissing = new IntList(); |
| 442 | for (int i = 0; i < getSampleSize(); i++) |
| 443 | { |
| 444 | DataPoint dp = getDataPoint(i); |
| 445 | boolean missing = dp.getNumericalValues().countNaNs() > 0; |
| 446 | for(int c : dp.getCategoricalValues()) |
| 447 | if(c < 0) |
| 448 | missing = true; |
| 449 | if(!missing) |
| 450 | hasNoMissing.add(i); |
| 451 | } |
| 452 | return getSubset(hasNoMissing); |
| 453 | } |
| 454 | |
| 455 | /** |
| 456 | * Splits the dataset randomly into proportionally sized partitions. |
nothing calls this directly
no test coverage detected