|
||||||||||
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
public abstract class StatOperator
Abstract class of a statistical operator (e.g., Tuffy, Coref, CRF etc. ). A valid Felix operator should extend this class and implement methods like run(), prepare(), etc.
Nested Class Summary | |
---|---|
static class |
StatOperator.OPType
Type of StatOperator. |
Nested classes/interfaces inherited from class java.lang.Thread |
---|
java.lang.Thread.State, java.lang.Thread.UncaughtExceptionHandler |
Field Summary | |
---|---|
java.util.HashSet<FelixClause> |
allRelevantFelixClause
Set of clauses assigned to this operator. |
ConcurrentOperatorsBucket |
belongsToBucket
The ConcurrentOperatorsBucket this StatOperator belongs to. |
java.util.HashMap<FelixClause,java.util.HashSet<tuffy.ra.Expression>> |
clauseConstraints
Map from clauses to expressions partitioning the data. |
java.util.HashSet<FelixPredicate> |
commonCandidate
Set of predicates that can potentially be shared with other operators via dual decomposition. |
boolean |
currentState
Deprecated. |
java.lang.String |
dataCrackerSignature
The human-readable representation of data partitions. |
tuffy.db.RDB |
db
Database connection. |
java.util.HashSet<FelixClause> |
dd_PriorClauses
Rules for Lagrangian Multipliers. |
FelixQuery |
fq
Felix query. |
java.util.HashSet<FelixPredicate> |
inputPredicates
Set of predicates whose values are used by this operator as inputs. |
boolean |
isBinaryArbLR
Deprecated. |
boolean |
isMarginal
Whether this operator works in marginal or MAP mode. |
int |
nStartingRules
See ConcurrentOperatorsBucket.nStartingRule . |
java.util.HashSet<FelixPredicate> |
outputPredicates
Set of predicates whose values are output by this operator. |
int |
partitionedInto
Parameter assigning the degree of data partitioning. |
java.util.HashSet<java.lang.String> |
throwAwayPredicatesNames
Deprecated. |
StatOperator.OPType |
type
Type of this operator. |
Fields inherited from class java.lang.Thread |
---|
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY |
Constructor Summary | |
---|---|
StatOperator(FelixQuery _fq,
java.util.HashSet<FelixPredicate> _goalPredicates,
FelixCommandOptions _opt)
the constructor. |
Method Summary | |
---|---|
StatOperator |
clone()
Returns a clone of this statistical operator. |
abstract java.lang.String |
explain()
Human-readable representation of the logic plan. |
java.util.List<DataMovementOperator> |
getAllDMOs()
Get all DMOs used by this operator. |
int |
getPrecedence()
Get the precedence of this operator. |
FelixPredicate |
getTargetPredicateIfHasOnlyOne()
Get the target predicate of this StatOperator if this operator is CRF, LR or COREF. |
abstract void |
learn()
Deprecated. |
abstract void |
prepare()
Generate the operator-specified logic plan, i.e., all data movement operators that will be used for inference. |
void |
pushPredicateScopes(java.util.HashSet<java.lang.String> _predicates)
Deprecated. |
void |
registerRelevantClause(FelixClause fc)
Registers clause to this statistical operator. |
abstract void |
run()
Method that executes this operator. |
void |
sealDefinition()
According to the clauses added via registerRelevantClause(FelixClause) ,
parse outputPredicates , inputPredicates , nStartingRules ,
and commonCandidate . |
void |
setPrecedence(int _value)
Sets precedence of this statistical operator. |
java.lang.String |
toNoParString()
|
java.lang.String |
toString()
|
java.util.HashSet<tuffy.ra.ConjunctiveQuery> |
translateFelixClasesIntoFactorGraphEdgeQueries(FelixPredicate target,
boolean forceRecursive,
java.util.HashSet<java.lang.String> allowedOpenPredicates,
FelixPredicate.FPProperty... props)
Given a first order logic clause and a target predicate, translate it into a conjunctive query with properly assigned weight. |
java.util.HashSet<tuffy.ra.ConjunctiveQuery> |
translateFelixClasesIntoLearningQueriesForVictor(FelixPredicate target,
FelixPredicate.FPProperty... props)
Deprecated. Given a first order logic clause and a target predicate, translate it into a conjunctive query with properly assigned weight. |
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 |
Field Detail |
---|
public int partitionedInto
public boolean currentState
public java.lang.String dataCrackerSignature
public java.util.HashSet<FelixClause> dd_PriorClauses
public java.util.HashMap<FelixClause,java.util.HashSet<tuffy.ra.Expression>> clauseConstraints
public ConcurrentOperatorsBucket belongsToBucket
public boolean isMarginal
public java.util.HashSet<FelixPredicate> commonCandidate
public StatOperator.OPType type
public java.util.HashSet<FelixPredicate> inputPredicates
public java.util.HashSet<FelixPredicate> outputPredicates
public java.util.HashSet<FelixClause> allRelevantFelixClause
public tuffy.db.RDB db
public FelixQuery fq
public boolean isBinaryArbLR
public int nStartingRules
ConcurrentOperatorsBucket.nStartingRule
.
public java.util.HashSet<java.lang.String> throwAwayPredicatesNames
Constructor Detail |
---|
public StatOperator(FelixQuery _fq, java.util.HashSet<FelixPredicate> _goalPredicates, FelixCommandOptions _opt)
_oriMLN
- _opt
- Method Detail |
---|
public void pushPredicateScopes(java.util.HashSet<java.lang.String> _predicates)
_predicates
- public StatOperator clone()
clone
in class java.lang.Thread
public void setPrecedence(int _value)
_value
- public void registerRelevantClause(FelixClause fc)
fc
- public void sealDefinition()
registerRelevantClause(FelixClause)
,
parse outputPredicates
, inputPredicates
, nStartingRules
,
and commonCandidate
.
public abstract void prepare()
public abstract void run()
run
in interface java.lang.Runnable
run
in class java.lang.Thread
public abstract void learn()
public abstract java.lang.String explain()
public FelixPredicate getTargetPredicateIfHasOnlyOne()
public java.util.HashSet<tuffy.ra.ConjunctiveQuery> translateFelixClasesIntoLearningQueriesForVictor(FelixPredicate target, FelixPredicate.FPProperty... props)
target
- forceRecursive
- If there are multiple literals of the given predicate,
this parameter specifies whether the generated conjunctive queries are recursive.
CRF will set this parameter as FALSE, while COREF will set it as TRUE.props
- The property selected for the target predicate.
public java.util.HashSet<tuffy.ra.ConjunctiveQuery> translateFelixClasesIntoFactorGraphEdgeQueries(FelixPredicate target, boolean forceRecursive, java.util.HashSet<java.lang.String> allowedOpenPredicates, FelixPredicate.FPProperty... props)
target
- forceRecursive
- If there are multiple literals of the given predicate,
this parameter specifies whether the generated conjunctive queries are recursive.
CRF will set this parameter as FALSE, while COREF will set it as TRUE.props
- The property selected for the target predicate.
public java.util.List<DataMovementOperator> getAllDMOs()
public int getPrecedence()
public java.lang.String toString()
toString
in class java.lang.Thread
public java.lang.String toNoParString()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |