vastorbit.machine_learning.memmodel.preprocessing.OneHotEncoder.transform_sql¶
- OneHotEncoder.transform_sql(X: Annotated[list | ndarray, 'Array Like Structure']) list[str]¶
Transforms and returns the SQL needed to deploy the
Scaler.- Parameters:
X (ArrayLike) – The names or values of the input predictors.
- Returns:
SQL code.
- Return type:
list
Examples
Import the required module.
from vastorbit.machine_learning.memmodel.preprocessing import OneHotEncoder
Let’s create a model.
model_ohe = OneHotEncoder( categories = [["male", "female"], [1, 2, 3]], drop_first = False, column_naming = None, )
Let’s use the following column names:
cnames = ['sex', 'pclass']
Get the SQL code needed to deploy the model.
model_ohe.transform_sql(cnames)
Note
Refer to
OneHotEncoderfor more information about the different methods and usages.