From b89a99679b13e3047ff9c93a03c303c357931832 Mon Sep 17 00:00:00 2001 From: Adriano Meligrana <68152031+Tortar@users.noreply.github.com> Date: Tue, 1 Oct 2024 21:10:15 +0200 Subject: [PATCH] Mention StreamSampling.jl in ReservoirSample docstring (#292) * Mention StreamSampling.jl in ReservoirSample docstring * Update Project.toml --- Project.toml | 2 +- src/stats/stats.jl | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/Project.toml b/Project.toml index 4b589541..fb9df4c9 100644 --- a/Project.toml +++ b/Project.toml @@ -1,6 +1,6 @@ name = "OnlineStats" uuid = "a15396b6-48d5-5d58-9928-6d29437db91e" -version = "1.7.1" +version = "1.7.2" [deps] AbstractTrees = "1520ce14-60c1-5f80-bbc7-55ef81b5835c" diff --git a/src/stats/stats.jl b/src/stats/stats.jl index d8da90cf..52fa2291 100644 --- a/src/stats/stats.jl +++ b/src/stats/stats.jl @@ -644,6 +644,8 @@ nobs(o::Quantile) = nobs(o.eh) Create a sample without replacement of size `k`. After running through `n` observations, the probability of an observation being in the sample is `1 / n`. +If you need more advanced reservoir sampling methods consider using `StreamSampling.jl`. + # Example fit!(ReservoirSample(100, Int), 1:1000)