Object

infcalcs

EstimateMI

Related Doc: package infcalcs

Permalink

object EstimateMI

Contains methods for estimating mutual information.

The principal methods used by top-level calling functions are: - EstimateMI.genEstimatesMult, which takes a dataset and returns mutual information estimates for each attempted bin size, and - EstimateMI.optMIMult, which takes the mutual information estimates produced by EstimateMI.genEstimatesMult and finds the bin size and mutual information that maximizes the mutual information for the real but not the randomized datasets.

Other important methods include: - EstimateMI.buildRegData, which builds resampled and randomized contingency tables - EstimateMI.calcMultRegs, which estimates the mutual information by linear regression.

Linear Supertypes
AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. EstimateMI
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Value Members

  1. final def !=(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  5. def binNumberIsAppropriate(calcConfig: CalcConfig)(p: DRData, binPair: Pair[NTuple[Int]]): Boolean

    Permalink

    Checks that there are fewer (or an equal number of) bins than nonzero CalcConfig.lowerAvgEntryLimit for the lowest fraction of jackknifed data in both dimensions, OR checks that the number of unique values in each dimension is lower than the number of bins in the respective dimensions

  6. def buildSingleRegData(calcConfig: CalcConfig)(binPair: Pair[NTuple[Int]], data: DRData, wts: Option[Weight], rand: Boolean = false, tag: String = ""): RegData

    Permalink

    Alternate function to generate RegData instances regardless of randomization

  7. def buildTableWithWeight(data: DRData, binPair: Pair[NTuple[Int]], wts: Option[Weight], rand: Boolean = false): CTable[Double]

    Permalink

    Builds a infcalcs.tables.ContingencyTable with or without some specified weight

    Builds a infcalcs.tables.ContingencyTable with or without some specified weight

    data

    data points entered into table

    binPair

    bins for data points

    wts

    Weight wrapped in Option monad

    rand

    specifies if data should be shuffled to destroy information

  8. def calcBootstrapEstimates(calcConfig: CalcConfig)(binPair: Pair[NTuple[Int]], data: DRData, wts: Option[Weight]): EstimateBS

    Permalink

    Calculate the estimated mutual information and bootstrap confidence intervals for a particular binning of the data

    Calculate the estimated mutual information and bootstrap confidence intervals for a particular binning of the data

    returns

    an Estimates instance

  9. def calcMultRegs(calcConfig: CalcConfig)(r: (RegData, RegDataRand)): (OLS, List[Option[OLS]])

    Permalink

    Calculates regression model for both original and randomized data.

    Calculates regression model for both original and randomized data.

    Calculates a linear regression of the mutual information of each subsampled or randomized dataset vs. the inverse sample size. Returns results as a tuple: the first entry in the tuple contains the regression line (as an instance of OLS) for the original dataset; the second entry in the tuple contains a list of regression lines (OLS objects), one for each of numRandTables rounds of randomization. Because linear regression may fail on the randomized data, some entries in the list may be None.

    r

    (RegData, RegDataRand) structure as returned by buildRegData.

    returns

    (regression on original data, list of regressions on random data)

  10. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  11. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  12. def equals(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  13. def finalEstimation(binPair: Pair[NTuple[Int]], data: DRData, wts: Option[Weight])(implicit calcConfig: CalcConfig): Unit

    Permalink

    Takes the pair of n-dimensional bin number vectors resulting in maximal mutual information in order to estimate all relevant quantities as defined in tables.CTable.ctVals.

    Takes the pair of n-dimensional bin number vectors resulting in maximal mutual information in order to estimate all relevant quantities as defined in tables.CTable.ctVals. These data are outputted to an information file

    binPair

    pair of n-dimensional bin number vectors

    data

    DRData

    wts

    optional Weight depending on which weight resulted in maximal mutual information

  14. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  15. def genEstimatesBSImp(calcConfig: CalcConfig)(pl: DRData, signalBins: NTuple[Int], wts: Option[Weight] = None): Vector[EstTupleBS]

    Permalink

    Alternate to genEstimatesMultImp when using bootstrapping approach

    Alternate to genEstimatesMultImp when using bootstrapping approach

    returns

    Vector of EstTupleBS instances

  16. def genEstimatesMult(calcConfig: CalcConfig)(pl: DRData, binPair: Pair[NTuple[Int]] = calcConfig.initBinTuples, wts: Option[Weight] = None, numConsecRandPos: Int = 0, res: Vector[EstTuple] = Vector()): Vector[EstTuple]

    Permalink

    Gets mutual information estimates for range of response bin sizes by regression.

    Gets mutual information estimates for range of response bin sizes by regression.

    The range of bin sizes attempted depends on the calculation Parameters which define the response bin spacing and the number of biased calculations before reaching a stop criterion. For each set of bin sizes given, this function: - builds the randomized and resampled contingency tables by calling buildRegData - estimates the unbiased mutual information for the resampled and/or randomized datasets by linear regression, by calling calcMultRegs - extracts the intercepts and confidence intervals from the regression results by calling multIntercepts.

    pl

    DRData

    binPair

    specified bin configuration

    wts

    Weight wrapped in Option

    numConsecRandPos

    tracks number of biased estimates

    res

    results

    Annotations
    @tailrec()
  17. def genEstimatesMultImp(calcConfig: CalcConfig)(pl: DRData, signalBins: NTuple[Int], wts: Option[Weight] = None): Vector[EstTuple]

    Permalink

    An imperative alternative to genEstimatesMult

  18. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  19. def hashCode(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  20. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  21. def isNotBiased(calcConfig: CalcConfig)(estimates: List[Pair[Double]], numNotBiased: Int = 0): Boolean

    Permalink

    Filter for determining if mutual information estimates are biased based on the presence of nontrivial quantities of information in randomized data sets

    Filter for determining if mutual information estimates are biased based on the presence of nontrivial quantities of information in randomized data sets

    Annotations
    @tailrec()
  22. def multIntercepts(regs: (OLS, List[Option[OLS]])): Estimates

    Permalink

    Returns intercepts and confidence intervals given multiple regression data.

    Returns intercepts and confidence intervals given multiple regression data.

    The list of intercepts and intervals returned will be the same length as the list of regression lines forming the second entry in the tuple passed as an argument.

    regs

    (regression, list of regressions), as from calcMultRegs

    returns

    Estimates instance

  23. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  24. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  25. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
  26. def optMIBS(calcConfig: CalcConfig)(d: Vector[EstTupleBS]): EstTupleBS

    Permalink

    Alternate version of optMIMult that uses data structures compatible with bootstrapping

  27. def optMIMult(calcConfig: CalcConfig)(d: Vector[EstTuple]): EstTuple

    Permalink

    Returns the MI estimate that is maximized for real but not randomized data.

    Returns the MI estimate that is maximized for real but not randomized data.

    Takes a list of EstTuple instances for a range of bin sizes, extracted by linear regression for both real and randomized data (eg, as provided by genEstimatesMult) and finds the bin size/MI combination that maximizes the mutual information while still maintaining the estimated MI of the randomized data below the cutoff specified by the "cutoffValue" parameter.

    d

    vector of EstTuple instances

    returns

    Entry from the list d the optimizes the MI estimate.

  28. def resample(size: Int, rows: Int, cols: Int, t: Tree[CtPos]): ContingencyTable[Int]

    Permalink

    Generates a new infcalcs.tables.ContingencyTable from a Tree of CtPos instances.

    Generates a new infcalcs.tables.ContingencyTable from a Tree of CtPos instances.

    This function is a way to generate integer-based infcalcs.tables.ContingencyTable instances with a specified number of entries, given some probability distribution over two dimensions. Generally the probability distribution is obtained from a previous infcalcs.tables.ContingencyTable that was created using the CTBuild.buildTable method.

    size

    total number of entries in the new infcalcs.tables.ContingencyTable

    rows

    rows in the new infcalcs.tables.ContingencyTable

    cols

    columns in the new infcalcs.tables.ContingencyTable

    t

    Tree of CtPos instances that defines the probability distribution

  29. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  30. def toString(): String

    Permalink
    Definition Classes
    AnyRef → Any
  31. def updateRespBinNumbers(calcConfig: CalcConfig)(respBinTuple: NTuple[Int]): NTuple[Int]

    Permalink

    Increments the bins for response space

  32. def updateSigBinNumbers(calcConfig: CalcConfig)(sigBinTuple: NTuple[Int]): NTuple[Int]

    Permalink

    Increments the bins for signal space

  33. final def wait(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  34. final def wait(arg0: Long, arg1: Int): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  35. final def wait(arg0: Long): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Deprecated Value Members

  1. def buildRegData(calcConfig: CalcConfig)(binPair: Pair[NTuple[Int]], data: DRData, wts: Option[Weight]): (RegData, RegDataRand)

    Permalink

    Returns resampled and randomized contingency tables for estimation of MI.

    Returns resampled and randomized contingency tables for estimation of MI.

    The data structures returned by this function contains all of the information required to calculate the MI for a single pair of bin sizes, including contingency tables for randomly subsampled datasets (for unbiased estimation of MI at each bin size) and randomly shuffled contingency tables (for selection of the appropriate bin size).

    Resampling of the dataset is performed using the resample method.

    binPair

    Pair of tuples containing the numbers of row and column bins.

    data

    The input/output dataset.

    wts

    An optional weights vector to be applied to the rows.

    returns

    (RegData, RegDataRand)

    Annotations
    @deprecated
    Deprecated

Inherited from AnyRef

Inherited from Any

Ungrouped