All Projects → wepe → Tgboost

wepe / Tgboost

Licence: mit
Tiny Gradient Boosting Tree

Programming Languages

java
68154 projects - #9 most used programming language

Projects that are alternatives of or similar to Tgboost

Kaggle-Competition-Sberbank
Top 1% rankings (22/3270) code sharing for Kaggle competition Sberbank Russian Housing Market: https://www.kaggle.com/c/sberbank-russian-housing-market
Stars: ✭ 31 (-89.74%)
Mutual labels:  xgboost
Arch-Data-Science
Archlinux PKGBUILDs for Data Science, Machine Learning, Deep Learning, NLP and Computer Vision
Stars: ✭ 92 (-69.54%)
Mutual labels:  xgboost
diabetes use case
Sample use case for Xavier AI in Healthcare conference: https://www.xavierhealth.org/ai-summit-day2/
Stars: ✭ 22 (-92.72%)
Mutual labels:  xgboost
xgboost-lightgbm-hyperparameter-tuning
Bayesian Optimization and Grid Search for xgboost/lightgbm
Stars: ✭ 40 (-86.75%)
Mutual labels:  xgboost
target-and-market
A data-driven tool to identify the best candidates for a marketing campaign and optimize it.
Stars: ✭ 19 (-93.71%)
Mutual labels:  xgboost
HumanOrRobot
a solution for competition of kaggle `Human or Robot`
Stars: ✭ 16 (-94.7%)
Mutual labels:  xgboost
secure-xgboost
Secure collaborative training and inference for XGBoost.
Stars: ✭ 80 (-73.51%)
Mutual labels:  xgboost
Leaves
pure Go implementation of prediction part for GBRT (Gradient Boosting Regression Trees) models from popular frameworks
Stars: ✭ 261 (-13.58%)
Mutual labels:  xgboost
ai-deployment
关注AI模型上线、模型部署
Stars: ✭ 149 (-50.66%)
Mutual labels:  xgboost
HyperGBM
A full pipeline AutoML tool for tabular data
Stars: ✭ 172 (-43.05%)
Mutual labels:  xgboost
featurewiz
Use advanced feature engineering strategies and select best features from your data set with a single line of code.
Stars: ✭ 229 (-24.17%)
Mutual labels:  xgboost
kaggle-code
A repository for some of the code I used in kaggle data science & machine learning tasks.
Stars: ✭ 100 (-66.89%)
Mutual labels:  xgboost
XGBoostLSS
An extension of XGBoost to probabilistic forecasting
Stars: ✭ 182 (-39.74%)
Mutual labels:  xgboost
Tencent2017 Final Rank28 code
2017第一届腾讯社交广告高校算法大赛Rank28_code
Stars: ✭ 85 (-71.85%)
Mutual labels:  xgboost
HousePrice
住房月租金预测大数据赛TOP1
Stars: ✭ 17 (-94.37%)
Mutual labels:  xgboost
kaggle getting started
Kaggle getting started competition examples
Stars: ✭ 18 (-94.04%)
Mutual labels:  xgboost
Calibrated-Boosting-Forest
Original implementation of Calibrated Boosting-Forest
Stars: ✭ 18 (-94.04%)
Mutual labels:  xgboost
My Data Competition Experience
本人多次机器学习与大数据竞赛Top5的经验总结,满满的干货,拿好不谢
Stars: ✭ 271 (-10.26%)
Mutual labels:  xgboost
Time Series Machine Learning
Machine learning models for time series analysis
Stars: ✭ 261 (-13.58%)
Mutual labels:  xgboost
aws-lambda-docker-serverless-inference
Serve scikit-learn, XGBoost, TensorFlow, and PyTorch models with AWS Lambda container images support.
Stars: ✭ 56 (-81.46%)
Mutual labels:  xgboost

What is TGBoost

It is a Tiny implement of Gradient Boosting tree, based on XGBoost's scoring function and SLIQ's efficient tree building algorithm. TGBoost build the tree in a level-wise way as in SLIQ (by constructing Attribute list and Class list). Currently, TGBoost support parallel learning on single machine, the speed and memory consumption are comparable to XGBoost.

TGBoost supports most features as other library:

  • Built-in loss , Square error loss for regression task, Logistic loss for classification task

  • Early stopping , evaluate on validation set and conduct early stopping

  • Feature importance , output the feature importance after training

  • Regularization , lambda, gamma

  • Randomness, subsample,colsample

  • Weighted loss function , assign weight to each sample

Another two features are novel:

  • Handle missing value, XGBoost learn a direction for those with missing value, the direction is left or right. TGBoost take a different approach: it enumerate missing value go to left child, right child and missing value child, then choose the best one. So TGBoost use Ternary Tree.

  • Handle categorical feature, TGBoost order the categorical feature by their statistic (Gradient_sum / Hessian_sum) on each tree node, then conduct split finding as numeric feature.

Installation

The current version is implemented in pure Java, to use TGBoost you should first install JDK. For Python user, Python binding is also provided:

git clone [email protected]:wepe/tgboost.git
cd python-package
sudo python setup.py install

To Understand TGBoost

For those want to understand how TGBoost work, and dive into Gradient Boosting Machine, please refer to the Python implementation of TGBoost: tgboost-python, the python source code is relatively easy to follow.

Example

Here is an example, download the data here

import tgboost as tgb

# training phase
ftrain = "data/train.csv"
fval = "data/val.csv"
params = {'categorical_features': ["PRI_jet_num"],
          'early_stopping_rounds': 10,
          'maximize': True,
          'eval_metric': 'auc',
          'loss': 'logloss',
          'eta': 0.3,
          'num_boost_round': 20,
          'max_depth': 7,
          'scale_pos_weight':1.,
          'subsample': 0.8,
          'colsample': 0.8,
          'min_child_weight': 1.,
          'min_sample_split': 5,
          'reg_lambda': 1.,
          'gamma': 0.,
          'num_thread': -1
          }

model = tgb.train(ftrain, fval, params)

# testing phase
ftest = "data/test.csv"
foutput = "data/test_preds.csv"
model.predict(ftest, foutput)

# save the model
model.save('./tgb.model')

# load model and predict
model = tgb.load_model('./tgb.model')
model.predict(ftest, foutput)

Reference

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].