X
This commit is contained in:
@@ -221,12 +221,12 @@ public class FoodNetBuilder {
|
||||
public static BayesNet createDishNet(Survey survey, RecipeBook recipeBook, int startIndex, int endIndex) {
|
||||
BayesNet net = new BayesNet(VARIABLES);
|
||||
|
||||
net.setDistribution(new Variable(SOMEONE_VEGETARIAN, DOMAIN), vegi(survey));
|
||||
// net.setDistribution(new Variable(SOMEONE_VEGETARIAN, DOMAIN), vegi(survey));
|
||||
//net.setDistribution(new Variable(SOMEONE_ALLERGIC_NUTS, DOMAIN), allergicNuts(survey));
|
||||
|
||||
net.setDistribution(new Variable(CONTAINS_MEAT, DOMAIN), meat());
|
||||
//net.setDistribution(new Variable(CONTAINS_NUTS, DOMAIN), nuts());
|
||||
|
||||
net.setDistribution(new Variable(SOMEONE_VEGETARIAN, DOMAIN), vegi(survey));
|
||||
net.setDistribution(new Variable(CONTAINS_VEGETABLE, DOMAIN),
|
||||
vegetables());
|
||||
net.setDistribution(new Variable(CONTAINS_BEEF, DOMAIN), beef());
|
||||
@@ -238,11 +238,12 @@ public class FoodNetBuilder {
|
||||
net.setDistribution(new Variable(TASTE, RATING_DOMAIN), taste());
|
||||
|
||||
Ontology ontology = createOntology();
|
||||
for (String category : ontology.getClasses()) {
|
||||
net.connect(category, SOMEONE_VEGETARIAN);
|
||||
/*net.connect(category, SOMEONE_ALLERGIC_NUTS);*/
|
||||
}
|
||||
|
||||
// for (String category : ontology.getClasses()) {
|
||||
// net.connect(category, SOMEONE_VEGETARIAN);
|
||||
// /*net.connect(category, SOMEONE_ALLERGIC_NUTS);*/
|
||||
// }
|
||||
net.connect(SOMEONE_VEGETARIAN, CONTAINS_MEAT);
|
||||
|
||||
for (String thing : OBSERVED) {
|
||||
net.connect(thing, ontology.getInheritance().get(thing));
|
||||
net.connect(TASTE, thing);
|
||||
|
||||
Reference in New Issue
Block a user