{"id":13482573,"url":"https://github.com/bsharchilev/influence_boosting","last_synced_at":"2025-03-27T13:32:29.811Z","repository":{"id":215841518,"uuid":"121615870","full_name":"bsharchilev/influence_boosting","owner":"bsharchilev","description":"Supporting code for the paper \"Finding Influential Training Samples for Gradient Boosted Decision Trees\"","archived":false,"fork":false,"pushed_at":"2024-05-28T11:15:44.000Z","size":16934,"stargazers_count":66,"open_issues_count":1,"forks_count":18,"subscribers_count":7,"default_branch":"master","last_synced_at":"2024-08-01T17:32:35.225Z","etag":null,"topics":["catboost","gradient-boosting","influence-functions","machine-learning","machine-learning-algorithms","paper","python"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/bsharchilev.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2018-02-15T10:23:23.000Z","updated_at":"2024-05-28T11:15:47.000Z","dependencies_parsed_at":"2024-01-15T21:59:39.103Z","dependency_job_id":null,"html_url":"https://github.com/bsharchilev/influence_boosting","commit_stats":null,"previous_names":["bsharchilev/influence_boosting"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bsharchilev%2Finfluence_boosting","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bsharchilev%2Finfluence_boosting/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bsharchilev%2Finfluence_boosting/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bsharchilev%2Finfluence_boosting/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bsharchilev","download_url":"https://codeload.github.com/bsharchilev/influence_boosting/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":222262400,"owners_count":16957575,"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":["catboost","gradient-boosting","influence-functions","machine-learning","machine-learning-algorithms","paper","python"],"created_at":"2024-07-31T17:01:03.396Z","updated_at":"2024-10-30T16:31:29.445Z","avatar_url":"https://github.com/bsharchilev.png","language":"Python","funding_links":[],"categories":["2018"],"sub_categories":[],"readme":"# Finding Influential Training Samples for Gradient Boosted Decision Trees\nThis repository implements the _LeafRefit_ and _LeafInfluence_ methods described in the paper [_Finding Influential Training Samples for Gradient Boosted Decision Trees_](https://arxiv.org/abs/1802.06640).\n\nThe paper deals with the problem of finding infuential training samples using the Infuence Functions framework from classical statistics recently revisited in the paper [\"Understanding Black-box Predictions via Influence Functions\"](https://arxiv.org/abs/1703.04730) ([code](https://github.com/kohpangwei/influence-release)). The classical approach, however, is only applicable to smooth parametric models. In our paper, we introduce _LeafRefit_ and _LeafInfuence_, methods for extending the Infuence Functions framework to non-parametric Gradient Boosted Decision Trees ensembles.\n\n# Requirements\nWe recommend using the [Anaconda](https://www.anaconda.com/download/) Python distribution for easy installation. \n## Python packages\nThe following Python 2.7 packages are required:\n\n_Note: versions of the packages specified below are the versions with which the experiments reported in the paper were tested._\n- numpy==1.14.0\n- scipy==0.19.1\n- pandas==0.20.3\n- scikit-learn==0.19.0\n- matplotlib==2.0.2\n- tensorflow==1.6.0rc0\n- tqdm==4.19.5\n- ipywidgets\u003e=7.0.0 (for Jupyter Notebook rendering)\n\nThe ``create_influence_boosting_env.sh`` script creates the `influence_boosting` Conda environment with the required packages installed. You can run the script by running the following in the ``influence_boosting`` directory:\n```shell\nbash create_influence_boosting_env.sh\n```\n\n## CatBoost\nThe code in this repository uses [CatBoost](https://catboost.yandex/) for an implementation of GBDT. We tested our package with CatBoost version 0.6 built from [GitHub](https://github.com/catboost). Installation instructions are available in the [documentation](https://tech.yandex.com/catboost/doc/dg/concepts/python-installation-docpage/).\n\n**_Note: if you are using the ``influence_boosting`` environment described above, make sure to install CatBoost specifically for this environment._**\n\n## ``export_catboost``\nSince CatBoost is written in C++, in order to use CatBoost models with our Python package, we also include ``export_catboost``, a binary that exports a saved CatBoost model to a human-readable JSON.\n\nThis repository assumes that a program named ``export_catboost`` is available in the shell. To ensure that, you can do the following:\n- Select one of the two binaries, ``export_catboost_macosx`` or ``export_catboost_linux``, depending on your OS.\n- Copy it to ``export_catboost`` in the root repository directory.\n- Add the path to the root repository directory to the ``PATH`` environment variable.\n\n**_Note: since CatBoost's treatment of categorical features can be fairly complicated, ``export_catboost`` currently supports numerical features only._**\n\n# Example\nAn example experiment showing the API and a use-case of Influence Functions can be found in the [``influence_for_error_fixing.ipynb``](https://github.com/bsharchilev/influence_boosting/blob/master/scripts/influence_for_error_fixing.ipynb) notebook.\n\n**_Note_**: in this notebook, CatBoost parameters are loaded from the [``catboost_params.json``](https://github.com/bsharchilev/influence_boosting/blob/master/data/adult/catboost_params.json) file. In particular, the ``task_type`` parameter is set to ``CPU`` by default. If you have a GPU with CUDA available on your machine and compiled CatBoost with GPU support, you can change this parameter to ``GPU`` in order to train CatBoost faster on GPU. The majority of the experiments in the paper were conducted using the ``GPU`` mode.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbsharchilev%2Finfluence_boosting","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbsharchilev%2Finfluence_boosting","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbsharchilev%2Finfluence_boosting/lists"}