{"id":18318537,"url":"https://github.com/maxmind/xgbshap","last_synced_at":"2025-04-12T21:36:21.926Z","repository":{"id":173742596,"uuid":"650759370","full_name":"maxmind/xgbshap","owner":"maxmind","description":"Calculates feature contributions for XGBoost models","archived":false,"fork":false,"pushed_at":"2025-04-10T15:27:57.000Z","size":130,"stargazers_count":1,"open_issues_count":3,"forks_count":1,"subscribers_count":14,"default_branch":"main","last_synced_at":"2025-04-10T16:50:55.160Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Go","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/maxmind.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,"zenodo":null}},"created_at":"2023-06-07T18:42:46.000Z","updated_at":"2025-03-21T19:04:42.000Z","dependencies_parsed_at":"2023-12-14T16:30:53.151Z","dependency_job_id":"346ca382-3246-409b-94ee-c0fc79dec4da","html_url":"https://github.com/maxmind/xgbshap","commit_stats":null,"previous_names":["maxmind/xgbshap"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maxmind%2Fxgbshap","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maxmind%2Fxgbshap/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maxmind%2Fxgbshap/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maxmind%2Fxgbshap/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/maxmind","download_url":"https://codeload.github.com/maxmind/xgbshap/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248637337,"owners_count":21137531,"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":[],"created_at":"2024-11-05T18:09:56.147Z","updated_at":"2025-04-12T21:36:21.904Z","avatar_url":"https://github.com/maxmind.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# xgbshap\n\n[![GoDoc](https://godoc.org/github.com/maxmind/xgbshap?status.png)](https://pkg.go.dev/github.com/maxmind/xgbshap)\n\nThis is a Go package for calculating feature contributions for\n[XGBoost](https://github.com/dmlc/xgboost) models. The code is ported from\nthe XGBoost C++ code. This package exists to make it possible to calculate\ncontributions with pure Go code rather than having to use cgo or another\nlanguage.\n\n## Missing Functionality\n\nWhile the code is ported from the XGBoost C++ code, not all code was\nported. If you find results differ between the two implementations, it is\npossible that code relevant to your model was not ported.\n\nIn particular, we have not yet ported:\n\n* Code involving condition and condition_features\n* Code involving tree weights\n* Some of the code involving the bias\n* Code involving categories\n\nIt is also possible that XGBoost's code has changed since this code was\nwritten. We will be attempting to keep this implementation up to date.\n\n## Example Usage\n\n```go\nmodelFile := \"/path/to/model.json\"\n\npredictor, err := xgbshap.NewPredictor(modelFile)\nif err != nil {\n    return err\n}\n\nfeatures := []*float32{...your features here...}\n\ncontributions, err := predictor.PredictContributions(features)\nif err != nil {\n    return err\n}\n```\n\n## Bug Reports\n\nPlease report bugs by filing an issue with our GitHub issue tracker at\n[https://github.com/maxmind/xgbshap/issues](https://github.com/maxmind/xgbshap/issues).\n\n## Copyright and License\n\nThis software is Copyright (c) 2023 - 2024 by MaxMind, Inc.\n\nMuch of the code is ported from the XGBoost project, so it is also\nCopyright (c) 2017-2023 by XGBoost Contributors.\n\nThis is free software, licensed under the [Apache License, Version\n2.0](LICENSE).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmaxmind%2Fxgbshap","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmaxmind%2Fxgbshap","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmaxmind%2Fxgbshap/lists"}