https://github.com/lujiajing1126/go-space-saving
A Space-Saving algorithm implemented in Go
https://github.com/lujiajing1126/go-space-saving
topk topn
Last synced: 2 months ago
JSON representation
A Space-Saving algorithm implemented in Go
- Host: GitHub
- URL: https://github.com/lujiajing1126/go-space-saving
- Owner: lujiajing1126
- Created: 2021-09-29T15:24:13.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2021-10-04T14:06:32.000Z (over 3 years ago)
- Last Synced: 2025-02-10T11:18:01.543Z (4 months ago)
- Topics: topk, topn
- Language: Go
- Homepage:
- Size: 27.3 KB
- Stars: 0
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Spacing-Saving algorithm
> Spacing-Saving algorithm is an integrated approach for solving both problems of finding the most popular k elements,
> and finding frequent elements in a data stream.## Usage
```go
// epsilon determines the total number of counters
ss, err := spaceSaving.NewStreamSummary(0.01)
if err != nil {
//...
}
ss.Record(item)
```## Acknowledge
1. Ahmed Metwally et
al., [Efficient computation of frequent and top-k elements in data streams](https://doi.org/10.1007/978-3-540-30570-5_27)
. In Proceedings of the 10th international conference on Database Theory (ICDT'05)
2. Java Implementation of Spacing-Saving algorithm: https://github.com/fzakaria/space-saving