ezmsg.learn.model.cca#

Classes

class IncrementalCCA(n_components=2, base_smoothing=0.95, min_smoothing=0.5, max_smoothing=0.99, adaptation_rate=0.1)[source]#

Bases: object

__init__(n_components=2, base_smoothing=0.95, min_smoothing=0.5, max_smoothing=0.99, adaptation_rate=0.1)[source]#

Parameters:#

n_componentsint

Number of canonical components to compute

base_smoothingfloat

Base smoothing factor (will be adapted)

min_smoothingfloat

Minimum allowed smoothing factor

max_smoothingfloat

Maximum allowed smoothing factor

adaptation_ratefloat

How quickly to adjust smoothing factor (between 0 and 1)

initialize(d1, d2)[source]#

Initialize the necessary matrices

partial_fit(X1, X2, update_projections=True)[source]#

Update the model with new samples using adaptive smoothing Assumes X1 and X2 are already centered and scaled

transform(X1, X2)[source]#

Project data onto canonical components

class IncrementalCCA(n_components=2, base_smoothing=0.95, min_smoothing=0.5, max_smoothing=0.99, adaptation_rate=0.1)[source]#

Bases: object

__init__(n_components=2, base_smoothing=0.95, min_smoothing=0.5, max_smoothing=0.99, adaptation_rate=0.1)[source]#

Parameters:#

n_componentsint

Number of canonical components to compute

base_smoothingfloat

Base smoothing factor (will be adapted)

min_smoothingfloat

Minimum allowed smoothing factor

max_smoothingfloat

Maximum allowed smoothing factor

adaptation_ratefloat

How quickly to adjust smoothing factor (between 0 and 1)

initialize(d1, d2)[source]#

Initialize the necessary matrices

partial_fit(X1, X2, update_projections=True)[source]#

Update the model with new samples using adaptive smoothing Assumes X1 and X2 are already centered and scaled

transform(X1, X2)[source]#

Project data onto canonical components