public class InformationTheoryDemo extends Object
Modifier and Type | Class and Description |
---|---|
static class |
InformationTheoryDemo.DemoOptions |
static class |
InformationTheoryDemo.DistributionType |
Constructor and Description |
---|
InformationTheoryDemo() |
Modifier and Type | Method and Description |
---|---|
static CachedTriple<List<Integer>,List<Integer>,List<Integer>> |
generateCorrelated(int length,
int alphabetSize,
double xyCorrelation,
double xzCorrelation)
These correlations don't map to mutual information values, as if xyDraw is above xyCorrelation then the draw is completely random.
|
static List<Integer> |
generateUniform(int length,
int alphabetSize)
Generates a sample from a uniform distribution over the integers.
|
static CachedTriple<List<Integer>,List<Integer>,List<Integer>> |
generateXOR(int length)
Generates a sample from a three variable XOR function.
|
static void |
main(String[] args) |
public static List<Integer> generateUniform(int length, int alphabetSize)
length
- The number of samples.alphabetSize
- The alphabet size (i.e., the number of unique values).public static CachedTriple<List<Integer>,List<Integer>,List<Integer>> generateXOR(int length)
Each list is a binary variable, and the third is the XOR of the first two.
length
- The number of samples.public static CachedTriple<List<Integer>,List<Integer>,List<Integer>> generateCorrelated(int length, int alphabetSize, double xyCorrelation, double xzCorrelation)
To make it generate correlations of a specific mutual information then it needs to specify the full joint distribution and draw from that.
length
- The number of samples.alphabetSize
- The alphabet size (i.e., the number of unique values).xyCorrelation
- Value between 0.0 and 1.0 specifying how likely it is that Y has the same value as X.xzCorrelation
- Value between 0.0 and 1.0 specifying how likely it is that Z has the same value as X.public static void main(String[] args)
Copyright © 2015–2021 Oracle and/or its affiliates. All rights reserved.