Skip to content

Commit

Permalink
Bump version to v1.0.1: README improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
ori88c committed Aug 18, 2024
1 parent 1cb05cf commit 6319564
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 12 deletions.
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<h2 align="middle">weighted-random-item-sampler</h2>
<h2 align="middle">Weighted Random Item Sampler</h2>

The `WeightedRandomItemSampler` class implements a random sampler where the probability of selecting an item is proportional to its weight.

Expand All @@ -13,17 +13,17 @@ Use case examples include:
* __Anomaly Detection__: Sample data points from a dataset with weights based on their anomaly scores for further analysis.
* __ML Model Training__: Select training samples with weights based on their importance or difficulty to ensure diverse and balanced training data.

## Key Features
## Key Features :sparkles:

- __Weighted Random Sampling__: Sampling items with proportional probability to their weight.
- __Efficiency__: O(log(n)) time and O(1) space per sample, making this class suitable for performance-demanding applications where the set of items is large and the sampling frequency is high.
- __Comprehensive documentation__: The class is thoroughly documented, enabling IDEs to provide helpful tooltips that enhance the coding experience.
- __Efficiency :gear:__: O(log(n)) time and O(1) space per sample, making this class suitable for performance-demanding applications where the set of items is large and the sampling frequency is high.
- __Comprehensive documentation :books:__: The class is thoroughly documented, enabling IDEs to provide helpful tooltips that enhance the coding experience.
- __Tests__: Fully covered by unit tests.
- No external runtime dependencies: Only development dependencies are used.
- ES2020 Compatibility: The `tsconfig` target is set to ES2020, ensuring compatibility with ES2020 environments.
- TypeScript support.

## Use Case Example
## Use Case Example :man_technologist:

Consider a component responsible for selecting training-samples for a ML model. By assigning weights based on the importance or difficulty of each sample, we ensure a diverse and balanced training dataset.

Expand Down Expand Up @@ -60,6 +60,6 @@ class ModelTrainer {
}
```

## License
## License :scroll:

[Apache 2.0](LICENSE)
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "weighted-random-item-sampler",
"version": "1.0.0",
"version": "1.0.1",
"description": "A weighted random item sampler (selector), where the probability of selecting an item is proportional to its weight. The sampling method utilizes a binary search optimization, making it suitable for performance-demanding applications where the set of items is large and the sampling frequency is high.",
"repository": {
"type": "git",
Expand All @@ -20,15 +20,15 @@
"keywords": [
"weight",
"weighted",
"weighted-random",
"sample",
"sampler",
"sampling",
"random",
"randomized",
"random-select",
"select",
"selector",
"selection",
"weighted-select",
"weighted-selector",
"weighted-selection",
"weighted-sampling",
"weighted-item",
Expand Down

0 comments on commit 6319564

Please sign in to comment.