edu::tum::cs::srl::bayesnets::learning::CPTLearner Class Reference
List of all members.
Public Member Functions |
| CPTLearner (RelationalBeliefNetwork bn, boolean uniformDefault, boolean debug) throws Exception |
| CPTLearner (RelationalBeliefNetwork bn) throws Exception |
void | learn (Database db) throws Exception |
void | learnTyped (Database db, boolean closedWorld, boolean verbose) throws Exception |
Protected Member Functions |
void | countVariable (Database db, RelationalNode node, String[] params, String[] domainNames, int i, boolean closedWorld) throws Exception |
void | countVariable (Database db, RelationalNode node, String[] params, boolean closedWorld) throws Exception |
Protected Attributes |
boolean | debug = false |
HashMap< Integer, HashMap
< String, Integer > > | marginals |
int | numExamples |
boolean | verbose |
Detailed Description
Definition at line 21 of file srl/bayesnets/learning/CPTLearner.java.
Constructor & Destructor Documentation
edu::tum::cs::srl::bayesnets::learning::CPTLearner::CPTLearner |
( |
RelationalBeliefNetwork |
bn |
) |
throws Exception [inline] |
edu::tum::cs::srl::bayesnets::learning::CPTLearner::CPTLearner |
( |
RelationalBeliefNetwork |
bn, |
|
|
boolean |
uniformDefault, |
|
|
boolean |
debug | |
|
) |
| | throws Exception [inline] |
Member Function Documentation
void edu::tum::cs::srl::bayesnets::learning::CPTLearner::countVariable |
( |
Database |
db, |
|
|
RelationalNode |
node, |
|
|
String[] |
params, |
|
|
String[] |
domainNames, |
|
|
int |
i, |
|
|
boolean |
closedWorld | |
|
) |
| | throws Exception [inline, protected] |
generates all groundings (possible lists of parameters) of the node with the given name and counts the corresponding example
- Parameters:
-
| db | the database (containing domains and propositions) to use |
| nodeName | name of the node for which to count examples |
| params | current list of parameters |
| domainNames | list of domain names, with one entry for each parameter |
| i | index into params at which to insert the next parameter |
| closedWorld | whether to make the closed-world assumption |
- Exceptions:
-
Definition at line 301 of file srl/bayesnets/learning/CPTLearner.java.
void edu::tum::cs::srl::bayesnets::learning::CPTLearner::countVariable |
( |
Database |
db, |
|
|
RelationalNode |
node, |
|
|
String[] |
params, |
|
|
boolean |
closedWorld | |
|
) |
| | throws Exception [inline, protected] |
count an example (variable setting) by incrementing the counter for the given variable
- Parameters:
-
| db | the database containing propositions |
| node | node of the variable for which we are counting an example |
| params | the node's actual parameters |
| closedWorld | whether the closed-world assumption is to be made |
- Exceptions:
-
Definition at line 47 of file srl/bayesnets/learning/CPTLearner.java.
void edu::tum::cs::srl::bayesnets::learning::CPTLearner::learn |
( |
Database |
db |
) |
throws Exception [inline] |
learn the CPTs from only the data that is given in the database (relations not in the database are not considered because the closed-world assumption is not being made)
- Parameters:
-
- Exceptions:
-
Definition at line 249 of file srl/bayesnets/learning/CPTLearner.java.
void edu::tum::cs::srl::bayesnets::learning::CPTLearner::learnTyped |
( |
Database |
db, |
|
|
boolean |
closedWorld, |
|
|
boolean |
verbose | |
|
) |
| | throws Exception [inline] |
generates for all nodes all the possible parameters (using the node signatures and domain elements from the database) and counts the corresponding examples
- Parameters:
-
- Exceptions:
-
Definition at line 263 of file srl/bayesnets/learning/CPTLearner.java.
Member Data Documentation
The documentation for this class was generated from the following file: