这是indexloc提供的服务,不要输入任何密码
Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2025 Leonardo Moraes
Copyright (c) 2025 Leonardo Moraes <leomaurodesenv>

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
36 changes: 36 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# 🧪 Scikit-Sampling

[![GitHub](https://img.shields.io/static/v1?label=Code&message=GitHub&color=blue&style=flat-square)](https://github.com/leomaurodesenv/scikit-sampling)
[![MIT license](https://img.shields.io/static/v1?label=License&message=MIT&color=blue&style=flat-square)](LICENSE)
[![GitHub Workflow Status](https://img.shields.io/github/actions/workflow/status/leomaurodesenv/scikit-sampling/continuous-integration.yml?label=Build&style=flat-square)](https://github.com/leomaurodesenv/scikit-sampling/actions/workflows/continuous-integration.yml)


Scikit-Sampling (or `sksampling`) is a Python library for dataset sampling techniques. It provides a unified API for common sampling strategies, making it easy to integrate into your data science and machine learning workflows.

## Installation

You can install `sksampling` using pip:

```bash
pip install scikit-sampling
```

## Features

`sksampling` offers a range of sampling methods, including:

- `sample_size`: Computes the ideal sample size based confidence level and interval.

## Usage

`sksampling` follows the `scikit-learn` API, making it intuitive to use.

```python
from sksampling import sample_size

# Example usage
population_size: int = 100_000
confidence_level: float = 0.95
confidence_interval: float = 0.02
sample_size(population_size, confidence_level, confidence_interval) # approx 2345
```