BayesChef now reports MSE of evidence and hidden recipe flavor combos.

Also, improved formatting of output to show exactly which flavors were included in the calculations.
This commit is contained in:
Woody Folsom
2012-03-12 09:18:28 -04:00
parent 06066f470a
commit b1e5f2c74e
4 changed files with 82 additions and 46 deletions

View File

@@ -1,5 +1,10 @@
package net.woodyfolsom.cs6601.p2;
import java.util.ArrayList;
import java.util.HashSet;
import java.util.List;
import java.util.Set;
import com.thoughtworks.xstream.annotations.XStreamAlias;
@XStreamAlias("ing")
@@ -12,6 +17,16 @@ public class Ingredient {
return item;
}
public Set<TYPE> getTypes() {
Set<TYPE> types = new HashSet<TYPE>();
for (TYPE type : TYPE.values()) {
if (isType(type)) {
types.add(type);
}
}
return types;
}
public boolean isType(TYPE type) {
switch (type) {
case BEEF :