{"id":40742899,"url":"https://github.com/zouzias/microgbt","last_synced_at":"2026-01-21T15:09:25.922Z","repository":{"id":150927992,"uuid":"191039777","full_name":"zouzias/microgbt","owner":"zouzias","description":"microGBT is a minimalistic Gradient Boosting Trees implementation","archived":false,"fork":false,"pushed_at":"2024-11-17T00:35:42.000Z","size":694,"stargazers_count":1,"open_issues_count":7,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-11-17T01:21:29.942Z","etag":null,"topics":["cpp11","gradient-boosting","gradient-boosting-decision-trees","xgboost-algorithm"],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/zouzias.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,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-06-09T18:13:11.000Z","updated_at":"2024-11-17T00:35:45.000Z","dependencies_parsed_at":"2023-05-05T15:30:27.138Z","dependency_job_id":null,"html_url":"https://github.com/zouzias/microgbt","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/zouzias/microgbt","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zouzias%2Fmicrogbt","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zouzias%2Fmicrogbt/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zouzias%2Fmicrogbt/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zouzias%2Fmicrogbt/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zouzias","download_url":"https://codeload.github.com/zouzias/microgbt/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zouzias%2Fmicrogbt/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28635123,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-21T14:50:40.221Z","status":"ssl_error","status_checked_at":"2026-01-21T14:48:59.225Z","response_time":86,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["cpp11","gradient-boosting","gradient-boosting-decision-trees","xgboost-algorithm"],"created_at":"2026-01-21T15:09:25.841Z","updated_at":"2026-01-21T15:09:25.916Z","avatar_url":"https://github.com/zouzias.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Codacy Badge](https://api.codacy.com/project/badge/Grade/3d452726865644cfa66435499b083722)](https://app.codacy.com/manual/zouzias/microgbt?utm_source=github.com\u0026utm_medium=referral\u0026utm_content=zouzias/microgbt\u0026utm_campaign=Badge_Grade_Settings)\n[![Build Status](https://travis-ci.org/zouzias/microgbt.svg?branch=master)](https://travis-ci.org/zouzias/microgbt/builds)\n[![Coverage Status](https://coveralls.io/repos/github/zouzias/microgbt/badge.svg?branch=master)](https://coveralls.io/github/zouzias/microgbt?branch=master)\n[![License](https://img.shields.io/badge/license-Apache-blue.svg)](LICENSE)\n\n\n# microGBT\n\nmicroGBT is a minimalistic ([606 LOC](NOTES.md)) Gradient Boosting Trees implementation in C++11 following [xgboost's paper](https://arxiv.org/abs/1603.02754), i.e., the tree building process is based on the gradient and Hessian vectors (Newton-Raphson method).\n\nA minimalist Python API is available using [pybind11](https://github.com/pybind/pybind11). To use it,\n\n```python\nimport microgbtpy\n\nparams = {\n    \"gamma\": 0.1,\n    \"lambda\": 1.0,\n    \"max_depth\": 4.0,\n    \"shrinkage_rate\": 1.0,\n    \"min_split_gain\": 0.1,\n    \"learning_rate\": 0.1,\n    \"min_tree_size\": 3,\n    \"num_boosting_rounds\": 100.0,\n    \"metric\": 0.0\n}\n\ngbt = microgbtpy.GBT(params)\n\n# Training\ngbt.train(X_train, y_train, X_valid, y_valid, num_iters, early_stopping_rounds)\n\n# Predict\ny_pred = gbt.predict(x, gbt.best_iteration())\n```\n## Goals\n\nThe main goal of the project is to be educational and provide a minimalistic codebase that allows experimentation with Gradient Boosting Trees.\n\n## Features\n\nCurrently, the following loss functions are supported:\n* Logistic loss for binary classification, `logloss.h`\n* Root Mean Squared Error (RMSE) for regression, `rmse.h`\n\nSet the parameter `metric` to 0.0 and 1.0 for logistic regression and RMSE, respectively.\n\n## Installation\nTo install locally\n```bash\npip install git+https://github.com/zouzias/microgbt.git\n```\n\nThen, follow the instructions to run the titanic classification dataset.\n## Development (docker)\n\n```bash\ngit clone https://github.com/zouzias/microgbt.git\ncd microgbt\ndocker-compose build microgbt\ndocker-compose run microgbt\n./runBuild\n\n```\n\n### Binary Classification (Titanic)\n\nA binary classification example using the [Titanic dataset](https://www.kaggle.com/naresh31/titanic-machine-learning-from-disaster). Run\n\n```bash\ncd examples/\n./test-titanic.py\n```\nthe output should include\n\n````\n              precision    recall  f1-score   support\n\n           0       0.75      0.96      0.84        78\n           1       0.91      0.55      0.69        56\n\n   micro avg       0.79      0.79      0.79       134\n   macro avg       0.83      0.76      0.77       134\nweighted avg       0.82      0.79      0.78       134\n`\n````\n\n### Regression Example (Lightgbm)\n\nTo run the LightGBM regression [example](https://github.com/microsoft/LightGBM/tree/master/examples/regression), type\n\n````bash\ncd examples/\n./test-lightgbm-example.py\n````\n\nthe output should end with\n\n```\n2019-05-19 22:54:04,825 - __main__ - INFO - *************[Testing]*************\n2019-05-19 22:54:04,825 - __main__ - INFO - ******************************\n2019-05-19 22:54:04,825 - __main__ - INFO - * [Testing]RMSE=0.447120\n2019-05-19 22:54:04,826 - __main__ - INFO - * [Testing]R^2-Score=0.194094\n2019-05-19 22:54:04,826 - __main__ - INFO - ******************************\n\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzouzias%2Fmicrogbt","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzouzias%2Fmicrogbt","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzouzias%2Fmicrogbt/lists"}