Package mvpa :: Package measures :: Module glm :: Class GLM

[hide private]
[frames] | no frames]

# Class GLM

source code

General linear model (GLM).

Regressors can be defined in a design matrix and a linear fit of the data is computed univariately (i.e. indepently for each feature). This measure can report 'raw' parameter estimates (i.e. beta weights) of the linear model, as well as standardized parameters (z-stat) using an ordinary least squares (aka fixed-effects) approach to estimate the parameter estimate.

The measure is reported in a (nfeatures x nregressors)-shaped array.

Nested Classes | [hide private]

Inherited from `misc.state.ClassWithCollections`: `__metaclass__`

Instance Methods | [hide private]

__init__(self, design, voi='pe', **kwargs) Initialize | source code

_call(self, dataset) Computes a per-feature-measure on a given Dataset. | source code

Inherited from `base.FeaturewiseDatasetMeasure`: `__repr__`, `combiner`

Inherited from `base.FeaturewiseDatasetMeasure` (private): `_postcall`

Inherited from `base.DatasetMeasure`: `__call__`, `null_dist`, `transformer`, `untrain`

Inherited from `misc.state.ClassWithCollections`: `__getattribute__`, `__new__`, `__setattr__`, `__str__`, `reset`

Inherited from `object`: `__delattr__`, `__format__`, `__hash__`, `__reduce__`, `__reduce_ex__`, `__sizeof__`, `__subclasshook__`

Class Variables | [hide private]

| pe = `StateVariable(enabled= False, doc= "Parameter estimates (`...``
| zstat = `StateVariable(enabled= False, doc= "Standardized param`...``
Inherited from `base.FeaturewiseDatasetMeasure`: `base_sensitivities` Inherited from `base.DatasetMeasure`: `__doc__`, `null_prob`, `null_t`, `raw_results` Inherited from `misc.state.ClassWithCollections`: `_DEV__doc__`, `descr`

Properties | [hide private]

Inherited from `object`: `__class__`

Method Details | [hide private]

### __init__(self, design, voi='pe', **kwargs)
(Constructor)

source code

Initialize

Parameters:
  - `design`, `array(nsamples`, `x`, `nregressors)` - GLM design matrix.
  - `voi`, `'pe'`, `|`, `'zstat'` - Variable of interest that should be reported as feature-wise measure. 'beta' are the parameter estimates and 'zstat' returns standardized parameter estimates.
Overrides: object.__init__

### _call(self, dataset)

source code

Computes a per-feature-measure on a given Dataset.

Behaves like a DatasetMeasure, but computes and returns a 1d ndarray with one value per feature.

Overrides: base.DatasetMeasure._call
  (inherited documentation)

Class Variable Details | [hide private]

### pe

Value:

      StateVariable(enabled= False, doc= "Parameter estimates (nfeatures x n
      parameters).")

### zstat

Value:

      StateVariable(enabled= False, doc= "Standardized parameter estimates (
      nfeatures x nparameters).")