def ka_erfinv_rank_transform(x):
'''
This is used on numeric variable, after doing this operation, one should do MM and SS on all dataset.
'''
mm = MinMaxScaler()
tmp = erfinv(np.clip(np.squeeze(mm.fit_transform(rankdata(x).reshape(-1,1))), 0, 0.999999999))
tmp = tmp - np.mean(tmp)
return tmp
评论列表
文章目录