|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectweka.clusterers.InstancePair
Class for handling a pair of instances, in terms of indices of instances in an Instances set
Field Summary | |
double |
activeScore
----- DEPRECATED: ACTIVE SCORE NO LONGER USED IN PCKMEANS!!!! ----- |
static int |
CANNOT_LINK
cannot-link |
double |
cost
cost of violating constraint |
static int |
DONT_CARE_LINK
don't care |
int |
first
first instance index |
int |
linkType
MUST_LINK, CANNOT_LINK or DONT_CARE_LINK |
static boolean |
m_isClassAttributeString
|
static int |
MUST_LINK
must-link |
int |
second
second instance index, always <= first |
Method Summary | |
int |
compareTo(InstancePair a)
Compare function |
int |
compareTo(java.lang.Object a)
Compare function |
boolean |
equals(java.lang.Object a)
Equals function |
static java.util.ArrayList |
getPairs(Instances instances,
int size)
Returns an arraylist of random (both positive and negative) pair objects created from the input |
static java.util.ArrayList |
getPairs(Instances instances,
int size,
boolean sameClassOnly)
Returns an arraylist of pair objects created from the input set of instances |
int |
hashCode()
hashCode |
static double |
jaccardSimilarityOfClassStrings(Instance a,
Instance b)
|
java.lang.String |
toString()
returns string representation of InstancePair |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
public int first
public int second
public int linkType
public double cost
public double activeScore
public static final int MUST_LINK
public static final int CANNOT_LINK
public static final int DONT_CARE_LINK
public static boolean m_isClassAttributeString
Method Detail |
public int compareTo(java.lang.Object a)
compareTo
in interface java.lang.Comparable
public int compareTo(InstancePair a)
public boolean equals(java.lang.Object a)
public int hashCode()
public static java.util.ArrayList getPairs(Instances instances, int size)
instances
- list of instancessize
- number of pairs to return
public static java.util.ArrayList getPairs(Instances instances, int size, boolean sameClassOnly)
instances
- list of instancessize
- number of pairs to returnsameClassOnly
- if true, only pairs from the same class will be returned
public static double jaccardSimilarityOfClassStrings(Instance a, Instance b)
public java.lang.String toString()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |