tclf.TemplateTransformer

class tclf.TemplateTransformer(demo_param='demo')[source]

An example transformer that returns the element-wise square root.

For more information regarding how to build your own transformer, read more in the User Guide.

Parameters:
demo_paramstr, default=’demo’

A parameter used for demonstation of how to pass and store paramters.

Attributes:
n_features_int

The number of features of the data passed to fit().

__init__(demo_param='demo')[source]
fit(X, y=None)[source]

A reference implementation of a fitting function for a transformer.

Parameters:
X{array-like, sparse matrix}, shape (n_samples, n_features)

The training input samples.

yNone

There is no need of a target in a transformer, yet the pipeline API requires this parameter.

Returns:
selfobject

Returns self.

transform(X)[source]

A reference implementation of a transform function.

Parameters:
X{array-like, sparse-matrix}, shape (n_samples, n_features)

The input samples.

Returns:
X_transformedarray, shape (n_samples, n_features)

The array containing the element-wise square roots of the values in X.

Examples using tclf.TemplateTransformer

Plotting Template Transformer

Plotting Template Transformer