|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objecthex.rf.MinorityClasses
public class MinorityClasses
Contains methods for extracting minority classes out of value array and redistributing them to all nodes. Class is considered to be minor if it's frequency relative to the majority class is below given threshold. Setting the threshold to 1.0 will cause all classes with fewer occurences than the majority class to be redistributed everywhere. Setting it to 0 will cause none of the classes to be redistributed. Major class(es) is(are) always left untouched. Classes are extracted into new Values and their keys are accumulated. Redistribution step takes those keys as the input and redistributes them across all nodes.
| Nested Class Summary | |
|---|---|
static class |
MinorityClasses.ClassExtractTask
|
static class |
MinorityClasses.CountMClassRowsTask
|
static class |
MinorityClasses.HistogramTask
|
static class |
MinorityClasses.ReplicationTask
|
static class |
MinorityClasses.UnbalancedClass
|
| Constructor Summary | |
|---|---|
MinorityClasses()
|
|
| Method Summary | |
|---|---|
static long |
countMajorityClassRows(Key aryKey,
Key[] keys,
int[] minorities,
int classIdx)
|
static MinorityClasses.UnbalancedClass[] |
extractUnbalancedClasses(ValueArray data,
int classIdx,
int[] classIds)
|
static int[] |
globalHistogram(int[][] histogram)
|
static int[][] |
histogram(ValueArray data,
int classIdx)
|
static int[][] |
histogram(ValueArray data,
Key[] keys,
int classIdx)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public MinorityClasses()
| Method Detail |
|---|
public static int[][] histogram(ValueArray data,
int classIdx)
public static int[][] histogram(ValueArray data,
Key[] keys,
int classIdx)
public static long countMajorityClassRows(Key aryKey,
Key[] keys,
int[] minorities,
int classIdx)
public static MinorityClasses.UnbalancedClass[] extractUnbalancedClasses(ValueArray data,
int classIdx,
int[] classIds)
public static int[] globalHistogram(int[][] histogram)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||