public Type getMissingDropped ( ) { List < Integer > hasNoMissing = new IntList ( ) ; for ( int i = 0 ; i < size ( ) ; i ++ ) { DataPoint dp = getDataPoint ( i ) ; boolean missing = dp . getNumericalValues ( ) . countNaNs ( ) > 0 ; for ( int c : dp . getCategoricalValues ( ) ) if ( c < 0 ) missing = true ; if ( ! missing ) hasNoMissing . add ( i ) ; } return getSubset ( hasNoMissing ) ; }
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 .