|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface EdgeCreator
Method Summary | |
---|---|
void |
buildModel(DataSplit split)
Build a model of edge creation based on the data split. |
boolean |
canHandle(Attribute attribute)
Queries the edge creator if it can handle (i.e., create edges for) the given attribute. |
boolean |
canHandleAttributeValue(Attribute attribute)
Queries the edge creator if it can handle (i.e., create edges for) the given attribute using a specific attribute value. |
Edge[] |
createEdges()
Create all the edges on the graph provided in the initialize method (indirectly through the DataSplit object). |
double |
getAssortativity(boolean useTruth)
Compute the node-based assortativity of this edge creator. |
int |
getAttributeIndex()
Which attribute is this based on. |
double |
getAttributeValue()
Which attribute value is this based on. |
EdgeType |
getEdgeType()
|
int |
getMaxEdges()
How many edges should there be at maximum per node? |
java.lang.String |
getName()
The name of this edge-creator |
double |
getWeight(Node src,
Node dest)
Calculate the edgeweight from node src to node dest. |
void |
initialize(Graph graph,
java.lang.String nodeType,
int attributeIndex,
double attributeValue,
int maxEdges)
Initialize this creator. |
boolean |
isByAttribute()
Is this edge creator by attribute or by instance as a whole |
boolean |
isByAttributeValue()
Is this edge creator by attribute value or by attribute as a whole |
Method Detail |
---|
double getWeight(Node src, Node dest)
initialize
has already been called, so that the creator
knows the graph, the class attribute index and the attribute index
src
- The source nodedest
- The destination node
java.lang.String getName()
EdgeType getEdgeType()
int getAttributeIndex()
int getMaxEdges()
double getAttributeValue()
boolean isByAttribute()
boolean isByAttributeValue()
void initialize(Graph graph, java.lang.String nodeType, int attributeIndex, double attributeValue, int maxEdges) throws java.lang.IllegalStateException
graph
- The graph over which to create edgesnodeType
- Which nodetype is the node to create edges overattributeIndex
- The attribute index over which to generate edges (ignored for creators that cannot handle attributes)attributeValue
- The attribute value over which to generate edges (ignored for creators that cannot handle values; otherwise ignored if value is Double.NaN)maxEdges
- The maximum number of outgoing edges to create from any given node
java.lang.IllegalStateException
- if this creator has already been initializedboolean canHandle(Attribute attribute)
attribute
-
boolean canHandleAttributeValue(Attribute attribute)
attribute
-
void buildModel(DataSplit split)
split
- double getAssortativity(boolean useTruth) throws java.lang.IllegalStateException
useTruth
- Should we compute assortativity based on the whole truth or just the training set
java.lang.IllegalStateException
- if the creator has not yet been builtEdge[] createEdges() throws java.lang.IllegalStateException
java.lang.IllegalStateException
- if the creator has not yet been built
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |