public class OVO
extends java.lang.Object
Title: OVO
Description: This class implements the Binarization methodology (OVO and OVO )
Company: KEEL
Constructor and Description |
---|
OVO(Multiclassifier classifier,
java.lang.String sOvo,
boolean dynOVO)
It constructs the new OVO instance depending on the aggregation that is
going to be used
|
Modifier and Type | Method and Description |
---|---|
void |
classifierTrainFinished()
It finishes the operations needed before classifying but after
constructing the classifiers (for BTS!).
|
void |
clearTables(boolean test)
Clear the existing tables and identifies if is test or not.
|
protected java.lang.String |
computeClassDDAG(double[] example)
It computes the confidence vector for the classes using the DDAG approach
|
protected java.lang.String |
computeClassScores(double[] example)
It computes the confidence vector for the classes using the method
indicated in the config file
|
protected java.lang.String |
computeClassScoresDynamic(int i)
It computes the confidence vector for the classes using Dynamic method and returns class as String with the maximum confidence.
|
protected double[] |
computeClassScoresLVPC(double[][] tabla)
It computes the confidence vector for the classes using LVPC (Learning
valued preference for Classification) method
|
protected double[] |
computeClassScoresND(double[][] tabla)
It computes the confidence vector for the classes using the non-dominance criterion
|
protected java.lang.String |
computeClassScoresOVA(double[] example)
It obtains the class scores for the OVA scheme
|
protected double[] |
computeClassScoresPC(double[][] r)
It computes the confidence vector for the classes using Pairwise Coupling method
|
protected double[] |
computeClassScoresVote(double[][] tabla)
It computes the confidence vector for the classes using the (classic) voting method
|
protected double[] |
computeClassScoresWeighted(double[] tabla)
It computes the confidence vector for the classes using weighted method.
|
protected double[] |
computeClassScoresWeighted(double[][] tabla)
It computes the confidence vector for the classes using the Weighted voting method
|
static void |
normalize(double[] doubles)
Normalizes the doubles in the array by their sum.
|
static void |
normalize(double[] doubles,
double sum)
Normalizes the doubles in the array using the given value.
|
double[][][] |
relationsForInstance(double[][] tabla)
Retrieves the preference, conflict and ignorance matrices for a single instance
|
public OVO(Multiclassifier classifier, java.lang.String sOvo, boolean dynOVO)
classifier
- the multi-classifier containing the base classifierssOvo
- the aggregation to be useddynOVO
- whether the final aggregation is the dynamic OVOpublic void clearTables(boolean test)
test
- boolean to identifies if is test or not.public void classifierTrainFinished()
protected java.lang.String computeClassScores(double[] example)
example
- the example to be classifiedprotected java.lang.String computeClassDDAG(double[] example)
example
- the example to be classifiedprotected double[] computeClassScoresVote(double[][] tabla)
tabla
- array containing the outputs of the classifiers for the instanceprotected double[] computeClassScoresWeighted(double[][] tabla)
tabla
- array containing the outputs of the classifiers for the instanceprotected double[] computeClassScoresPC(double[][] r)
r
- array containing the outputs of the classifiers for the instanceprotected double[] computeClassScoresND(double[][] tabla)
tabla
- array containing the outputs of the classifiers for the instanceprotected double[] computeClassScoresLVPC(double[][] tabla)
tabla
- array containing the outputs of the classifiers for the instanceprotected double[] computeClassScoresWeighted(double[] tabla)
tabla
- array containing the outputs of the classifiers for the instanceprotected java.lang.String computeClassScoresDynamic(int i)
i
- index of the instance in the dataset.protected java.lang.String computeClassScoresOVA(double[] example)
example
- given example.public double[][][] relationsForInstance(double[][] tabla)
tabla
- The instance for which the PCI-matrices shall be createdpublic static void normalize(double[] doubles)
doubles
- the array of doublejava.lang.IllegalArgumentException
- if sum is Zero or NaNpublic static void normalize(double[] doubles, double sum)
doubles
- the array of doublesum
- the value by which the doubles are to be normalizedjava.lang.IllegalArgumentException
- if sum is zero or NaN