public class Clera
extends java.lang.Object
Constructor and Description |
---|
Clera() |
Modifier and Type | Method and Description |
---|---|
static double |
cIndex(weka.core.Instances data)
Computes the C-Index for the given, ranked data-set (no abstention/ties -> assumption total ranking/completeness 1)
|
static double |
cIndexCl(weka.core.Instances data)
Computes the C-Index for the given, ranked data-set given Scores (by a classifier)
|
static double |
cIndexClBak(weka.core.Instances data)
Computes the C-Index for the given, ranked data-set given Scores (by a classifier)
|
static double |
cIndexWithAbstention(weka.core.Instances data)
Computes the C-Index for the given, ranked data-set (considering abstention/ties)
|
static double |
cIndexWithAbstentionBak(weka.core.Instances data)
Computes the C-Index for the given, ranked data-set (considering abstention/ties)
|
static int[][] |
classValsDist(weka.core.Instances data)
Returns the distinct values for the class attribute in the set and the respective occurence
|
static weka.core.Instance |
copyInst(weka.core.Instance inst)
Returns a copy of the given instance
|
static weka.core.Instance |
copyInstBak(weka.core.Instance inst)
Returns a copy of the given instance cutting the class value away
|
static weka.core.Instances |
deleteMissing(weka.core.Instances input)
Delete missing values within the data set
|
static int[][] |
distAttrVals(weka.core.Instances data,
int[] attr)
Returns the distinct values for the given attributes in the set
|
static weka.core.Instances |
duplicates(weka.core.Instances data)
Identifies duplicates within the data and returns a revised dataset
|
static void |
main(java.lang.String[] args) |
static weka.core.Instances |
makePos(weka.core.Instances input)
Transform to positive
|
static void |
nestedVali(double proportion,
weka.core.Instances orgData,
java.lang.String location,
java.lang.String dataset,
int folds,
int repeat,
int option,
int maxGroup,
boolean boundary,
int maxBins,
boolean clera,
boolean list,
boolean lexRank,
boolean svmrank,
double decPlaces,
double thresholdPara)
Nested Validation to 1) determine hyper parameter 2) validate with the parameters determined
|
static weka.core.Instances |
rankingLPList(weka.core.Instances data,
boolean attrUse)
Ranks the objects based on the LP-List using insertion sort
and averages how many attributes are looked at to decide two instances
|
static void |
repeatedTreeEval(weka.core.Instances orgData,
java.lang.String location,
int folds,
int repeat,
java.lang.String dataset,
int option,
int maxGroup,
boolean clera,
boolean list,
boolean lexrank,
boolean bound,
int bins,
double decPlaces,
double thresholdPara)
1.
|
static weka.core.Instances |
resample(double proportion,
weka.core.Instances original_train)
Resample and resize the given data set
|
static weka.core.Instances |
resample(weka.core.Instances original_train)
Resample the given data set
|
static weka.core.Instances |
transformData(weka.core.Instances input)
Transform a classification data set into a set of pairwise preferences
|
static void |
treeEval(weka.core.Instances orgData,
java.lang.String location,
int folds,
java.lang.String dataset,
int option,
int maxGroup,
boolean clera,
boolean list,
boolean lexrank,
boolean boundary,
int bins,
double decPlaces,
double thresholdPara)
1.
|
static void |
validation(double proportion,
weka.core.Instances orgData,
java.lang.String location,
java.lang.String dataset,
int folds,
int repeat,
int option,
int maxGroup,
boolean boundary,
int bins,
boolean clera,
boolean list,
boolean lexRank,
boolean svmrank,
double decPlaces,
double thresholdPara)
1.
|
static double[] |
validationNested(double proportion,
weka.core.Instances train,
weka.core.Instances test,
int maxGroup,
boolean boundary,
int bins,
boolean clera,
boolean list,
double decPlaces,
double thresholdPara)
Learn and evaluate the lp-list given parametrization (within nested cross-vali)
|
public static void main(java.lang.String[] args) throws java.lang.Exception
java.lang.Exception
public static void nestedVali(double proportion, weka.core.Instances orgData, java.lang.String location, java.lang.String dataset, int folds, int repeat, int option, int maxGroup, boolean boundary, int maxBins, boolean clera, boolean list, boolean lexRank, boolean svmrank, double decPlaces, double thresholdPara) throws java.lang.Exception
proportion
- The proportion to be considered to shrink the dataset if necessaryorgData
- The original data setpath
- The path for saving the resultsdataset
- Additional information for the pathfolds
- The amount of foldersrepeat
- The number of repetitionsoption
- The way the sum of the score of binary classifiers is weighted to a multipartite oenmaxGroup
- The maximal grouping size for CLeRaboundary
- For Discretization shall there be only boundary cutting pointsbins
- The maximum number of bins for discretization of attribute valuesclera
- If true CLeRa is appliedlist
- If a LP-List shall be extractedlexrank
- If true LexRank is applieddecPlaces
- Number of decimal places desired two cutting points shall differthresholdPara
- The parameter for the threshold conservativenessjava.lang.Exception
public static double[] validationNested(double proportion, weka.core.Instances train, weka.core.Instances test, int maxGroup, boolean boundary, int bins, boolean clera, boolean list, double decPlaces, double thresholdPara) throws java.lang.Exception
proportion
- The proportion to be considered to shrink the dataset if necessarytrain
- The training data settest
- The training data setmaxGroup
- The maximal grouping size for CLeRaboundary
- For Discretization shall there be only boundary cutting pointsbins
- The maximum number of bins for discretization of attribute valuesclera
- If true CLeRa is appliedlist
- If a LP-List shall be extractedlexrank
- If true LexRank is applieddecPlaces
- The number two Cutting Points shall at least differ inthresholdPara
- The parameter for the threshold conservativessjava.lang.Exception
public static void validation(double proportion, weka.core.Instances orgData, java.lang.String location, java.lang.String dataset, int folds, int repeat, int option, int maxGroup, boolean boundary, int bins, boolean clera, boolean list, boolean lexRank, boolean svmrank, double decPlaces, double thresholdPara) throws java.lang.Exception
proportion
- The proportion to be considered to shrink the dataset if necessaryorgData
- The original data setpath
- The path for saving the resultsdataset
- Additional information for the pathfolds
- The amount of foldersrepeat
- The number of repetitionsoption
- The way the sum of the score of binary classifiers is weighted to a multipartite oenmaxGroup
- The maximal grouping size for CLeRaboundary
- For Discretization shall there be only boundary cutting pointsbins
- The maximum number of bins for discretization of attribute valuesclera
- If true CLeRa is appliedlist
- If a LP-List shall be extractedlexrank
- If true LexRank is appliedsvmrank
- If true svmRank is applieddecPlaces
- The number two Cutting Points shall at least differ inthresholdPara
- The parameter for the threshold conservativessjava.lang.Exception
public static void treeEval(weka.core.Instances orgData, java.lang.String location, int folds, java.lang.String dataset, int option, int maxGroup, boolean clera, boolean list, boolean lexrank, boolean boundary, int bins, double decPlaces, double thresholdPara) throws java.lang.Exception
orgData
- The original data setpath
- The path for saving the resultsfolds
- The amount of foldersdataset
- Additional information for the pathoption
- The way the sum of the score of binary classifiers is weighted to a multipartite oenmaxGroup
- The maximal grouping size for CLeRaclera
- If true CLeRa is appliedlist
- If a LP-List shall be extractedlexrank
- If true LexRank is appliedbound
- For Discretization shall there be only boundary cutting pointsbins
- The maximum number of bins for discretization of attribute valuesthresholdPara
- The parameter for the threshold conservativenessjava.lang.Exception
public static void repeatedTreeEval(weka.core.Instances orgData, java.lang.String location, int folds, int repeat, java.lang.String dataset, int option, int maxGroup, boolean clera, boolean list, boolean lexrank, boolean bound, int bins, double decPlaces, double thresholdPara) throws java.lang.Exception
orgData
- The original data setpath
- The path for saving the resultsfolds
- The amount of foldersrepeat
- The amount of repetitions of cross Validationdataset
- Additional information for the pathoption
- The way the sum of the score of binary classifiers is weighted to a multipartite oenmaxGroup
- The maximal grouping size for CLeRaclera
- If true CLeRa is appliedlist
- If a LP-List shall be extractedlexrank
- If true LexRank is appliedbound
- If true only boundary cutting points are considered for discretizationbins
- The maximum number of bins for discretization of the attribute valuesdecPlaces
- The number two cutting points shall at least differ inthresholdPara
- The parameter for the threshold conservativenessjava.lang.Exception
public static weka.core.Instances resample(weka.core.Instances original_train) throws java.lang.Exception
original_train
- The data set to be resampledjava.lang.Exception
public static weka.core.Instances resample(double proportion, weka.core.Instances original_train) throws java.lang.Exception
proportion
- The proportion of the orginial data-setdataset
- The dataset to be resampledjava.lang.Exception
public static weka.core.Instances deleteMissing(weka.core.Instances input) throws java.lang.Exception
input
- The data setjava.lang.Exception
public static weka.core.Instances makePos(weka.core.Instances input) throws java.lang.Exception
input
- The data setjava.lang.Exception
public static weka.core.Instances transformData(weka.core.Instances input) throws java.lang.Exception
input
- The data to be transformedjava.lang.Exception
public static weka.core.Instances rankingLPList(weka.core.Instances data, boolean attrUse) throws java.lang.Exception
data
- The data to rankattrUse
- true --> compute attributes considered else notjava.lang.Exception
public static int[][] distAttrVals(weka.core.Instances data, int[] attr)
data
- The data for explorationattr
- The attributes for explorationpublic static weka.core.Instance copyInst(weka.core.Instance inst)
inst
- The instance to be copiedpublic static weka.core.Instance copyInstBak(weka.core.Instance inst)
inst
- The instance to be copiedpublic static double cIndexWithAbstention(weka.core.Instances data) throws java.lang.Exception
data
- The data set for evaluationjava.lang.Exception
public static double cIndexWithAbstentionBak(weka.core.Instances data) throws java.lang.Exception
data
- The data set for evaluationjava.lang.Exception
public static double cIndexClBak(weka.core.Instances data)
data
- The data set for evaluationpublic static double cIndex(weka.core.Instances data)
data
- The data set for evaluationpublic static double cIndexCl(weka.core.Instances data)
data
- The data set for evaluationpublic static int[][] classValsDist(weka.core.Instances data)
data
- The data for explorationpublic static weka.core.Instances duplicates(weka.core.Instances data)
data
- The data for exploration