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

Method getOnlineDenseStats

JSAT/src/jsat/DataSet.java:319–326  ·  view source on GitHub ↗

Returns an OnLineStatistics object that is built by observing what proportion of each data point contains non zero numerical values. A mean of 1 indicates all values were fully dense, and a mean of 0 indicates all values were completely sparse (all zeros). @return statistics on the percent

()

Source from the content-addressed store, hash-verified

317 * @return statistics on the percent sparseness of each data point
318 */
319 public OnLineStatistics getOnlineDenseStats()
320 {
321 OnLineStatistics stats = new OnLineStatistics();
322 double N = getNumNumericalVars();;
323 for(int i = 0; i < getSampleSize(); i++)
324 stats.add(getDataPoint(i).getNumericalValues().nnz()/N);
325 return stats;
326 }
327
328 /**
329 * Computes the weighted mean and variance for each column of feature

Callers

nothing calls this directly

Calls 6

getNumNumericalVarsMethod · 0.95
getSampleSizeMethod · 0.95
addMethod · 0.95
getDataPointMethod · 0.95
getNumericalValuesMethod · 0.80
nnzMethod · 0.45

Tested by

no test coverage detected