Infotheory  1.0
Public Member Functions | List of all members
InfoTools Class Reference

Public Member Functions

 InfoTools (int dims, int nreps=0)
 
void displayConfig ()
 Display the config for analyses such as number of bins, dimensionality etc.
 
void displaySnapshot ()
 Display current status such as number of points added, number of non-empty bins etc.
 
void setEqualIntervalBinning (TVector< int > &nbs, TVector< double > &mins, TVector< double > &maxs)
 Set bounds on probs depending on max(ids) More...
 
void setBinBoundaries (TVector< double > boundaries, int dimIndex)
 Set left-boundaries for the binning of specified dimension. More...
 
void setBinBoundaries (TVector< TVector< double > > boundaries)
 Set left-boundaries for the binning of all dimensions. More...
 
void addDataPoint (TVector< double > &dp)
 Identify bin for given datapoint and add to count of points in that bin. More...
 
void addData (TVector< TVector< double > > &data)
 Add list of points at a time.
 
double entropy (TVector< int > &vIDs)
 Returns entropy of var along dims with varIDs==0. More...
 
double mutualInfo (TVector< int > &vIDs)
 Return mutual information between vars along dims varIDs==0 and varIDs==1. More...
 
double redundantInfo (TVector< int > &vIDs)
 Returns redundant information about varIDs==0, in varIDs==1 and varIDs==2. More...
 
double uniqueInfo (TVector< int > &vIDs)
 Returns amount of unique information about varIDs==0, from varIDs==1 and not from varIDs==2. More...
 
double synergy (TVector< int > &vIDs)
 Returns amount of synergistic information about varIDs==0, in varIDs==1 and varIDs==2. More...
 
void pid (TVector< int > &vIDs, TVector< double > &infos)
 Estimates complete info decomposition in infos, returns. More...
 
void clearAllData ()
 Clear all data and start over - create another object instead.
 

Constructor & Destructor Documentation

◆ InfoTools()

InfoTools::InfoTools ( int  dims,
int  nreps = 0 
)
inline

Constructor

ARGS
dims - dimensionality of data (all variables combined)
nreps - number of reps on each side of bin boundary to compute average shifted histogram

Member Function Documentation

◆ addDataPoint()

void InfoTools::addDataPoint ( TVector< double > &  dp)
inline

Identify bin for given datapoint and add to count of points in that bin.

dataPoint - TVector with length=dims contains the datapoint to be added

◆ entropy()

double InfoTools::entropy ( TVector< int > &  vIDs)
inline

Returns entropy of var along dims with varIDs==0.

Example: if dims = 4, 4D datapoints will be added, but if only the first 2 dimensions make up the variable of interest, then set varIDs[1] = 1; varIDs[2] = 1; varIDs[3] = -1; varIDs[4] = -1
The dims with varID==-1 will be ignored

◆ mutualInfo()

double InfoTools::mutualInfo ( TVector< int > &  vIDs)
inline

Return mutual information between vars along dims varIDs==0 and varIDs==1.

Set other varIDs of dims to be ignored to -1

◆ pid()

void InfoTools::pid ( TVector< int > &  vIDs,
TVector< double > &  infos 
)
inline

Estimates complete info decomposition in infos, returns.

total mutual information about varIDs==0, from varIDs==1 and varIDs==2
unique info about varIDs==0 in varIDs==1
unique info about varIDs==0 in varIDs==2
redundant info about varIDs==0, from varIDs==1 and varIDs==2
synergistic info about varIDs==0, from varIDs==1 and varIDs==2
Set other varIDs of dims to be ignored to -1

◆ redundantInfo()

double InfoTools::redundantInfo ( TVector< int > &  vIDs)
inline

Returns redundant information about varIDs==0, in varIDs==1 and varIDs==2.

Set other varIDs of dims to be ignored to -1

◆ setBinBoundaries() [1/2]

void InfoTools::setBinBoundaries ( TVector< double >  boundaries,
int  dimIndex 
)
inline

Set left-boundaries for the binning of specified dimension.

boundaries - TVector that has bin-margins for specified dimension. Length of list = number_of_bins-1, left most bin is (-inf,list[0]) and right most bin is (list[-1],inf) dim_index - int with dimension of choice - 0-indexing

◆ setBinBoundaries() [2/2]

void InfoTools::setBinBoundaries ( TVector< TVector< double > >  boundaries)
inline

Set left-boundaries for the binning of all dimensions.

boundaries - TVector that has TVectors for left-margin of all dims. Length of each TVector = number_of_bins-1, left most bin is (-inf,list[0]) and right most bin is (list[-1],inf)

◆ setEqualIntervalBinning()

void InfoTools::setEqualIntervalBinning ( TVector< int > &  nbs,
TVector< double > &  mins,
TVector< double > &  maxs 
)
inline

Set bounds on probs depending on max(ids)

nbs - TVector with length=dims and has number of bins for each dimension
mins - TVector with length=dims that has min on each dim
maxs - TVector with length=dims that has max on each dim

◆ synergy()

double InfoTools::synergy ( TVector< int > &  vIDs)
inline

Returns amount of synergistic information about varIDs==0, in varIDs==1 and varIDs==2.

Set other varIDs of dims to be ignored to -1

◆ uniqueInfo()

double InfoTools::uniqueInfo ( TVector< int > &  vIDs)
inline

Returns amount of unique information about varIDs==0, from varIDs==1 and not from varIDs==2.

Set other varIDs of dims to be ignored to -1


The documentation for this class was generated from the following file: