public static class ImputedFeatureEvaluatorImpl.JointDistribution extends Object
Modifier and Type | Field and Description |
---|---|
protected double[][] |
contingencyTable |
protected Double |
entropyX
the entropy of X.
|
protected Double |
entropyXY
the entropy of X*Y.
|
protected SortedMap<String,SortedMap<String,Set<Long>>> |
jointDistroTable
A y*x table where the cells hold the instance ids.
|
protected Set<String> |
xVals
the possible values of X (e.g.
|
protected Set<String> |
yVals
the possible values of Y (e.g.
|
Constructor and Description |
---|
JointDistribution(Set<String> xVals,
Set<String> yVals)
set up the joint distribution table.
|
JointDistribution(Set<String> xVals,
Set<String> yVals,
Map<String,Set<Long>> xMargin,
Map<String,Set<Long>> yMargin,
String xLeftover) |
Modifier and Type | Method and Description |
---|---|
double[][] |
getContingencyTable() |
double |
getEntropyX() |
double |
getEntropyXY() |
double |
getInfoGain() |
Set<Long> |
getInstances(String x,
String y) |
double |
getMutualInformation(double entropyY) |
static ImputedFeatureEvaluatorImpl.JointDistribution |
merge(List<ImputedFeatureEvaluatorImpl.JointDistribution> jointDistros,
Map<String,Set<Long>> yMargin,
String xMerge)
merge joint distributions into a single distribution.
|
String |
toString()
print out joint distribution table
|
protected double[][] contingencyTable
protected Double entropyX
protected Double entropyXY
protected SortedMap<String,SortedMap<String,Set<Long>>> jointDistroTable
public JointDistribution(Set<String> xVals, Set<String> yVals)
xVals
- the possible x values (bins)yVals
- the possible y values (bins)public static ImputedFeatureEvaluatorImpl.JointDistribution merge(List<ImputedFeatureEvaluatorImpl.JointDistribution> jointDistros, Map<String,Set<Long>> yMargin, String xMerge)
jointDistros
- list of joint distribution tables to mergeyMargin
- map of y val - instance id. this could be calculated on
the fly, but we have this information already.xMerge
- the x val that contains everything that doesn't land in
any of the other bins.public double[][] getContingencyTable()
public double getEntropyX()
public double getEntropyXY()
public double getInfoGain()
public double getMutualInformation(double entropyY)
Copyright © 2012-2017 The Apache Software Foundation. All Rights Reserved.