{"id":16857577,"url":"https://github.com/flyingmutant/bdigest","last_synced_at":"2025-04-11T07:40:41.322Z","repository":{"id":64306718,"uuid":"260420525","full_name":"flyingmutant/bdigest","owner":"flyingmutant","description":"B-digest is a Go library for fast and memory-efficient estimation of quantiles with guaranteed relative error and full mergeability","archived":false,"fork":false,"pushed_at":"2023-01-02T19:29:50.000Z","size":32,"stargazers_count":5,"open_issues_count":1,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-25T05:13:24.367Z","etag":null,"topics":["accuracy","accuracy-guarantees","aggregation","golang","online-algorithms","percentile","quantile","quantile-estimation"],"latest_commit_sha":null,"homepage":"https://pkg.go.dev/pgregory.net/bdigest","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/flyingmutant.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-05-01T09:20:14.000Z","updated_at":"2024-08-20T16:09:47.000Z","dependencies_parsed_at":"2023-01-15T10:45:19.021Z","dependency_job_id":null,"html_url":"https://github.com/flyingmutant/bdigest","commit_stats":null,"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/flyingmutant%2Fbdigest","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/flyingmutant%2Fbdigest/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/flyingmutant%2Fbdigest/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/flyingmutant%2Fbdigest/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/flyingmutant","download_url":"https://codeload.github.com/flyingmutant/bdigest/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248359214,"owners_count":21090496,"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":["accuracy","accuracy-guarantees","aggregation","golang","online-algorithms","percentile","quantile","quantile-estimation"],"created_at":"2024-10-13T14:08:34.952Z","updated_at":"2025-04-11T07:40:41.300Z","avatar_url":"https://github.com/flyingmutant.png","language":"Go","readme":"# b-digest [![PkgGoDev][godev-img]][godev] [![CI][ci-img]][ci]\n\nB-digest is a Go library for fast and memory-efficient estimation\nof quantiles with guaranteed relative error and full mergeability.\n\n```go\npackage bdigest_test\n\nimport (\n\t\"fmt\"\n\t\"math\"\n\t\"math/rand\"\n\n\t\"pgregory.net/bdigest\"\n)\n\nfunc ExampleNewDigest() {\n\tr := rand.New(rand.NewSource(0))\n\td := bdigest.NewDigest(0.05)\n\n\tfor i := 0; i \u003c 100000; i++ {\n\t\tv := math.Exp(r.NormFloat64())\n\t\td.Add(v)\n\t}\n\n\tfmt.Printf(\"%v buckets\\n\", d.Size())\n\tfor _, q := range []float64{0, 0.1, 0.25, 0.5, 0.75, 0.9, 0.95, 0.99, 0.999, 0.9999, 1} {\n\t\tfmt.Printf(\"%v\\tq%v\\n\", d.Quantile(q), q)\n\t}\n\n\t// Output:\n\t// 98 buckets\n\t// 0.015690260723105844\tq0\n\t// 0.2858480802952493\tq0.1\n\t// 0.5211100423907477\tq0.25\n\t// 1.05\tq0.5\n\t// 1.9141830301785612\tq0.75\n\t// 3.489615879070075\tq0.9\n\t// 5.2076333497857386\tq0.95\n\t// 10.493014090054524\tq0.99\n\t// 21.142683691165157\tq0.999\n\t// 42.601017193748824\tq0.9999\n\t// 258.10858921508054\tq1\n}\n```\n\n## License\n\nB-digest is licensed under the [Apache License Version 2.0](./LICENSE).\n\n[godev-img]: https://pkg.go.dev/badge/pgregory.net/bdigest\n[godev]: https://pkg.go.dev/pgregory.net/bdigest\n[ci-img]: https://github.com/flyingmutant/bdigest/workflows/CI/badge.svg\n[ci]: https://github.com/flyingmutant/bdigest/actions\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fflyingmutant%2Fbdigest","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fflyingmutant%2Fbdigest","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fflyingmutant%2Fbdigest/lists"}