Loading...

verticapy.machine_learning.memmodel.preprocessing.StandardScaler.transform

StandardScaler.transform(X: Annotated[list | ndarray, 'Array Like Structure']) ndarray

Transforms and applies the Scaler model to the input matrix.

Parameters

X: ArrayLike

The data on which to make the transformation.

Returns

numpy.array

Transformed values.

Examples

Import the required module.

from verticapy.machine_learning.memmodel.preprocessing import StandardScaler

We will use the following attributes:

mean = [0.4, 0.1]

std = [0.5, 0.2]

Let’s create a model.

model_sts = StandardScaler(mean, std)

Create a dataset.

data = [[0.45, 0.17]]

Transform the data.

model_sts.transform(data)
Out[26]: array([[0.1 , 0.35]])

Important

For this example, a specific model is utilized, and it may not correspond exactly to the model you are working with. To see a comprehensive example specific to your class of interest, please refer to that particular class.