Note

This page is a reference documentation. It only explains the class signature, and not how to use it. Please refer to the user guide for the big picture.

3.3.3. fmralign.alignment_methods.ScaledOrthogonalAlignment

class fmralign.alignment_methods.ScaledOrthogonalAlignment(scaling=True)[source]

Compute a orthogonal mixing matrix R and a scaling sc such that Frobenius norm ||sc RX - Y||^2 is minimized.

Parameters

scaling : boolean, optional

Determines whether a scaling parameter is applied to improve transform.

Attributes

R

(ndarray (n_features, n_features)) Optimal orthogonal transform

__init__(scaling=True)[source]

Initialize self. See help(type(self)) for accurate signature.

fit(X, Y)[source]

Fit orthogonal R s.t. ||sc XR - Y||^2

Parameters

X: (n_samples, n_features) nd array

source data

Y: (n_samples, n_features) nd array

target data

fit_transform(X, y=None, **fit_params)

Fit to data, then transform it.

Fits transformer to X and y with optional parameters fit_params and returns a transformed version of X.

Parameters

X : numpy array of shape [n_samples, n_features]

Training set.

y : numpy array of shape [n_samples]

Target values.

Returns

X_new : numpy array of shape [n_samples, n_features_new]

Transformed array.

get_params(deep=True)

Get parameters for this estimator.

Parameters

deep : boolean, optional

If True, will return the parameters for this estimator and contained subobjects that are estimators.

Returns

params : mapping of string to any

Parameter names mapped to their values.

set_params(**params)

Set the parameters of this estimator.

The method works on simple estimators as well as on nested objects (such as pipelines). The latter have parameters of the form <component>__<parameter> so that it’s possible to update each component of a nested object.

Returns

self

transform(X)[source]

Transform X using optimal transform computed during fit.