frites.core.gccmi_model_nd_cdnd#

frites.core.gccmi_model_nd_cdnd(x, y, *z, mvaxis=None, traxis=- 1, gcrn=True, shape_checking=True)[source]#

Conditional GCMI between a continuous and a discret variable.

This function performs a GC-CMI between a continuous and a discret variable conditioned with multiple discrete variables.

Parameters
xnumpy:array_like

Continuous variable

ynumpy:array_like

Discret variable

zpython:list | numpy:array_like

Array that describes the conditions across the trial axis. Should be a list of arrays of shape (n_trials,) of integers (e.g. [0, 0, …, 1, 1, 2, 2])

mvaxispython:int | python:None

Spatial location of the axis to consider if multi-variate analysis is needed

traxispython:int | -1

Spatial location of the trial axis. By default the last axis is considered

gcrnbool | python:True

Apply a Gaussian Copula rank normalization. This operation is relatively slow for big arrays.

shape_checkingbool | python:True

Perform a reshape and check that x and y shapes are consistents. For high performances and to avoid extensive memory usage, it’s better to already have x and y with a shape of (…, mvaxis, traxis) and to set this parameter to False

Returns
cminumpy:array_like

Conditional mutual-information with the same shape as x and y without the mvaxis and traxis