Skip to content

Instantly share code, notes, and snippets.

View Secbone's full-sized avatar
👀
Looking for a good job

Secbone Secbone

👀
Looking for a good job
View GitHub Profile
@Secbone
Secbone / chimerge.py
Last active November 1, 2018 08:16
Implement ChiMerge [1992] via python
import numpy as np
def ChiMerge(feature, target, n_bins = None, min_samples = None, min_threshold = None):
"""Chi-Merge
Author:
Secbone <secbone@gmail.com>
Args:
@Secbone
Secbone / ks.py
Created April 11, 2018 02:45
calculating KS value for finance
import numpy as np
import pandas as pd
def KS(score, target, bucket = 10):
"""calculating KS value
Args:
score (list): a list of scores predicted by model
target (list): a list of [0, 1], 1 means bad and 0 means good
bucket (number): how many bucket will be parted in

Keybase proof

I hereby claim:

  • I am Secbone on github.
  • I am secbone (https://keybase.io/secbone) on keybase.
  • I have a public key whose fingerprint is 36A3 591C 0247 D047 AAD9 FB60 FC31 17B5 4B50 EFBD

To claim this, I am signing this object: