Table Of Contents

Previous topic

algorithms.statistics.regression

Next topic

algorithms.statistics.utils

This Page

algorithms.statistics.rft

Module: algorithms.statistics.rft

Inheritance diagram for nipy.algorithms.statistics.rft:

Classes

ChiBarSquared

class nipy.algorithms.statistics.rft.ChiBarSquared(dfn=1, search=[, 1])

Bases: nipy.algorithms.statistics.rft.ChiSquared

__init__(dfn=1, search=[, 1])

ChiSquared

class nipy.algorithms.statistics.rft.ChiSquared(dfn, dfd=inf, search=[, 1])

Bases: nipy.algorithms.statistics.rft.ECcone

EC densities for a Chi-Squared(n) random field.

__init__(dfn, dfd=inf, search=[, 1])

ECcone

class nipy.algorithms.statistics.rft.ECcone(mu=[, 1], dfd=inf, search=[, 1], product=[, 1])

Bases: nipy.algorithms.statistics.rft.IntrinsicVolumes

A class that takes the intrinsic volumes of a set and gives the EC approximation to the supremum distribution of a unit variance Gaussian process with these intrinsic volumes. This is the basic building block of all of the EC densities.

If product is not None, then this product (an instance of IntrinsicVolumes) will effectively be prepended to the search region in any call, but it will also affect the (quasi-)polynomial part of the EC density. For instance, Hotelling’s T^2 random field has a sphere as product, as does Roy’s maximum root.

__init__(mu=[, 1], dfd=inf, search=[, 1], product=[, 1])
density(x, dim)
The EC density in dimension dim.
integ(m=None, k=None)
pvalue(x, search=None)
quasi(dim)
(Quasi-)polynomial parts of the EC density in dimension dim ignoring a factor of (2pi)^{-(dim+1)/2} in front.

ECquasi

class nipy.algorithms.statistics.rft.ECquasi(c_or_r, r=0, exponent=None, m=None)

Bases: numpy.lib.polynomial.poly1d

A subclass of poly1d consisting of polynomials with a premultiplier of the form

(1 + x^2/m)^-exponent

where m is a non-negative float (possibly infinity, in which case the function is a polynomial) and exponent is a non-negative multiple of 1/2.

These arise often in the EC densities.

__init__(c_or_r, r=0, exponent=None, m=None)
change_exponent(_pow)
Multiply top and bottom by an integer multiple of the self.denom_poly.
compatible(other)
Check whether the degrees of freedom of two instances are equal so that they can be multiplied together.
denom_poly()
This is the base of the premultiplier: (1+x^2/m).
deriv(m=1)
Evaluate derivative of ECquasi.

FStat

class nipy.algorithms.statistics.rft.FStat(dfn, dfd=inf, search=[, 1])

Bases: nipy.algorithms.statistics.rft.ECcone

EC densities for a F random field.

__init__(dfn, dfd=inf, search=[, 1])

Hotelling

class nipy.algorithms.statistics.rft.Hotelling(dfd=inf, k=1, search=[, 1])

Bases: nipy.algorithms.statistics.rft.ECcone

Hotelling’s T^2: maximize an F_{1,dfd}=T_dfd^2 statistic over a sphere of dimension k.

__init__(dfd=inf, k=1, search=[, 1])

IntrinsicVolumes

class nipy.algorithms.statistics.rft.IntrinsicVolumes(mu=[, 1])

A simple class that exists only to compute the intrinsic volumes of products of sets (that themselves have intrinsic volumes, of course).

__init__(mu=[, 1])

MultilinearForm

class nipy.algorithms.statistics.rft.MultilinearForm(*dims, **keywords)

Bases: nipy.algorithms.statistics.rft.ECcone

Maximize a multivariate Gaussian form, maximized over spheres of dimension dims. See

Kuri, S. & Takemura, A. (2001). ‘Tail probabilities of the maxima of multilinear forms and their applications.’ Ann, Statist. 29(2): 328-371.

__init__(*dims, **keywords)

OneSidedF

class nipy.algorithms.statistics.rft.OneSidedF(dfn, dfd=inf, search=[, 1])

Bases: nipy.algorithms.statistics.rft.ECcone

EC densities for one-sided F statistic in

Worsley, K.J. & Taylor, J.E. (2005). ‘Detecting fMRI activation allowing for unknown latency of the hemodynamic response.’ Neuroimage, 29,649-654.

__init__(dfn, dfd=inf, search=[, 1])

Roy

class nipy.algorithms.statistics.rft.Roy(dfn=1, dfd=inf, k=1, search=[, 1])

Bases: nipy.algorithms.statistics.rft.ECcone

Roy’s maximum root: maximize an F_{dfd,dfn} statistic over a sphere of dimension k.

__init__(dfn=1, dfd=inf, k=1, search=[, 1])

TStat

class nipy.algorithms.statistics.rft.TStat(dfd=inf, search=[, 1])

Bases: nipy.algorithms.statistics.rft.ECcone

EC densities for a t random field.

__init__(dfd=inf, search=[, 1])

fnsum

class nipy.algorithms.statistics.rft.fnsum(*items)
__init__(*items)

Functions

nipy.algorithms.statistics.rft.Q(dim, dfd=inf)

If dfd == inf (the default), then Q(dim) is the (dim-1)-st Hermite polynomial

H_j(x) = (-1)^j * e^{x^2/2} * (d^j/dx^j e^{-x^2/2})

If dfd != inf, then it is the polynomial Q defined in

Worsley, K.J. (1994). ‘Local maxima and the expected Euler characteristic of excursion sets of chi^2, F and t fields.’ Advances in Applied Probability, 26:13-42.

A ball-shaped search region of radius r.
nipy.algorithms.statistics.rft.binomial(n, j)
Binomial coefficient:
nipy.algorithms.statistics.rft.mu_ball(n, j, r=1)
Return mu_j(B_n(r)), the j-th Lipschitz Killing curvature of the ball of radius r in R^n.
nipy.algorithms.statistics.rft.mu_sphere(n, j, r=1)

Return mu_j(S_r(R^n)), the j-th Lipschitz Killing curvature of the sphere of radius r in R^n.

From Chapter 6 of

Adler & Taylor, ‘Random Fields and Geometry’. 2006.

nipy.algorithms.statistics.rft.scale_space(region, interval, kappa=1.0)

Work out intrinsic volumes of region x interval in the scale space model. See

Siegmund, D.O and Worsley, K.J. (1995). ‘Testing for a signal with unknown location and scale in a stationary Gaussian random field.’ Annals of Statistics, 23:608-639.

and

Taylor, J.E. & Worsley, K.J. (2005). ‘Random fields of multivariate test statistics, with applications to shape analysis and fMRI.’

(available on http://www.math.mcgill.ca/keith

A spherical search region of radius r.
nipy.algorithms.statistics.rft.volume2ball(vol, d=3)
Approximate intrinsic volumes of a set with a given volume by those of a ball with a given dimension and equal volume.