Allowed gridsearch-based methods to handle latent variables. No changes to computations were made, just set a flag to allow (but ignore) latent variables.
@@ -73,9 +73,8 @@ public abstract class BaseGridSearch extends WeightLearningApplication {
this(model.getRules(), rvDB, observedDB);
}
- // TODO(eriq): Latent variables?
public BaseGridSearch(List<Rule> rules, Database rvDB, Database observedDB) {
- super(rules, rvDB, observedDB, false);
+ super(rules, rvDB, observedDB, true);
currentLocation = null;
@@ -85,6 +84,11 @@ public abstract class BaseGridSearch extends WeightLearningApplication {
objectives = new HashMap<String, Double>();
}
+ // TODO(eriq): Remove once latent variables have been reworked in WL.
+ @Override
+ protected void initLatentGroundModel() {
+ }
+
@Override
protected void doLearn() {
double bestObjective = -1;
@@ -113,7 +117,6 @@ public abstract class BaseGridSearch extends WeightLearningApplication {
// The weights have changed, so we are no longer in an MPE state.
inMPEState = false;
- inLatentMPEState = false;
double objective = inspectLocation(weights);
@@ -137,7 +140,6 @@ public abstract class BaseGridSearch extends WeightLearningApplication {
// The weights have changed, so we are no longer in an MPE state.
inMPEState = false;
- inLatentMPEState = false;
}
/**
