public abstract class WeightLearningApplication extends Object implements ModelApplication
Modifier and Type | Field and Description |
---|---|
protected List<Rule> |
allRules |
protected Evaluator |
evaluator |
protected InferenceApplication |
inference |
protected boolean |
inMPEState
Flags to track if the current variable configuration is an MPE state.
|
protected List<WeightedRule> |
mutableRules |
protected Database |
observedDB |
protected Database |
rvDB |
protected TrainingMap |
trainingMap |
Constructor and Description |
---|
WeightLearningApplication(List<Rule> rules,
Database rvDB,
Database observedDB) |
Modifier and Type | Method and Description |
---|---|
void |
close()
Releases all resources used by this ModelApplication.
|
protected void |
computeMPEState()
Run inference.
|
protected abstract void |
doLearn()
Do the actual learning procedure.
|
InferenceApplication |
getInferenceApplication() |
static WeightLearningApplication |
getWLA(String name,
List<Rule> rules,
Database randomVariableDatabase,
Database observedTruthDatabase)
Construct a weight learning application given the data.
|
protected void |
initGroundModel()
Initialize all the infrastructure dealing with the ground model.
|
void |
initGroundModel(InferenceApplication inference,
TrainingMap trainingMap)
Pass in all the ground model infrastructure.
|
void |
learn()
Learns new weights.
|
protected void |
postInitGroundModel()
A convenient place for children to do additional ground model initialization.
|
void |
setBudget(double budget)
Set a budget (give as a proportion of the max budget).
|
protected Database rvDB
protected Database observedDB
protected List<WeightedRule> mutableRules
protected TrainingMap trainingMap
protected InferenceApplication inference
protected Evaluator evaluator
protected boolean inMPEState
public void learn()
protected abstract void doLearn()
public void setBudget(double budget)
public InferenceApplication getInferenceApplication()
protected void initGroundModel()
public void initGroundModel(InferenceApplication inference, TrainingMap trainingMap)
protected void postInitGroundModel()
protected void computeMPEState()
public void close()
ModelApplication
close
in interface ModelApplication
Copyright © 2020 University of California, Santa Cruz. All rights reserved.