netkit.graph.edgecreator
Class MahalanobisDistanceEdgeCreator
java.lang.Object
netkit.graph.edgecreator.EdgeCreatorImp
netkit.graph.edgecreator.MahalanobisDistanceEdgeCreator
- All Implemented Interfaces:
- EdgeCreator
public class MahalanobisDistanceEdgeCreator
- extends EdgeCreatorImp
Fields inherited from class netkit.graph.edgecreator.EdgeCreatorImp |
attrib, attributeIndex, attributeValue, edges, edgetype, gm, graph, logger, maxEdges, nodeType, split, trainAssortativity, trueAssortativity |
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. |
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. |
boolean |
isByAttribute()
Is this edge creator by attribute or by instance as a whole |
Methods inherited from class netkit.graph.edgecreator.EdgeCreatorImp |
addCliqueToAssortMatrix, buildEdges, canHandleAttributeValue, createEdges, getAssortativity, getAssortativityMatrix, getAttributeIndex, getAttributeValue, getEdgesToNearestNeighbors, getEdgeType, getLabeledNodes, getMaxEdges, initialize, isByAttributeValue |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
MahalanobisDistanceEdgeCreator
public MahalanobisDistanceEdgeCreator()
getName
public java.lang.String getName()
- Description copied from interface:
EdgeCreator
- The name of this edge-creator
isByAttribute
public boolean isByAttribute()
- Description copied from interface:
EdgeCreator
- Is this edge creator by attribute or by instance as a whole
- Specified by:
isByAttribute
in interface EdgeCreator
- Overrides:
isByAttribute
in class EdgeCreatorImp
canHandle
public boolean canHandle(Attribute attribute)
- Description copied from interface:
EdgeCreator
- Queries the edge creator if it can handle (i.e., create edges for) the
given attribute.
- Returns:
- true if this edge creator can create edges based on the given Attribute
getWeight
public double getWeight(Node src,
Node dest)
- Description copied from interface:
EdgeCreator
- Calculate the edgeweight from node src to node dest. Assumes that
initialize
has already been called, so that the creator
knows the graph, the class attribute index and the attribute index
- Parameters:
src
- The source nodedest
- The destination node
- Returns:
- the weight of the edge, Double.NaN if no edge should be created.
buildModel
public void buildModel(DataSplit split)
- Description copied from interface:
EdgeCreator
- Build a model of edge creation based on the data split. Must be called before calling
any analytic methods.
- Specified by:
buildModel
in interface EdgeCreator
- Overrides:
buildModel
in class EdgeCreatorImp