public class Unconditional_More_Dim_LP_Extract_Discr
extends java.lang.Object
Constructor and Description |
---|
Unconditional_More_Dim_LP_Extract_Discr(weka.core.Instances data,
int maxGroup,
boolean bound,
int bins,
double decPlaces,
double thresholdPara)
Constructor
|
Unconditional_More_Dim_LP_Extract_Discr(weka.core.Instances data,
int maxGroup,
boolean bound,
int bins,
int i,
java.lang.String fold,
double decPlaces,
double thresholdPara)
Constructor
|
Modifier and Type | Method and Description |
---|---|
int |
attrUsed(weka.core.Instance one,
weka.core.Instance two)
Computes the attributes needed to decide between the two instances based on the given AI-Tree
LP-structure: Unconditional local preferences/attribute importance
|
int[] |
computeErrors(weka.core.Instances data,
int stage)
Returns the number of wrong predicitons by applicating the given rules on the given dataset based on the given stage
|
int[] |
computeErrorsExt(weka.core.Instances data)
Returns the number of wrong predicitons by applicating the given rules on the given dataset
|
int[] |
computeNodeErrors(weka.core.Instances data,
int[] tempAttributes,
int[][] tempPreferences)
Returns the number of wrong predicitons by applicating the given rules on the given dataset based on the node
|
void |
createLPS_lookahead(weka.core.Instances data,
weka.core.Instances lhData,
int stage,
boolean boundary,
int bins,
double decPlaces,
double thresholdPara,
int count,
double[] sumErrors)
Greedy algorithm for identifying the lp-structure within data
unconditional attribute importance and local preferences!
|
void |
createLPStructure(weka.core.Instances data,
int stage,
boolean boundary,
int bins,
double decPlaces,
double thresholdPara)
Greedy algorithm for identifying the lp-structure within data
unconditional attribute importance and local preferences!
|
int |
decide(weka.core.Instance one,
weka.core.Instance two,
int stage)
Decides (intern) on the given instances
LP-structure: Unconditional local preferences/attribute importance
|
int |
decideExt(weka.core.Instance one,
weka.core.Instance two)
Decides on the given instances based on the given AI-Tree
LP-structure: Unconditional local preferences/conditional AI-tree
|
int |
decideExtBak(weka.core.Instance one,
weka.core.Instance two)
Decides on the given instances based on the given AI-Tree
LP-structure: Unconditional local preferences/conditional AI-tree
|
int |
decideNode(weka.core.Instance one,
weka.core.Instance two,
int[] tempAttributes,
int[][] tempPreferences)
Decides (intern) on the given instances
LP-structure: Unconditional local preferences/attribute importance
|
weka.core.Instances |
eliminate_duplicates(weka.core.Instances data)
Removes duplicates (according to the key -> last two attributes)
|
boolean |
inBranch(int candidate,
int stage)
Checks whether the candidate attribute for labeling a node is already in branch
(one attribute may only appear once per branch)
LP-structure: Conditional local preferences/conditional AI-tree
|
static void |
main(java.lang.String[] args) |
int[][] |
orderedAttrVals(weka.core.Instances training,
int[] attribute)
Returns the attributes' ordered labels based on the pairwise preferences
|
void |
resize(int size)
Resizes the attributes, cutPoints and preferences arrays to the given value
|
void |
results()
Print the preferences on attributes, attribute values and the cutting values table for discretization
|
public Unconditional_More_Dim_LP_Extract_Discr(weka.core.Instances data, int maxGroup, boolean bound, int bins, double decPlaces, double thresholdPara) throws java.lang.Exception
java.lang.Exception
public Unconditional_More_Dim_LP_Extract_Discr(weka.core.Instances data, int maxGroup, boolean bound, int bins, int i, java.lang.String fold, double decPlaces, double thresholdPara) throws java.lang.Exception
java.lang.Exception
public static void main(java.lang.String[] args) throws java.lang.Exception
args
- java.lang.Exception
public int[] computeErrorsExt(weka.core.Instances data) throws java.lang.Exception
data
- The data for evaluationjava.lang.Exception
public int decideExtBak(weka.core.Instance one, weka.core.Instance two) throws java.lang.Exception
one
- The first instancetwo
- The second instance to be compared with the first onejava.lang.Exception
public void createLPS_lookahead(weka.core.Instances data, weka.core.Instances lhData, int stage, boolean boundary, int bins, double decPlaces, double thresholdPara, int count, double[] sumErrors) throws java.lang.Exception
data
- The data for evaluation (set of pairwise preferences)lhData
- The original data stored till lookahead (set of pairwise preferencesstage
- The stage where the node to be labelled is situatedboundary
- If true only boundary points are consideredbins
- The maximum amount of bins for disrectizationdecPlaces
- The number two cut points shall differthresholdPara
- The parameter for the threshold conservativenesscount
- The number of nodes considered for groupingsumErrors
- The number of Errors in sum (to be reseted whenever count = maxGroup)java.lang.Exception
public void createLPStructure(weka.core.Instances data, int stage, boolean boundary, int bins, double decPlaces, double thresholdPara) throws java.lang.Exception
data
- The data for evaluation (set of pairwise preferences)stage
- The stage where the node to be labelled is situatedboundary
- If true only boundary points are consideredbins
- The maximum amount of bins for disrectizationdecPlaces
- The number two cut points shall differthresholdPara
- The parameter for the threshold conservativenessjava.lang.Exception
public int[] computeErrors(weka.core.Instances data, int stage)
data
- The data for evaluationstage
- The level of the attribute hierarchy based on which shall be decidedpublic int decide(weka.core.Instance one, weka.core.Instance two, int stage)
one
- The first instancetwo
- The second instance to be compared with the first onestage
- The level of the attribute importance list based on which shall be decidedpublic int[] computeNodeErrors(weka.core.Instances data, int[] tempAttributes, int[][] tempPreferences)
data
- The data for evaluationnode
- The node containing the (grouped) attributespreferences
- The preferences connected with the given attributespublic int decideNode(weka.core.Instance one, weka.core.Instance two, int[] tempAttributes, int[][] tempPreferences)
one
- The first instancetwo
- The second instance to be compared with the first onenode
- The node containing the (grouped) attributespreferences
- The preferences connected with the given attributespublic int decideExt(weka.core.Instance one, weka.core.Instance two) throws java.lang.Exception
one
- The first instancetwo
- The second instance to be compared with the first onejava.lang.Exception
public int attrUsed(weka.core.Instance one, weka.core.Instance two) throws java.lang.Exception
one
- The first instancetwo
- The second instance to be compared with the first onejava.lang.Exception
public void results()
public boolean inBranch(int candidate, int stage)
candidate
- The candidate attributestage
- The stage in the treepublic void resize(int size)
size
- The new size for the arrayspublic int[][] orderedAttrVals(weka.core.Instances training, int[] attribute)
training
- The data for explorationattribute
- The given attributespublic weka.core.Instances eliminate_duplicates(weka.core.Instances data)
data
- The data-set to be edited