Skip to content

utils

Copyright 2023

Author: Lukas Schweizer schweizer.lukas@web.de

preprocess_data

preprocess_data(
    data,
    nan_values=True,
    one_hot_encoding=False,
    normalization=True,
    categorical_indices=None,
)

This method preprocesses data regarding missing values, categorical features and data normalization (for the kNN Model) :param data: Data to preprocess :param nan_values: Preprocesses nan values if True :param one_hot_encoding: Whether use OHE for categoricals :param normalization: Normalizes data if True :param categorical_indices: Categorical columns of data :return: Preprocessed version of the data