netkit.graph.edgecreator
Class BayesCategoricalEdgeCreator

java.lang.Object
  extended by netkit.graph.edgecreator.EdgeCreatorImp
      extended by netkit.graph.edgecreator.BayesCategoricalEdgeCreator
All Implemented Interfaces:
EdgeCreator

public class BayesCategoricalEdgeCreator
extends EdgeCreatorImp


Nested Class Summary
 
Nested classes/interfaces inherited from class netkit.graph.edgecreator.EdgeCreatorImp
EdgeCreatorImp.NbrEntry
 
Field Summary
 
Fields inherited from class netkit.graph.edgecreator.EdgeCreatorImp
attrib, attributeIndex, attributeValue, edges, edgetype, gm, graph, logger, maxEdges, nodeType, split, trainAssortativity, trueAssortativity
 
Constructor Summary
BayesCategoricalEdgeCreator()
           
 
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.
 
Methods inherited from class netkit.graph.edgecreator.EdgeCreatorImp
addCliqueToAssortMatrix, buildEdges, canHandleAttributeValue, createEdges, getAssortativity, getAssortativityMatrix, getAttributeIndex, getAttributeValue, getEdgesToNearestNeighbors, getEdgeType, getLabeledNodes, getMaxEdges, initialize, isByAttribute, isByAttributeValue
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BayesCategoricalEdgeCreator

public BayesCategoricalEdgeCreator()
Method Detail

getName

public java.lang.String getName()
Description copied from interface: EdgeCreator
The name of this edge-creator


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 node
dest - 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