public class SuperNodeFilter
extends weka.filters.SimpleBatchFilter
Modifier and Type | Field and Description |
---|---|
protected int[][] |
indices |
protected int |
m_N |
protected int |
m_P |
protected int |
m_Seed |
protected weka.core.Instance |
x_template |
Constructor and Description |
---|
SuperNodeFilter() |
Modifier and Type | Method and Description |
---|---|
static int |
decodeClass(String a)
("c_3",'_') -> 3
|
static int[] |
decodeClasses(String a)
("c_3+1") -> [3,1]
|
static String[] |
decodeValue(String a)
"C+A+B" -> ["C","A","B"]
|
weka.core.Instances |
determineOutputFormat(weka.core.Instances D) |
static String |
encodeClass(int j)
(3,'_') -> "c_3"
|
static String |
encodeClass(int[] c_)
([3,1]) -> "c_3+1"
|
static String |
encodeClass(String c_j,
String c_k)
(["c_3","c_1"]) -> "c_3+1"
|
static String |
encodeValue(weka.core.Instance x,
int[] indices)
(3,1,2) -> "3+1+2"
|
static String |
encodeValue(String v_j,
String v_k)
(3,1) -> "3+1"
|
static HashMap<String,Integer> |
getCounts(weka.core.Instances D,
int[] indices,
int p)
Return a set of all the combinations of attributes at 'indices' in 'D', pruned by 'p'; AND THEIR COUNTS, e.g., {(00:3),(01:8),(11:3))}.
|
static String[] |
getNeighbours(String y,
ArrayList<String> S,
int n)
GetNeighbours - return from set S, label-vectors closest to y, having no more different than 'n' bits different.
|
static String[] |
getNeighbours(String y,
HashMap<String,Integer> C,
int n)
GetNeighbours - return from set S (the keySet of HashMap C), label-vectors closest to y, having no more different than 'n' bits different.
|
int |
getP() |
weka.core.Instance |
getTemplate() |
static Set<String> |
getValues(weka.core.Instances D,
int[] indices,
int p)
Return a set of all the combinations of attributes at 'indices' in 'D', pruned by 'p'; e.g., {00,01,11}.
|
String |
globalInfo() |
static void |
main(String[] argv) |
static weka.core.Instances |
mergeLabels(weka.core.Instances D,
int[][] indices,
int p,
int n)
Merge Labels - Make a new 'D', with labels made into superlabels, according to partition 'indices', and pruning values 'p' and 'n'.
|
static weka.core.Instances |
mergeLabels(weka.core.Instances D,
int j,
int k,
int p)
Merge Labels.
|
weka.core.Instances |
process(weka.core.Instances D) |
void |
setIndices(int[][] n) |
void |
setN(int n) |
void |
setP(int p) |
allowAccessToFullInputFormat, batchFinished, hasImmediateOutputFormat, input
batchFilterFile, bufferInput, copyValues, copyValues, debugTipText, doNotCheckCapabilitiesTipText, filterFile, flushInput, getCapabilities, getCapabilities, getDebug, getDoNotCheckCapabilities, getInputFormat, getOptions, getOutputFormat, getRevision, initInputLocators, initOutputLocators, inputFormatPeek, isFirstBatchDone, isNewBatch, isOutputFormatDefined, listOptions, makeCopies, makeCopy, mayRemoveInstanceAfterFirstBatchDone, numPendingOutput, output, outputFormatPeek, outputPeek, postExecution, preExecution, push, push, resetQueue, run, runFilter, setDebug, setDoNotCheckCapabilities, setOptions, setOutputFormat, testInputFormat, toString, useFilter, wekaStaticWrapper
protected weka.core.Instance x_template
protected int m_P
protected int m_N
protected int[][] indices
protected int m_Seed
public void setIndices(int[][] n)
public void setP(int p)
public int getP()
public void setN(int n)
public weka.core.Instances determineOutputFormat(weka.core.Instances D) throws Exception
determineOutputFormat
in class weka.filters.SimpleFilter
Exception
public weka.core.Instance getTemplate()
public weka.core.Instances process(weka.core.Instances D) throws Exception
process
in class weka.filters.SimpleFilter
Exception
public static String encodeClass(int j)
public static int decodeClass(String a)
public static String encodeClass(int[] c_)
public static int[] decodeClasses(String a)
public static String encodeValue(weka.core.Instance x, int[] indices)
public static Set<String> getValues(weka.core.Instances D, int[] indices, int p)
public static HashMap<String,Integer> getCounts(weka.core.Instances D, int[] indices, int p)
public static weka.core.Instances mergeLabels(weka.core.Instances D, int[][] indices, int p, int n)
D
- assume attributes in D labeled by original indexpublic static weka.core.Instances mergeLabels(weka.core.Instances D, int j, int k, int p)
j
- index 1 (assume that j < k
)k
- index 2 (assume that j < k
)D
- iInstances, with attributes in labeled by original indexpublic static String[] getNeighbours(String y, ArrayList<String> S, int n)
public static String[] getNeighbours(String y, HashMap<String,Integer> C, int n)
public String globalInfo()
globalInfo
in class weka.filters.SimpleFilter
public static void main(String[] argv)
Copyright © 2017. All Rights Reserved.