NumericalEncoder currently encodes categories to integers, without considering the integer type. Downcasting integers to int8 or int16 when possible could sometimes significantly reduce memory and avoid some memory overhead.
import pandas as pd
from aikit.transformers import NumericalEncoder
df = pd.DataFrame(data={'a': ['a', 'b', 'c'] * 1000})
x = NumericalEncoder().fit_transform(df)
x.dtypes
NumericalEncoder currently encodes categories to integers, without considering the integer type. Downcasting integers to int8 or int16 when possible could sometimes significantly reduce memory and avoid some memory overhead.