SkillAgentSearch skills...

Sampler

Dynamic weighted sampling with replacement

Install / Use

/learn @adefazio/Sampler
About this skill

Quality Score

0/100

Supported Platforms

Universal

README

Weighted sampling with replacement, with dynamic weights

This code solves the problem of weighted sampling from a set, when you want to change the weight of a sample after you sample it. The implementation is described in the blog post here. The technique used is not novel, indeed it is based on publications from the 1960s.

A Cython implementation is provided along with the regular Python implementation.

Requires numpy and py.test packages.

View on GitHub
GitHub Stars14
CategoryDevelopment
Updated2y ago
Forks2

Languages

Python

Security Score

75/100

Audited on Jun 6, 2023

No findings