a guest Oct 23rd, 2019 82 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
- def focal_loss_lgb_f1_score(preds, lgbDataset):
- preds = sigmoid(preds)
- binary_preds = [int(p>0.5) for p in preds]
- y_true = lgbDataset.get_label()
- return 'f1', f1_score(y_true, binary_preds), True
RAW Paste Data