Class Massaging
- java.lang.Object
-
- org.processmining.plugins.workshop.Yaguang.WekaDiscriminationTree.Massaging
-
public class Massaging extends java.lang.ObjectClass for building and using a Classyfing without Discriminating classifier. Numeric attributes are modelled by a normal distribution. For more Discrimination has been calculated by taking the difference of confidence of SA values for decired class(DC) Discrimination is removed by using the reweighing technique of CND Author Toon Calders, Faisal Kamran
-
-
Field Summary
Fields Modifier and Type Field Description protected static intcdCountcpCount=number of candidates for promotion cdCount=numeber of candidates for demotionstatic ClassifierclassifierClassifier used as Rankerprotected static doubleconfDepConfidence of deprived community for desired class(dc)protected static doubleconfFavConfidence of favoured community for desired class(dc)protected static intcpCountcpCount=number of candidates for promotion cdCount=numeber of candidates for demotionprotected intdcIndexTo store a desired class(dc) index and Not desired class index(ndc) from weka.classifiers.discrimination.javastatic doubleepsilonprotected static doublefavNegAll the counts for sensitive attribute value for positve and negative classes.protected InstancesmassagedInstThe data set after tapplying massagingprotected intndcIndexTo store a desired class(dc) index and Not desired class index(ndc) from weka.classifiers.discrimination.javaprotected static doublesavPosAll the counts for sensitive attribute value for positve and negative classes.protected double[][]sortedDemotionListarray for sorted demotion listprotected double[][]sortedPromotionListarray for sorted promotion liststatic inttotalChangesTo count the total number of changes in the train set by massaging
-
Constructor Summary
Constructors Constructor Description Massaging()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description InstancescndApplication(Instances instances)InstancescndApplication(Instances instances, double promote, double demote)static doubleconfidenceDiff()voidranker(Instances instances)ranker method produces sorted promotion and demotion list for CNDstatic voidsetRanker(Classifier classifierName)static double[][]sorting(double[][] arrayToSort, int length, int type)method to sort the 2-D arrays
-
-
-
Field Detail
-
totalChanges
public static int totalChanges
To count the total number of changes in the train set by massaging
-
epsilon
public static double epsilon
-
massagedInst
protected Instances massagedInst
The data set after tapplying massaging
-
savPos
protected static double savPos
All the counts for sensitive attribute value for positve and negative classes. saPos=favoured community with positve class savPos=sav&+
-
favNeg
protected static double favNeg
All the counts for sensitive attribute value for positve and negative classes. saPos=favoured community with positve class savPos=sav&+
-
sortedPromotionList
protected double[][] sortedPromotionList
array for sorted promotion list
-
sortedDemotionList
protected double[][] sortedDemotionList
array for sorted demotion list
-
confDep
protected static double confDep
Confidence of deprived community for desired class(dc)
-
confFav
protected static double confFav
Confidence of favoured community for desired class(dc)
-
cpCount
protected static int cpCount
cpCount=number of candidates for promotion cdCount=numeber of candidates for demotion
-
cdCount
protected static int cdCount
cpCount=number of candidates for promotion cdCount=numeber of candidates for demotion
-
dcIndex
protected int dcIndex
To store a desired class(dc) index and Not desired class index(ndc) from weka.classifiers.discrimination.java
-
ndcIndex
protected int ndcIndex
To store a desired class(dc) index and Not desired class index(ndc) from weka.classifiers.discrimination.java
-
classifier
public static Classifier classifier
Classifier used as Ranker
-
-
Method Detail
-
setRanker
public static void setRanker(Classifier classifierName)
-
cndApplication
public Instances cndApplication(Instances instances, double promote, double demote) throws java.lang.Exception
- Parameters:
instances- dataset for massa- Returns:
- Throws:
java.lang.Exception
-
cndApplication
public Instances cndApplication(Instances instances) throws java.lang.Exception
- Throws:
java.lang.Exception
-
ranker
public void ranker(Instances instances) throws java.lang.Exception
ranker method produces sorted promotion and demotion list for CND- Parameters:
instances-- Throws:
java.lang.Exception
-
confidenceDiff
public static double confidenceDiff()
- Returns:
- confidence difference of "sav" and "fav" for "dc"
-
sorting
public static double[][] sorting(double[][] arrayToSort, int length, int type)method to sort the 2-D arrays- Parameters:
arrayToSort- A 2-D array which we want to sorttype- 1 is descending order and type 2 is for ascending order- Returns:
- sorted array
-
-