|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.lang.Thread
dstruct.StatOperator
operator.COREFOperator
public class COREFOperator
A COREF 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) FelixPredicate |
corefHead
Target predicate of this Coref operator. |
(package private) DataMovementOperator |
hardNegDMO
The DataMovementOperator which is the union of all hard-neg DataMovementOperators. |
(package private) java.util.ArrayList<DataMovementOperator> |
hardNegDMOs
DMOs for hard negative edges. |
(package private) DataMovementOperator |
hardPosDMO
The DataMovementOperator which is the union of all hard-pos DataMovementOperators. |
(package private) java.util.ArrayList<DataMovementOperator> |
hardPosDMOs
DMOs for hard positive edges. |
(package private) DataMovementOperator |
nodeListDMO
DMO for retrieving the node's domain. |
(package private) java.util.ArrayList<DataMovementOperator> |
softNegDMOs
DMOs for soft negative edges. |
(package private) DataMovementOperator |
softPosDMO
The DataMovementOperator which is the union of all soft-pos DataMovementOperators. |
(package private) java.util.ArrayList<DataMovementOperator> |
softPosDMOs
DMOs for soft positive edges. |
boolean |
usePairwiseRepresentation
Whether represent clusterings results using pairwise representation. |
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 | |
---|---|
COREFOperator(FelixQuery _fq,
java.util.HashSet<FelixPredicate> _goalPredicates,
parser.CommandOptions _opt)
The constructor of COREFOperator. |
Method Summary | |
---|---|
void |
cluster()
Clustering worker. |
void |
dumpAnswerToDBTable(mln.Predicate p,
UnionFind<java.lang.Integer> clusters,
java.util.ArrayList<java.lang.Integer> nodes)
Dump answers to a database table (or create view for it). |
java.lang.String |
explain()
Human-readable representation of the logic plan. |
int |
getDomainSize(mln.Predicate p)
Get the size of domain on which clustering is conducted. |
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> rules)
Generate Data Movement Operator used by this Coref Operator. |
java.util.List<java.lang.Integer> |
retrieveHardNegEdges(java.lang.Integer m1)
Get hard-neg neighbors of a given node. |
java.util.List<java.lang.Integer> |
retrieveNeighbors(java.lang.Integer m1)
Get soft-pos neighbors of a given node. |
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 |
---|
java.util.ArrayList<DataMovementOperator> softPosDMOs
java.util.ArrayList<DataMovementOperator> softNegDMOs
java.util.ArrayList<DataMovementOperator> hardPosDMOs
java.util.ArrayList<DataMovementOperator> hardNegDMOs
DataMovementOperator nodeListDMO
DataMovementOperator hardNegDMO
DataMovementOperator hardPosDMO
DataMovementOperator softPosDMO
public boolean usePairwiseRepresentation
FelixPredicate corefHead
Constructor Detail |
---|
public COREFOperator(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 int getDomainSize(mln.Predicate p)
p
- clustering predicate
public void prepareDMO(java.util.HashSet<mln.ConjunctiveQuery> rules)
rules
- rules defining this operator.public void prepare()
StatOperator
prepare
in class StatOperator
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 cluster() throws java.lang.Exception
java.lang.Exception
public java.util.List<java.lang.Integer> retrieveNeighbors(java.lang.Integer m1) throws java.sql.SQLException
m1
-
java.sql.SQLException
public java.util.List<java.lang.Integer> retrieveHardNegEdges(java.lang.Integer m1) throws java.sql.SQLException
m1
-
java.sql.SQLException
public void dumpAnswerToDBTable(mln.Predicate p, UnionFind<java.lang.Integer> clusters, java.util.ArrayList<java.lang.Integer> nodes)
p
- clustering predicate.clusters
- clustering result.nodes
- domain on which clustering is conducted.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |