orchardbirds / bokbokbok Goto Github PK
View Code? Open in Web Editor NEWCustom Loss Functions and Evaluation Metrics for XGBoost and LightGBM
Home Page: https://orchardbirds.github.io/bokbokbok/
License: MIT License
Custom Loss Functions and Evaluation Metrics for XGBoost and LightGBM
Home Page: https://orchardbirds.github.io/bokbokbok/
License: MIT License
When alpha = 1
for WCE, it is better to use in-built Cross Entropy in LightGBM. Add warning for this
If we use a custom classifier metric, but a regular loss function, then we need to disable the sigmoid as it's automatically applied. Should do something like
def weighted_cross_entropy_metric(yhat, dtrain, alpha=alpha, XGBoost=XGBoost, eval_only=eval_only):
y = dtrain.get_label()
if not eval_only:
yhat = clip_sigmoid(yhat)
Create a function that uses this
yhat = 1. / (1. + np.exp(-yhat))
yhat[yhat >= 1] = 1 - 1e-6
yhat[yhat <= 0] = 1e-6
instead of copy pasting a milllion times
Currently bokbokbok implements the loss functions to be used in the python api of the main gradient boosting packages.
However, it would be very convenient to add also a version compatible with the sklearn API those packages.
The convention is as follows:
my_amazing_loss_function(y_true, y_pred):
... do my magic
return grad, hess
Do you agree @orchardbirds ?
WCE is wrong,
FL needs simplifying
Add quadratic weighted kappa loss function for multi-class classification problems with categorical ordinal output.
Potential code implementation: https://www.kaggle.com/chenglongchen/customized-softkappa-loss-in-xgboost
set alpha=1
for WCE. If it does not equal binary log loss, figure out why
We want to be able to do .fit()
instead of .train()
damn pycache
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.