Package org.nlpub.watset.graph
Class NodeWeighting.LogNodeWeighting<V,E>
- java.lang.Object
-
- org.nlpub.watset.graph.NodeWeighting.LogNodeWeighting<V,E>
-
- Type Parameters:
V- the type of nodes in the graphE- the type of edges in the graph
- All Implemented Interfaces:
NodeWeighting<V,E>
- Enclosing interface:
- NodeWeighting<V,E>
public static class NodeWeighting.LogNodeWeighting<V,E> extends Object implements NodeWeighting<V,E>
The node weighting approach that chooses the label with the highest total edge weight in the neighborhood divided by the logarithm of the neighbor node degree.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.nlpub.watset.graph.NodeWeighting
NodeWeighting.LabelNodeWeighting<V,E>, NodeWeighting.LinearNodeWeighting<V,E>, NodeWeighting.LogNodeWeighting<V,E>, NodeWeighting.TopNodeWeighting<V,E>
-
-
Constructor Summary
Constructors Constructor Description LogNodeWeighting()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description doubleapply(org.jgrapht.Graph<V,E> graph, Map<V,Integer> labels, V node, V neighbor)Compute the weight of the node in the neighborhood graph.
-
-
-
Method Detail
-
apply
public double apply(org.jgrapht.Graph<V,E> graph, Map<V,Integer> labels, V node, V neighbor)
Description copied from interface:NodeWeightingCompute the weight of the node in the neighborhood graph.- Specified by:
applyin interfaceNodeWeighting<V,E>- Parameters:
graph- the neighborhood graphlabels- the map of graph nodes to their labelsnode- the target nodeneighbor- the neighboring node- Returns:
- the weight of the node in the neighborhood
-
-