Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save GabrielSGoncalves/f3dc8690a0cd277e87a6a28c26a1c3d0 to your computer and use it in GitHub Desktop.
Save GabrielSGoncalves/f3dc8690a0cd277e87a6a28c26a1c3d0 to your computer and use it in GitHub Desktop.
# Define the feature list from dataset (including categorical and numerical)
list_features = df_application_train.drop(columns=['TARGET']).columns.values
# Define categorical features list
list_categorical = df_application_train.select_dtypes(include=['object', 'category']).columns.values
# Define selection criteria for BinningProcess
selection_criteria = {"iv": {"min": 0.005, 'max':0.5, "strategy": "highest"}}
# Instatiate BinningProcess
binning_process = BinningProcess(
categorical_variables=list_categorical,
variable_names=list_features,
selection_criteria=selection_criteria,
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment