{"id":13531929,"url":"https://github.com/pfnet-research/autogbt-alt","last_synced_at":"2025-04-13T10:26:52.173Z","repository":{"id":86582985,"uuid":"178793542","full_name":"pfnet-research/autogbt-alt","owner":"pfnet-research","description":"An experimental Python package that reimplements AutoGBT using LightGBM and Optuna.","archived":false,"fork":false,"pushed_at":"2019-04-01T06:05:28.000Z","size":175,"stargazers_count":82,"open_issues_count":0,"forks_count":11,"subscribers_count":19,"default_branch":"master","last_synced_at":"2025-03-27T01:51:25.842Z","etag":null,"topics":["automl","gradient-boosting","kaggle","lightgbm","machine-learning","python"],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/pfnet-research.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2019-04-01T05:45:06.000Z","updated_at":"2024-01-04T16:32:22.000Z","dependencies_parsed_at":null,"dependency_job_id":"8f84ee28-87f9-4697-84f1-9247bbcb64b8","html_url":"https://github.com/pfnet-research/autogbt-alt","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pfnet-research%2Fautogbt-alt","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pfnet-research%2Fautogbt-alt/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pfnet-research%2Fautogbt-alt/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pfnet-research%2Fautogbt-alt/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pfnet-research","download_url":"https://codeload.github.com/pfnet-research/autogbt-alt/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248697354,"owners_count":21147313,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["automl","gradient-boosting","kaggle","lightgbm","machine-learning","python"],"created_at":"2024-08-01T07:01:06.981Z","updated_at":"2025-04-13T10:26:52.140Z","avatar_url":"https://github.com/pfnet-research.png","language":"Python","funding_links":[],"categories":["Uncategorized","Projects","Python"],"sub_categories":["Uncategorized","Distributed Frameworks"],"readme":"## About\n\nThis is an experimental Python package that reimplements [AutoGBT](https://github.com/flytxtds/AutoGBT) using [LightGBM](https://github.com/Microsoft/LightGBM) and [Optuna](https://github.com/pfnet/optuna/). AutoGBT is an automatically tuned machine learning classifier which won the first prize at [NeurIPS'18 AutoML Challenge](https://competitions.codalab.org/competitions/19836). AutoGBT has the following features:\n\n* Automatic Hyperparameter Tuning: the hyperparameters of LightGBM are automatically optimized,\n* Automatic Feature Engineering: simple feature engineering is applied for categorical and datetime features, and\n* Automatic Sampling: data rows are sampled for handling imbalanced and large datasets.\n\nThis implementation has the following differences from original AutoGBT:\n\n1. This implementation uses Optuna for the hyperparameter tuning of LightGBM instead of [Hyperopt](https://github.com/hyperopt/hyperopt),\n1. it optimizes k-fold cross-validation AUC score, and\n1. it equips simplified scikit-learn-like API interface.\n\n## Installation\n\n```\n$ pip install git+https://github.com/pfnet-research/autogbt-alt.git\n```\nor\n```\n$ pip install git+ssh://git@github.com/pfnet-research/autogbt-alt.git\n```\n\n## Usage\n\n### Basic Usage: LightGBM with Automatic Hyperparameter Tuning\n\n```python3\nfrom sklearn.datasets import load_breast_cancer\nfrom sklearn.model_selection import train_test_split\nfrom sklearn.metrics import roc_auc_score\nfrom autogbt import AutoGBTClassifier\n\nX, y = load_breast_cancer(return_X_y=True)\ntrain_X, valid_X, train_y, valid_y = train_test_split(X, y, test_size=0.1)\nmodel = AutoGBTClassifier()\nmodel.fit(train_X, train_y)\nprint('valid AUC: %.3f' % (roc_auc_score(valid_y, model.predict(valid_X))))\nprint('CV AUC: %.3f' % (model.best_score))\n```\n\n### Feature Engineering\n\n```python3\nfrom autogbt import Preprocessor\n\npreprocessor = Preprocessor(train_frac=0.5, test_frac=0.5)\ntrain_X, valid_X, train_y = preprocessor.transform(train_X, valid_X, train_y)\n```\n\n### Training with Sampling\n\n```python3\nfrom autogbt import TrainDataSampler\n\nsampler = TrainDataSampler(train_frac=0.5, valid_frac=0.5)\nmodel = AutoGBTClassifier(sampler=sampler)\nmodel.fit(train_X, train_y)\nmodel.predict(test_X)\n```\n\n## Experimental Evaluation\n\nPlease see `benchmark` directory for the details.\n\n### Comparison against Vanilla XGBoost and LightGBM\n\nThe default values are used for all hyperparameters of AutoGBT, XGBoost and LightGBM.\n\n#### [Airline Dataset](https://www.openml.org/d/1240)\n\n| model    | duration[s]      | CV AUC      |\n|:---------|:-----------------|:------------|\n| AutoGBT  | 6515.254±340.231 | 0.900±0.001 |\n| Xgboost  | 78.561±7.265     | 0.872±0.000 |\n| LightGBM | 34.000±2.285     | 0.891±0.000 |\n\n#### [Amazon Challenge](https://www.kaggle.com/c/amazon-employee-access-challenge)\n\n| model    | duration[s]    | CV AUC      |\n|:---------|:---------------|:------------|\n| AutoGBT  | 359.834±29.188 | 0.832±0.002 |\n| Xgboost  | 2.558±0.661    | 0.749±0.002 |\n| LightGBM | 1.789±0.165    | 0.834±0.002 |\n\n#### [Avazu CTR Prediction](https://www.kaggle.com/c/avazu-ctr-prediction)\n\n| model    | duration[s]       | CV AUC      |\n|:---------|:------------------|:------------|\n| AutoGBT  | 20322.601±676.702 | 0.744±0.000 |\n| Xgboost  | OoM               | OoM         |\n| LightGBM | OoM               | OoM         |\n\n#### [Bank Marketing Data Set](https://archive.ics.uci.edu/ml/datasets/bank+marketing)\n\n| model    | duration[s]    | CV AUC      |\n|:---------|:---------------|:------------|\n| AutoGBT  | 372.090±32.857 | 0.925±0.001 |\n| Xgboost  | 2.683±0.204    | 0.912±0.001 |\n| LightGBM | 2.406±0.236    | 0.927±0.001 |\n\n### Parameter Comparison\n\nPerformance on various `train_frac` and `n_trials` parameters\n\n![](./assets/param-airline.png)\n![](./assets/param-amazon.png)\n![](./assets/param-bank.png)\n\n## Testing\n\n```\n$ ./test.sh\n```\n\n## Reference\n\nJobin Wilson and Amit Kumar Meher and Bivin Vinodkumar Bindu and Manoj Sharma and Vishakha Pareek and Santanu Chaudhury and Brejesh Lall, **AutoGBT: Automatically Optimized Gradient Boosting Trees for Classifying Large Volume High Cardinality Data Streams under Concept-Drift,** 2018, https://github.com/flytxtds/AutoGBT.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpfnet-research%2Fautogbt-alt","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpfnet-research%2Fautogbt-alt","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpfnet-research%2Fautogbt-alt/lists"}