relational.classifier
Class ProbRNMultiHop
java.lang.Object
weka.classifiers.Classifier
relational.classifier.ProbRNClassifier
relational.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
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 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 |
ProbRNMultiHop
public ProbRNMultiHop(java.util.HashMap labels,
double minWeight,
int neighb)
- Parameters:
labels
-
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 classifiedid2ClassProb
- - initialization of test instancesweights
- - the weights of the edges in the graphnormWeights
- - normalized weightsminWeight
- - the minimal weight which an edge has to have in order to be considered in PRNMultiHoptype
- - 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)