This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import pandas as pd | |
| import numpy as np | |
| from custom_code import timefold | |
| from sklearn import preprocessing | |
| def target_encoder(df, column, target, index=None, method='mean'): | |
| """ | |
| Target-based encoding is numerization of a categorical variables via the target variable. Main purpose is to deal |