Public Member Functions | |
void | addFormula (Formula f, double weight) |
void | addFunctionalDependency (String predicateName, Integer index) |
void | addGuaranteedDomainElements (String domain, String[] elements) |
void | addHardFormula (Formula f) |
void | addSignature (Signature sig) |
double | getdeltaMin () |
Set< Formula > | getFormulas () |
Integer | getFunctionallyDeterminedArgument (String predicateName) |
Set< String > | getFunctionalPreds () |
HashMap< String, String[]> | getGuaranteedDomainElements () |
double | getHardWeight () |
Collection< String > | getPrologRules () |
Collection< RelationKey > | getRelationKeys (String relation) |
Signature | getSignature (String predName) |
Collection< Signature > | getSignatures () |
Taxonomy | getTaxonomy () |
MarkovRandomField | ground (Database db, boolean storeFormulasInMRF, GroundingCallback gc) throws Exception |
MarkovRandomField | ground (Database db) throws Exception |
MarkovLogicNetwork () | |
MarkovLogicNetwork (String mlnFileLoc) throws Exception | |
void | read (File mlnFile) throws Exception |
void | replaceType (String oldType, String newType) |
void | write (File f) throws FileNotFoundException |
void | write (PrintStream out) |
Protected Attributes | |
HashMap< Formula, Double > | formula2weight |
HashMap< String, Integer > | functionalPreds |
HashMap< String, String[]> | guaranteedDomainElements |
File | mlnFile |
HashMap< String, Signature > | signatures |
Package Attributes | |
double | sumAbsWeights = 0 |
represents a Markov logic network
Definition at line 30 of file MarkovLogicNetwork.java.
edu::tum::cs::srl::mln::MarkovLogicNetwork::MarkovLogicNetwork | ( | String | mlnFileLoc | ) | throws Exception [inline] |
constructs a Markov logic network from an MLN file
mlnFileLoc | location of the MLN-file |
Exception |
Definition at line 53 of file MarkovLogicNetwork.java.
edu::tum::cs::srl::mln::MarkovLogicNetwork::MarkovLogicNetwork | ( | ) | [inline] |
constructs an empty MLN
Definition at line 61 of file MarkovLogicNetwork.java.
void edu::tum::cs::srl::mln::MarkovLogicNetwork::addFormula | ( | Formula | f, | |
double | weight | |||
) | [inline] |
Definition at line 77 of file MarkovLogicNetwork.java.
void edu::tum::cs::srl::mln::MarkovLogicNetwork::addFunctionalDependency | ( | String | predicateName, | |
Integer | index | |||
) | [inline] |
Definition at line 85 of file MarkovLogicNetwork.java.
void edu::tum::cs::srl::mln::MarkovLogicNetwork::addGuaranteedDomainElements | ( | String | domain, | |
String[] | elements | |||
) | [inline] |
Definition at line 89 of file MarkovLogicNetwork.java.
void edu::tum::cs::srl::mln::MarkovLogicNetwork::addHardFormula | ( | Formula | f | ) | [inline] |
Definition at line 81 of file MarkovLogicNetwork.java.
void edu::tum::cs::srl::mln::MarkovLogicNetwork::addSignature | ( | Signature | sig | ) | [inline] |
adds a predicate signature to this model
sig | signature of this predicate |
Definition at line 73 of file MarkovLogicNetwork.java.
double edu::tum::cs::srl::mln::MarkovLogicNetwork::getdeltaMin | ( | ) | [inline] |
Method calculates the minimum difference among all weights
Definition at line 265 of file MarkovLogicNetwork.java.
Set<Formula> edu::tum::cs::srl::mln::MarkovLogicNetwork::getFormulas | ( | ) | [inline] |
Definition at line 93 of file MarkovLogicNetwork.java.
Integer edu::tum::cs::srl::mln::MarkovLogicNetwork::getFunctionallyDeterminedArgument | ( | String | predicateName | ) | [inline] |
gets the functionally determined argument of a functional predicate
Definition at line 110 of file MarkovLogicNetwork.java.
Set<String> edu::tum::cs::srl::mln::MarkovLogicNetwork::getFunctionalPreds | ( | ) | [inline] |
Definition at line 316 of file MarkovLogicNetwork.java.
HashMap<String, String[]> edu::tum::cs::srl::mln::MarkovLogicNetwork::getGuaranteedDomainElements | ( | ) | [inline] |
Implements edu::tum::cs::srl::RelationalModel.
Definition at line 299 of file MarkovLogicNetwork.java.
double edu::tum::cs::srl::mln::MarkovLogicNetwork::getHardWeight | ( | ) | [inline] |
Definition at line 257 of file MarkovLogicNetwork.java.
Collection<String> edu::tum::cs::srl::mln::MarkovLogicNetwork::getPrologRules | ( | ) | [inline] |
Implements edu::tum::cs::srl::RelationalModel.
Definition at line 362 of file MarkovLogicNetwork.java.
Collection<RelationKey> edu::tum::cs::srl::mln::MarkovLogicNetwork::getRelationKeys | ( | String | relation | ) | [inline] |
relation |
Implements edu::tum::cs::srl::RelationalModel.
Definition at line 308 of file MarkovLogicNetwork.java.
Signature edu::tum::cs::srl::mln::MarkovLogicNetwork::getSignature | ( | String | predName | ) | [inline] |
returns the signature for the given predicate
predName | name of predicate (signature for this predicate will be returned) |
Implements edu::tum::cs::srl::RelationalModel.
Definition at line 102 of file MarkovLogicNetwork.java.
Collection<Signature> edu::tum::cs::srl::mln::MarkovLogicNetwork::getSignatures | ( | ) | [inline] |
Implements edu::tum::cs::srl::RelationalModel.
Definition at line 320 of file MarkovLogicNetwork.java.
Taxonomy edu::tum::cs::srl::mln::MarkovLogicNetwork::getTaxonomy | ( | ) | [inline] |
Implements edu::tum::cs::srl::RelationalModel.
Definition at line 327 of file MarkovLogicNetwork.java.
MarkovRandomField edu::tum::cs::srl::mln::MarkovLogicNetwork::ground | ( | Database | db, | |
boolean | storeFormulasInMRF, | |||
GroundingCallback | gc | |||
) | throws Exception [inline] |
Definition at line 124 of file MarkovLogicNetwork.java.
MarkovRandomField edu::tum::cs::srl::mln::MarkovLogicNetwork::ground | ( | Database | db | ) | throws Exception [inline] |
Method that grounds MLN to a MarkovRandomField
dbFileLoc | file location of evidence for this scenario |
Exception |
Definition at line 120 of file MarkovLogicNetwork.java.
void edu::tum::cs::srl::mln::MarkovLogicNetwork::read | ( | File | mlnFile | ) | throws Exception [inline] |
reads the contents of an MLN file
Exception |
Definition at line 132 of file MarkovLogicNetwork.java.
void edu::tum::cs::srl::mln::MarkovLogicNetwork::replaceType | ( | String | oldType, | |
String | newType | |||
) | [inline] |
replace a type by a new type in all function signatures
oldType | ||
newType |
Implements edu::tum::cs::srl::RelationalModel.
Definition at line 290 of file MarkovLogicNetwork.java.
void edu::tum::cs::srl::mln::MarkovLogicNetwork::write | ( | File | f | ) | throws FileNotFoundException [inline] |
Definition at line 357 of file MarkovLogicNetwork.java.
void edu::tum::cs::srl::mln::MarkovLogicNetwork::write | ( | PrintStream | out | ) | [inline] |
Definition at line 331 of file MarkovLogicNetwork.java.
HashMap<Formula, Double> edu::tum::cs::srl::mln::MarkovLogicNetwork::formula2weight [protected] |
Definition at line 33 of file MarkovLogicNetwork.java.
HashMap<String, Integer> edu::tum::cs::srl::mln::MarkovLogicNetwork::functionalPreds [protected] |
mapping from predicate name to index of argument that is functionally determined
Definition at line 45 of file MarkovLogicNetwork.java.
HashMap<String, String[]> edu::tum::cs::srl::mln::MarkovLogicNetwork::guaranteedDomainElements [protected] |
maps domain/type names to a list of guaranteed domain elements
Definition at line 41 of file MarkovLogicNetwork.java.
File edu::tum::cs::srl::mln::MarkovLogicNetwork::mlnFile [protected] |
Definition at line 32 of file MarkovLogicNetwork.java.
HashMap<String, Signature> edu::tum::cs::srl::mln::MarkovLogicNetwork::signatures [protected] |
maps a predicate name to its signature
Definition at line 37 of file MarkovLogicNetwork.java.
double edu::tum::cs::srl::mln::MarkovLogicNetwork::sumAbsWeights = 0 [package] |
Definition at line 46 of file MarkovLogicNetwork.java.