analysis.correlation

Module: analysis.correlation

Inheritance diagram for nitime.analysis.correlation:

Inheritance diagram of nitime.analysis.correlation

Classes

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

Attributes

Methods

__init__(input=None)
Parameters:

input : TimeSeries object

Containing the data to analyze.

Examples

>>> np.set_printoptions(precision=4)  # for doctesting
>>> 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.141592653... Hz
>>> c1.xcorr.t0  
-15.91549430915... s
corrcoef()

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

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

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

SeedCorrelationAnalyzer

class nitime.analysis.correlation.SeedCorrelationAnalyzer(seed_time_series=None, target_time_series=None)

Bases: object

This analyzer takes two time-series. The first is designated as a time-series of seeds. The other is designated as a time-series of targets. The analyzer performs a correlation analysis between each of the channels in the seed time-series and all of the channels in the target time-series.

Methods

__init__(seed_time_series=None, target_time_series=None)
Parameters:

seed_time_series : a TimeSeries object

target_time_series : a TimeSeries object

corrcoef()