Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Select an option

  • Save GabrielSGoncalves/b7a171833c77bef51a65ef4602cbb442 to your computer and use it in GitHub Desktop.

Select an option

Save GabrielSGoncalves/b7a171833c77bef51a65ef4602cbb442 to your computer and use it in GitHub Desktop.
import pandas as pd
from optbinning import Scorecard, BinningProcess
from sklearn.model_selection import train_test_split
from sklearn.linear_model import LogisticRegression
# Load the train dataset
df_application = pd.read_csv('./home-credit-default-risk/application_train.csv', low_memory=True)
df_application.set_index('SK_ID_CURR', inplace=True)
# Split the dataset into train and test
df_application_train, df_application_test, y_train, y_test = train_test_split(
df_application, df_application.TARGET, test_size=0.2, random_state=42)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment