relational.classifier
Class ProbRNMultiLabel
java.lang.Object
weka.classifiers.Classifier
relational.classifier.RNCMultiLabel
relational.classifier.ProbRNMultiLabel
- All Implemented Interfaces:
- java.lang.Cloneable, weka.core.OptionHandler, java.io.Serializable
- Direct Known Subclasses:
- ProbRNMultiHopMultiLabel
- public class ProbRNMultiLabel
- extends RNCMultiLabel
- Author:
- cp
Class contains the classifier PRN* and PRN* Geometric Mean (binary calssification), here we have to cope with the multilabel problem
all the classes of an instance are considered
- See Also:
- Serialized Form
Field Summary |
double[] |
priors
|
weka.core.Instances |
train
|
Method Summary |
void |
buildClassifier(weka.core.Instances train)
|
int |
classifyInstance(weka.core.Instance inst,
double[] probs,
int label,
double th,
java.util.HashMap probabilities)
Classifies an instance according to the class probability distribution |
double[] |
distributionForInstance(edu.uci.ics.jung.graph.impl.SparseGraph graph,
weka.core.Instance inst,
java.util.HashMap id2ClassProb,
int label,
java.util.HashMap weights,
java.lang.String type)
computes class membership probability using Probabilistic Relational Classifier (binary classification) |
double[] |
distributionForInstanceGeometricMean(edu.uci.ics.jung.graph.impl.SparseGraph graph,
weka.core.Instance inst,
java.util.HashMap id2ClassProb,
int label,
java.util.HashMap weights,
java.lang.String type)
computes class membership probability using PRNGeometricMean (binary classification) |
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 |
train
public weka.core.Instances train
priors
public double[] priors
ProbRNMultiLabel
public ProbRNMultiLabel()
buildClassifier
public void buildClassifier(weka.core.Instances train)
throws java.lang.Exception
- Overrides:
buildClassifier
in class RNCMultiLabel
- Throws:
java.lang.Exception
distributionForInstance
public double[] distributionForInstance(edu.uci.ics.jung.graph.impl.SparseGraph graph,
weka.core.Instance inst,
java.util.HashMap id2ClassProb,
int label,
java.util.HashMap weights,
java.lang.String type)
throws java.lang.Exception
- computes class membership probability using Probabilistic Relational Classifier (binary classification)
- Parameters:
graph
- - graph (jung)inst
- - instance to be classifiedid2ClassProb
- - initialization of test instanceslabel
- - the category to be consideredweights
- - the weights of the edges
- Returns:
- class probability distribution
- Throws:
java.lang.Exception
distributionForInstanceGeometricMean
public double[] distributionForInstanceGeometricMean(edu.uci.ics.jung.graph.impl.SparseGraph graph,
weka.core.Instance inst,
java.util.HashMap id2ClassProb,
int label,
java.util.HashMap weights,
java.lang.String type)
throws java.lang.Exception
- computes class membership probability using PRNGeometricMean (binary classification)
- Parameters:
graph
- - graph (jung)inst
- - instance to be classifiedid2ClassProb
- - initialization of test instanceslabel
- - the category to be consideredweights
- - the weights of the edges
- Returns:
- class probability distribution
- Throws:
java.lang.Exception
classifyInstance
public int classifyInstance(weka.core.Instance inst,
double[] probs,
int label,
double th,
java.util.HashMap probabilities)
throws java.lang.Exception
- Classifies an instance according to the class probability distribution
- Parameters:
inst
- - instance to be classifiedprobs
- - class probability distributionlabel
- - the category to be consideredth
- - threshold
- Returns:
- the estimated category
- Throws:
java.lang.Exception