relational.classifier
Class ProbRNMultiHop

java.lang.Object
  extended byweka.classifiers.Classifier
      extended byrelational.classifier.ProbRNClassifier
          extended byrelational.classifier.ProbRNMultiHop
All Implemented Interfaces:
java.lang.Cloneable, weka.core.OptionHandler, java.io.Serializable

public class ProbRNMultiHop
extends ProbRNClassifier

Author:
preisach
See Also:
Serialized Form

Field Summary
 
Fields inherited from class relational.classifier.ProbRNClassifier
labels, maxProb, numClasses, priors
 
Constructor Summary
ProbRNMultiHop(java.util.HashMap labels, double minWeight, int neighb)
           
 
Method Summary
 double[] distributionForInstance(edu.uci.ics.jung.graph.impl.SparseGraph graph, weka.core.Instance inst, java.util.HashMap id2ClassProb, java.util.HashMap weights, java.util.HashMap normWeights, double minWeight, java.lang.String type, int numNeighbors, int numMax)
          Calculates the class probability distribution for an instance using PRNMultiHop
static java.util.HashMap getNeighbors2Hop(java.util.Set neighbors, edu.uci.ics.jung.graph.impl.SparseGraph graph, java.util.HashMap id2ClassProb, int nid, java.lang.String type)
           
 
Methods inherited from class relational.classifier.ProbRNClassifier
buildClassifier, classifyInstance, distributionForInstance, distributionForInstanceGeometricMean
 
Methods inherited from class weka.classifiers.Classifier
classifyInstance, debugTipText, distributionForInstance, forName, getDebug, getOptions, listOptions, makeCopies, makeCopy, setDebug, setOptions
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ProbRNMultiHop

public ProbRNMultiHop(java.util.HashMap labels,
                      double minWeight,
                      int neighb)
Parameters:
labels -
Method Detail

distributionForInstance

public double[] distributionForInstance(edu.uci.ics.jung.graph.impl.SparseGraph graph,
                                        weka.core.Instance inst,
                                        java.util.HashMap id2ClassProb,
                                        java.util.HashMap weights,
                                        java.util.HashMap normWeights,
                                        double minWeight,
                                        java.lang.String type,
                                        int numNeighbors,
                                        int numMax)
                                 throws java.lang.Exception
Calculates the class probability distribution for an instance using PRNMultiHop

Parameters:
graph - - graph (jung)
inst - - instance to be classified
id2ClassProb - - initialization of test instances
weights - - the weights of the edges in the graph
normWeights - - normalized weights
minWeight - - the minimal weight which an edge has to have in order to be considered in PRNMultiHop
type - - indicates the type of problem (heterogenous or homogenous)
numNeighbors - - determines the number of neighbors for which additional indirect neighbors will be considered using PRNMultiHop
Returns:
class probability distribution
Throws:
java.lang.Exception

getNeighbors2Hop

public static java.util.HashMap getNeighbors2Hop(java.util.Set neighbors,
                                                 edu.uci.ics.jung.graph.impl.SparseGraph graph,
                                                 java.util.HashMap id2ClassProb,
                                                 int nid,
                                                 java.lang.String type)