Class: FastICA

FastICA: a fast algorithm for Independent Component Analysis.

The implementation is based on [1].

Read more in the User Guide.

Python Reference

Constructors

new FastICA()

new FastICA(opts?): FastICA

Parameters

ParameterTypeDescription
opts?object-
opts.algorithm?"parallel" | "deflation"Specify which algorithm to use for FastICA.
opts.fun?"logcosh" | "exp" | "cube"The functional form of the G function used in the approximation to neg-entropy. Could be either ‘logcosh’, ‘exp’, or ‘cube’. You can also provide your own function. It should return a tuple containing the value of the function, and of its derivative, in the point. The derivative should be averaged along its last dimension. Example:
opts.fun_args?anyArguments to send to the functional form. If empty or undefined and if fun=’logcosh’, fun_args will take value {‘alpha’ : 1.0}.
opts.max_iter?numberMaximum number of iterations during fit.
opts.n_components?numberNumber of components to use. If undefined is passed, all are used.
opts.random_state?numberUsed to initialize w_init when not specified, with a normal distribution. Pass an int, for reproducible results across multiple function calls. See Glossary.
opts.tol?numberA positive scalar giving the tolerance at which the un-mixing matrix is considered to have converged.
opts.w_init?ArrayLike[]Initial un-mixing array. If w_init=None, then an array of values drawn from a normal distribution is used.
opts.whiten?string | booleanSpecify the whitening strategy to use.
opts.whiten_solver?"svd" | "eigh"The solver to use for whitening.

Returns FastICA

Defined in generated/decomposition/FastICA.ts:25

Properties

PropertyTypeDefault valueDefined in
_isDisposedbooleanfalsegenerated/decomposition/FastICA.ts:23
_isInitializedbooleanfalsegenerated/decomposition/FastICA.ts:22
_pyPythonBridgeundefinedgenerated/decomposition/FastICA.ts:21
idstringundefinedgenerated/decomposition/FastICA.ts:18
optsanyundefinedgenerated/decomposition/FastICA.ts:19

Accessors

components_

Get Signature

get components_(): Promise<ArrayLike[]>

The linear operator to apply to the data to get the independent sources. This is equal to the unmixing matrix when whiten is false, and equal to np.dot(unmixing_matrix, self.whitening_) when whiten is true.

Returns Promise<ArrayLike[]>

Defined in generated/decomposition/FastICA.ts:488


feature_names_in_

Get Signature

get feature_names_in_(): Promise<ArrayLike>

Names of features seen during fit. Defined only when X has feature names that are all strings.

Returns Promise<ArrayLike>

Defined in generated/decomposition/FastICA.ts:581


mean_

Get Signature

get mean_(): Promise<any>

The mean over features. Only set if self.whiten is true.

Returns Promise<any>

Defined in generated/decomposition/FastICA.ts:534


mixing_

Get Signature

get mixing_(): Promise<ArrayLike[]>

The pseudo-inverse of components_. It is the linear operator that maps independent sources to the data.

Returns Promise<ArrayLike[]>

Defined in generated/decomposition/FastICA.ts:511


n_features_in_

Get Signature

get n_features_in_(): Promise<number>

Number of features seen during fit.

Returns Promise<number>

Defined in generated/decomposition/FastICA.ts:556


n_iter_

Get Signature

get n_iter_(): Promise<number>

If the algorithm is “deflation”, n_iter is the maximum number of iterations run across all components. Else they are just the number of iterations taken to converge.

Returns Promise<number>

Defined in generated/decomposition/FastICA.ts:606


py

Get Signature

get py(): PythonBridge

Returns PythonBridge

Set Signature

set py(pythonBridge): void

Parameters

ParameterType
pythonBridgePythonBridge

Returns void

Defined in generated/decomposition/FastICA.ts:92


whitening_

Get Signature

get whitening_(): Promise<ArrayLike[]>

Only set if whiten is ‘true’. This is the pre-whitening matrix that projects data onto the first n_components principal components.

Returns Promise<ArrayLike[]>

Defined in generated/decomposition/FastICA.ts:629

Methods

dispose()

dispose(): Promise<void>

Disposes of the underlying Python resources.

Once dispose() is called, the instance is no longer usable.

Returns Promise<void>

Defined in generated/decomposition/FastICA.ts:143


fit()

fit(opts): Promise<any>

Fit the model to X.

Parameters

ParameterTypeDescription
optsobject-
opts.X?ArrayLike[]Training data, where n_samples is the number of samples and n_features is the number of features.
opts.y?anyNot used, present for API consistency by convention.

Returns Promise<any>

Defined in generated/decomposition/FastICA.ts:160


fit_transform()

fit_transform(opts): Promise<ArrayLike[]>

Fit the model and recover the sources from X.

Parameters

ParameterTypeDescription
optsobject-
opts.X?ArrayLike[]Training data, where n_samples is the number of samples and n_features is the number of features.
opts.y?anyNot used, present for API consistency by convention.

Returns Promise<ArrayLike[]>

Defined in generated/decomposition/FastICA.ts:197


get_feature_names_out()

get_feature_names_out(opts): Promise<any>

Get output feature names for transformation.

The feature names out will prefixed by the lowercased class name. For example, if the transformer outputs 3 features, then the feature names out are: \["class_name0", "class_name1", "class_name2"\].

Parameters

ParameterTypeDescription
optsobject-
opts.input_features?anyOnly used to validate feature names with the names seen in fit.

Returns Promise<any>

Defined in generated/decomposition/FastICA.ts:236


get_metadata_routing()

get_metadata_routing(opts): Promise<any>

Get metadata routing of this object.

Please check User Guide on how the routing mechanism works.

Parameters

ParameterTypeDescription
optsobject-
opts.routing?anyA MetadataRequest encapsulating routing information.

Returns Promise<any>

Defined in generated/decomposition/FastICA.ts:270


init()

init(py): Promise<void>

Initializes the underlying Python resources.

This instance is not usable until the Promise returned by init() resolves.

Parameters

ParameterType
pyPythonBridge

Returns Promise<void>

Defined in generated/decomposition/FastICA.ts:105


inverse_transform()

inverse_transform(opts): Promise<ArrayLike[]>

Transform the sources back to the mixed data (apply mixing matrix).

Parameters

ParameterTypeDescription
optsobject-
opts.copy?booleanIf false, data passed to fit are overwritten. Defaults to true.
opts.X?ArrayLike[]Sources, where n_samples is the number of samples and n_components is the number of components.

Returns Promise<ArrayLike[]>

Defined in generated/decomposition/FastICA.ts:302


set_inverse_transform_request()

set_inverse_transform_request(opts): Promise<any>

Request metadata passed to the inverse_transform method.

Note that this method is only relevant if enable_metadata_routing=True (see sklearn.set_config). Please see User Guide on how the routing mechanism works.

The options for each parameter are:

Parameters

ParameterTypeDescription
optsobject-
opts.copy?string | booleanMetadata routing for copy parameter in inverse_transform.

Returns Promise<any>

Defined in generated/decomposition/FastICA.ts:345


set_output()

set_output(opts): Promise<any>

Set output container.

See Introducing the set_output API for an example on how to use the API.

Parameters

ParameterTypeDescription
optsobject-
opts.transform?"default" | "pandas" | "polars"Configure output of transform and fit_transform.

Returns Promise<any>

Defined in generated/decomposition/FastICA.ts:381


set_transform_request()

set_transform_request(opts): Promise<any>

Request metadata passed to the transform method.

Note that this method is only relevant if enable_metadata_routing=True (see sklearn.set_config). Please see User Guide on how the routing mechanism works.

The options for each parameter are:

Parameters

ParameterTypeDescription
optsobject-
opts.copy?string | booleanMetadata routing for copy parameter in transform.

Returns Promise<any>

Defined in generated/decomposition/FastICA.ts:417


transform()

transform(opts): Promise<ArrayLike[]>

Recover the sources from X (apply the unmixing matrix).

Parameters

ParameterTypeDescription
optsobject-
opts.copy?booleanIf false, data passed to fit can be overwritten. Defaults to true.
opts.X?ArrayLike[]Data to transform, where n_samples is the number of samples and n_features is the number of features.

Returns Promise<ArrayLike[]>

Defined in generated/decomposition/FastICA.ts:449