private double calculateCategory(String categoryName, String... features) {
TLongArrayList denomList = new TLongArrayList();
TLongArrayList numList = new TLongArrayList();
LongPair pair = new LongPair();
/*
* categoryProbability(categoryName, pair); gcd(pair);
* denomList.add(pair.getSecond()); numList.add(pair.getFirst());
*/
Category category = categories.get(categoryName);
for (int i = 0; i < features.length; i++) {
pair.setFirst(category.featureOccurences(features[i]) + alpha);
pair.setSecond(featureOccurences(features[i]) + categories.size()
* alpha);
gcd(pair);
numList.add(pair.getFirst());
denomList.add(pair.getSecond());
}
// count the amount of zeros in the lists
long numerator = 1, denominator = 1;
for (int i = 0; i < denomList.size(); i++) {