use of tech.tablesaw.api.Table in project symja_android_library by axkr.
the class ShortDictionaryMap method countByCategory.
/**
*/
@Override
public Table countByCategory(String columnName) {
Table t = Table.create("Column: " + columnName);
StringColumn categories = StringColumn.create("Category");
IntColumn counts = IntColumn.create("Count");
// Now uses the keyToCount map
for (Map.Entry<Short, Integer> entry : keyToCount.short2IntEntrySet()) {
categories.append(getValueForKey(entry.getKey()));
counts.append(entry.getValue());
}
t.addColumns(categories);
t.addColumns(counts);
return t;
}
use of tech.tablesaw.api.Table in project symja_android_library by axkr.
the class Stats method asTableComplete.
public Table asTableComplete() {
Table t = asTable();
StringColumn measure = t.stringColumn("Measure");
DoubleColumn value = t.doubleColumn("Value");
measure.append("Sum of Squares");
value.append(sumOfSquares());
measure.append("Sum of Logs");
value.append(sumOfLogs());
measure.append("Population Variance");
value.append(populationVariance());
measure.append("Geometric Mean");
value.append(geometricMean());
measure.append("Quadratic Mean");
value.append(quadraticMean());
measure.append("Second Moment");
value.append(secondMoment());
return t;
}
Aggregations