Skip to content

Welcome to the bokbokbok doks!

bokbokbok is a Python library that lets us easily implement custom loss functions and eval metrics in LightGBM and XGBoost.

Example Usage - Weighted Cross Entropy

clf = lgb.train(params=params,
                train_set=train,
                valid_sets=[train, valid],
                valid_names=['train','valid'],
                fobj=WeightedCrossEntropyLoss(alpha=alpha),
                feval=WeightedCrossEntropyMetric(alpha=alpha),
                early_stopping_rounds=100)

Licence

bokbokbok is created under the MIT License, see more in the LICENSE file