|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.lang.Thread
dstruct.StatOperator
operator.LROperator
public class LROperator
A LR operator in Felix.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class dstruct.StatOperator |
---|
StatOperator.OPType |
Nested classes/interfaces inherited from class java.lang.Thread |
---|
java.lang.Thread.State, java.lang.Thread.UncaughtExceptionHandler |
Field Summary | |
---|---|
(package private) DataMovementOperator |
getAllUnigramFeaturesDMO
The DataMovementOperator fetching all unigram features. |
(package private) java.util.HashMap<java.lang.Integer,java.lang.String[]> |
id2Label
The inverse map of label2ID . |
(package private) java.util.HashMap<java.lang.String,java.lang.Integer> |
label2ID
Mapping from label's constant ID to a new label ID. |
(package private) DataMovementOperator |
labelDomainDMO
The DataMovementOperator representing the table/view for all possible labels. |
(package private) DataMovementOperator |
lrDMO
The DataMovementOperator which is the union of all LR rules. |
(package private) java.util.ArrayList<DataMovementOperator> |
lrDMOs
All DataMovementOperators used as LR rules. |
(package private) FelixPredicate |
lrHead
Target predicate of this LR operator. |
(package private) DataMovementOperator |
unigramDMO
The DataMovementOperator representing the table/view for all unigram features. |
Fields inherited from class dstruct.StatOperator |
---|
allDMOs, allRelevantFelixClause, belongsToBucket, clauseConstraints, dataCrackerSignature, db, fq, inputPredicates, isMarginal, options, outputPredicates, partitionedInto, precedence, type |
Fields inherited from class java.lang.Thread |
---|
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY |
Constructor Summary | |
---|---|
LROperator(FelixQuery _fq,
java.util.HashSet<FelixPredicate> _goalPredicates,
parser.CommandOptions _opt)
The constructor of LROperator. |
Method Summary | |
---|---|
(package private) java.lang.String |
array2str(java.lang.String[] _array)
|
java.lang.String |
explain()
Human-readable representation of the logic plan. |
void |
inferAndDumpToTmpFile(java.lang.String signature,
double[] weights,
java.io.BufferedWriter bw)
Infer and dump answers to the given buffered writer (with a format that can be COPY into postgres table directly). |
static double |
logAdd(double logX,
double logY)
|
void |
prepare()
Generate the operator-specified logic plan, i.e., all data movement operators that will be used for inference. |
void |
prepareDMO(java.util.HashSet<mln.ConjunctiveQuery> lrQueries)
Generate Data Movement Operator used by this LR Operator. |
void |
run()
Method that executes this operator. |
Methods inherited from class dstruct.StatOperator |
---|
clone, getAllDMOs, getPrecedence, getTargetPredicateIfHasOnlyOne, toString, translateFelixClasesIntoFactorGraphEdgeQueries |
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, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
FelixPredicate lrHead
java.util.HashMap<java.lang.String,java.lang.Integer> label2ID
java.util.HashMap<java.lang.Integer,java.lang.String[]> id2Label
label2ID
.
java.util.ArrayList<DataMovementOperator> lrDMOs
DataMovementOperator lrDMO
DataMovementOperator unigramDMO
DataMovementOperator labelDomainDMO
DataMovementOperator getAllUnigramFeaturesDMO
Constructor Detail |
---|
public LROperator(FelixQuery _fq, java.util.HashSet<FelixPredicate> _goalPredicates, parser.CommandOptions _opt)
_fq
- Felix query._goalPredicates
- target predicates of this coref operator._opt
- Command line options of this Felix run.Method Detail |
---|
public void prepare()
StatOperator
prepare
in class StatOperator
java.lang.String array2str(java.lang.String[] _array)
public void run()
StatOperator
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<mln.ConjunctiveQuery> lrQueries)
rules
- rules defining this operator.public static double logAdd(double logX, double logY)
public void inferAndDumpToTmpFile(java.lang.String signature, double[] weights, 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 |