MCPcopy Create free account
hub / github.com/EdwardRaff/JSAT / countMissingValues

Method countMissingValues

JSAT/src/jsat/DataSet.java:606–618  ·  view source on GitHub ↗

@return the number of missing values in both numeric and categorical features

()

Source from the content-addressed store, hash-verified

604 * @return the number of missing values in both numeric and categorical features
605 */
606 public long countMissingValues()
607 {
608 long missing = 0;
609 for (int i = 0; i < getSampleSize(); i++)
610 {
611 DataPoint dp = getDataPoint(i);
612 missing += dp.getNumericalValues().countNaNs();
613 for(int c : dp.getCategoricalValues())
614 if(c < 0)
615 missing++;
616 }
617 return missing;
618 }
619
620 /**
621 * Creates an array of column vectors for every numeric variable in this

Callers 1

testFitMethod · 0.80

Calls 5

getSampleSizeMethod · 0.95
getDataPointMethod · 0.95
getNumericalValuesMethod · 0.95
getCategoricalValuesMethod · 0.95
countNaNsMethod · 0.80

Tested by 1

testFitMethod · 0.64