example 1¶
import pandas as pd
import numpy as np
data = pd.read_csv('refs/two_class_example.csv')
路径也支持联想输入
data.describe().pipe(print)
data.count().pipe(print)
y=1
判断为好人,相应地,yhat
普遍会高。
data["good"] = data.y
data["bad"] = 1 - data.y
data["score"] = data.yhat
summary(data, n_group = 10)
example 2¶
import pandas as pd
import numpy as np
from sklearn.metrics import roc_curve
import matplotlib.pyplot as plt
data = pd.read_csv('refs/two_class_example.csv')