cuvis_ai.preprocessor.sklearn_wrapped.NMF

class cuvis_ai.preprocessor.sklearn_wrapped.NMF(n_components='auto', *, init=None, solver='cd', beta_loss='frobenius', tol=0.0001, max_iter=200, random_state=None, alpha_W=0.0, alpha_H='same', l1_ratio=0.0, verbose=0, shuffle=False)[source]

Bases: Node, Preprocessor, SklearnWrapped

__init__(n_components='auto', *, init=None, solver='cd', beta_loss='frobenius', tol=0.0001, max_iter=200, random_state=None, alpha_W=0.0, alpha_H='same', l1_ratio=0.0, verbose=0, shuffle=False)[source]

Methods

__init__([n_components, init, solver, ...])

check_input_dim(X)

Check that the parameters for the input data data match user expectations

check_output_dim(X)

Check that the parameters for the output data data match user expectations

fit(X[, warm_start])

Fit the preprocessor to the data.

forward(X)

Transform the input data.

get_fit_requested_meta()

get_forward_requested_meta()

load(params, data_dir)

Load from serialized format into an object

serialize(data_dir)

Convert the class into a serialized representation

set_fit_meta_request(**kwargs)

set_forward_meta_request(**kwargs)

Attributes

input_dim

Returns the needed shape for the input data.

output_dim

Returns the shape for the output data.

check_input_dim(X)

Check that the parameters for the input data data match user expectations

Parameters: X (array-like): Input data.

Returns: (Bool) Valid data

check_output_dim(X)

Check that the parameters for the output data data match user expectations

Parameters: X (array-like): Input data.

Returns: (Bool) Valid data

fit(X: ndarray, warm_start=False)

Fit the preprocessor to the data.

Parameters:

X (array-like) – Input data.

Return type:

self

forward(X: ndarray)

Transform the input data.

Parameters: X (array-like): Input data.

Returns: Transformed data.

get_fit_requested_meta()
get_forward_requested_meta()
property input_dim

Returns the needed shape for the input data. If a dimension is not important, it will return -1 in the specific position.

Returns: (tuple) needed shape for data

load(params: dict, data_dir: Path) None

Load from serialized format into an object

property output_dim

Returns the shape for the output data. If a dimension is dependent on the input, it will return -1 in the specific position.

Returns: (tuple) expected output shape for data

serialize(data_dir: Path) dict

Convert the class into a serialized representation

set_fit_meta_request(**kwargs)
set_forward_meta_request(**kwargs)