|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object java.lang.Thread felix.dstruct.StatOperator felix.operator.LROperator
public class LROperator
A LR operator in Felix.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class felix.dstruct.StatOperator |
---|
StatOperator.OPType |
Nested classes/interfaces inherited from class java.lang.Thread |
---|
java.lang.Thread.State, java.lang.Thread.UncaughtExceptionHandler |
Field Summary |
---|
Fields inherited from class felix.dstruct.StatOperator |
---|
allRelevantFelixClause, belongsToBucket, clauseConstraints, commonCandidate, currentState, dataCrackerSignature, db, dd_PriorClauses, fq, inputPredicates, isBinaryArbLR, isMarginal, nStartingRules, outputPredicates, partitionedInto, throwAwayPredicatesNames, type |
Fields inherited from class java.lang.Thread |
---|
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY |
Constructor Summary | |
---|---|
LROperator(FelixQuery _fq,
java.util.HashSet<FelixPredicate> _goalPredicates,
FelixCommandOptions _opt)
The constructor of LROperator. |
Method Summary | ||
---|---|---|
java.lang.String |
explain()
Human-readable representation of the logic plan. |
|
|
getAndAddToDomain(E obj,
java.util.HashMap<java.lang.String,java.lang.Integer> map)
Adds object to domain if necessary. |
|
void |
inferAndDumpToTmpFile(java.lang.String signature,
double[] weights,
java.util.ArrayList<java.lang.Integer> noneZeroWeights,
java.io.BufferedWriter bw)
Infer and dump answers to the given buffered writer (with a format that can be COPY into postgres table directly). |
|
void |
learn()
Deprecated. |
|
static double |
logAdd(double logX,
double logY)
Returns sum of given log numbers. |
|
void |
prepare()
Prepares operator for execution. |
|
void |
prepareDMO(java.util.HashSet<tuffy.ra.ConjunctiveQuery> lrQueries)
Generate Data Movement Operator used by this LR Operator. |
|
void |
prepareDMO4ForLearning(java.util.HashSet<tuffy.ra.ConjunctiveQuery> lrQueries)
Deprecated. Prepares DMOs for learning. |
|
void |
run()
Executes operator. |
Methods inherited from class felix.dstruct.StatOperator |
---|
clone, getAllDMOs, getPrecedence, getTargetPredicateIfHasOnlyOne, pushPredicateScopes, registerRelevantClause, sealDefinition, setPrecedence, toNoParString, toString, translateFelixClasesIntoFactorGraphEdgeQueries, translateFelixClasesIntoLearningQueriesForVictor |
Methods inherited from class java.lang.Thread |
---|
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, yield |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public LROperator(FelixQuery _fq, java.util.HashSet<FelixPredicate> _goalPredicates, FelixCommandOptions _opt)
_fq
- Felix query._goalPredicates
- target predicates of this coref operator._opt
- Command line options of this Felix run.Method Detail |
---|
public <E> java.lang.Integer getAndAddToDomain(E obj, java.util.HashMap<java.lang.String,java.lang.Integer> map)
obj
- map
-
public void learn()
learn
in class StatOperator
public void prepare()
prepare
in class StatOperator
public void prepareDMO4ForLearning(java.util.HashSet<tuffy.ra.ConjunctiveQuery> lrQueries)
lrQueries
- public void run()
run
in interface java.lang.Runnable
run
in class StatOperator
public java.lang.String explain()
StatOperator
explain
in class StatOperator
public void prepareDMO(java.util.HashSet<tuffy.ra.ConjunctiveQuery> lrQueries)
rules
- rules defining this operator.public static double logAdd(double logX, double logY)
logX
- logY
-
public void inferAndDumpToTmpFile(java.lang.String signature, double[] weights, java.util.ArrayList<java.lang.Integer> noneZeroWeights, java.io.BufferedWriter bw)
signature
- signature of current predicate instance.weights
- array of weights. Each entry corresponding to the weight of a label.bw
-
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |