NIPY logo

Site Navigation

NIPY Community

Table Of Contents

Previous topic

analysis.coherence

Next topic

analysis.event_related

analysis.correlation

Module: analysis.correlation

Inheritance diagram for nitime.analysis.correlation:

System Message: WARNING/2 (/build/buildd/nitime-0.2.99/doc/api/generated/nitime.analysis.correlation.rst, line None)

Could not execute ‘dot’. Are you sure you have ‘graphviz’ installed?

CorrelationAnalyzer

class nitime.analysis.correlation.CorrelationAnalyzer(input=None)

Bases: nitime.analysis.base.BaseAnalyzer

Analyzer object for correlation analysis. Has the same API as the CoherenceAnalyzer

__init__(input=None)
Parameters :

input: TimeSeries object :

Containing the data to analyze.

Examples

>>> t1 = ts.TimeSeries(data = np.sin(np.arange(0,
...                    10*np.pi,10*np.pi/100)).reshape(2,50),
...                                      sampling_rate=np.pi)
>>> c1 = CorrelationAnalyzer(t1)
>>> c1 = CorrelationAnalyzer(t1)
>>> c1.corrcoef
array([[ 1., -1.],
       [-1.,  1.]])
>>> c1.xcorr.sampling_rate
3.1415926536 Hz
>>> c1.xcorr.t0
-15.915494309150001 s
static corrcoef()

The correlation coefficient between every pairwise combination of time-series contained in the object

static xcorr()

The cross-correlation between every pairwise combination time-series in the object. Uses np.correlation(‘full’).

Returns :

TimeSeries: the time-dependent cross-correlation, with zero-lag :

at time=0 :

static xcorr_norm()

The cross-correlation between every pairwise combination time-series in the object, where the zero lag correlation is normalized to be equal to the correlation coefficient between the time-series

Returns :

TimeSeries: A TimeSeries object :

the time-dependent cross-correlation, with zero-lag at time=0