# ---
# jupyter:
#   jupytext:
#     text_representation:
#       extension: .py
#       format_name: light
#       format_version: '1.5'
#       jupytext_version: 1.14.4
#   kernelspec:
#     display_name: Python 3
#     language: python
#     name: python3
# ---

# ## Imports

import pandas as pd
import fklearn as fk
import numpy as np
import seaborn as sns
from matplotlib import pyplot as plt
from common_models_storage import load, load_dataframe, save

# ## Lendo o dataset relevante

policy_input_dataset = load_dataframe("data/policy_dataset.csv")

policy_input_dataset.columns

policy_dataset.head(50)

# +
target_columns = ["target_defaults", "spend"]
prediction_columns = ["risk_prediction", "spend_prediction"]
acq_info = ['score_1', 'score_2', 'score_3',
       'score_4', 'score_5', 'score_6', 'risk_rate', 'last_amount_borrowed',
       'last_borrowed_in_months', 'credit_limit', 'reason', 'income',
       'facebook_profile', 'state', 'zip', 'channel', 'job_name', 'real_state',
       'ok_since', 'n_bankruptcies', 'n_defaulted_loans', 'n_accounts',
       'n_issues', 'application_time_applied', 'application_time_in_funnel',
       'email', 'external_data_provider_credit_checks_last_2_year',
       'external_data_provider_credit_checks_last_month',
       'external_data_provider_credit_checks_last_year',
       'external_data_provider_email_seen_before',
       'external_data_provider_first_name',
       'external_data_provider_fraud_score', 'lat_lon', 'marketing_channel',
       'profile_phone_number', 'reported_income', 'shipping_state',
       'shipping_zip_code', 'profile_tags', 'user_agent', 'pii_cpf']

credit_card_info = ['credit_line', 'revolving_balance']


# -

# ## Calcular o valor de um cliente, qual a receita real de um cliente individual?

# ## Criar uma regra de aprovação
#
# Lembrar dos exemplos de aula: threshold, grupos, calibração

# ## Simular as decisões a partir da regra decidida
#
# Ver quem seria aprovado ou não
#
# Ver qual seria o lucro da decisão 



StarcoderdataJupyterScriptsDedupFiltered