semvec/pypi-packages huggingface dataset:
binsmooth 2023.10.0
binsmooth - Better Estimates from Binned Income Data.
Requires Python: >=3.9

# binsmooth

[![PyPI version](https://badge.fury.io/py/binsmooth.svg)](https://badge.fury.io/py/binsmooth)
![Build Status](https://github.com/sjtrny/binsmooth/actions/workflows/ci.yml/badge.svg)

Python implementation of "[Better Estimates from Binned Income Data][1]"

	Better Estimates from Binned Income Data: Interpolated CDFs and Mean-Matching
	Paul T. von Hippel, David J. Hunter, McKalie Drown
	Sociological Science
	Volume 4, Number 26, Pages 641-655
	2017

Originally implemented in the R package [`binsmooth`][2].

## Usage

    from binsmooth import BinSmooth

    bin_edges = np.array([0, 18200, 37000, 87000, 180000])
    counts = np.array([0, 7527, 13797, 75481, 50646, 803])
    mean_estimate = 95000

    bs = BinSmooth()
    bs.fit(bin_edges, counts, m=mean_estimate)

    # Print median estimate
    print(bs.inv_cdf(0.5))

## Installation

Install via pip

    pip install binsmooth

pypi page [https://pypi.org/project/binsmooth/](https://pypi.org/project/binsmooth/)

## Improvements

**Better tail estimate** by bounded optimisation rather than the adhoc search
method found in the R implementation.

**More precise inverse CDF** by dynamically sampling the CDF. This is done
by sampling proportional to the steepness of the CDF i.e. sampling more
in areas where the CDF is steeper.

## Warnings

**Results** may not exactly match R `binsmooth` because of a different approach
to estimating the tail (upper bound).

Furthermore the `fit` method uses `spline_type="PCHIP"` by default, which is
scipy's `PchipInterpolator` \[1\]. While the R implementation uses the spline
from \[2\], which can be mimicked by setting `spline_type="HYMAN"`.

## References

\[1\]: Fritsch, F. N. and Carlson, R. E. (1980). [Monotone piecewise cubic interpolation][3]. SIAM Journal on Numerical Analysis  
\[2\]: Hyman, J. M. (1983). [Accurate monotonicity preserving cubic interpolation][4]. SIAM Journal on Scientific and Statistical Computing

[1]: https://sociologicalscience.com/download/vol-4/november/SocSci_v4_641to655.pdf
[2]: https://cran.r-project.org/web/packages/binsmooth/
[3]: http://www.ams.sunysb.edu/~jiao/teaching/ams527_spring13/lectures/SNA000238.pdf
[4]: https://www.osti.gov/servlets/purl/5328033
bbrl-algos 0.0.2
BBRL algos, a library of reinforcement learning algorithms
Requires Python: >=3.8
Keywords: reinforcement learning

# BBRL - ALGOS

## Description

This library is designed for education purposes, it is mainly used to perform some practical experiences with various RL algorithms. It facilitates using optuna for tuning hyper-parameters and using rliable and statistical tests for analyzing the results.

## Installation

git clone https://github.com/osigaud/bbrl_algos.git

cd bbrl_algos

pip install -e .

We suggest using your favorite python environment (conda, venv, ...) as some further installations might be necessary

## Usage

go to src/bbrl_algos, choose your algorithm and run python3 your_algorithm.py
PyPDFMerge 0.0.5
Merge individual pages of PDF file into one page
Requires Python: >=3.6
Keywords: pdf-merger,pdf

# PyPDFMerge

Merge individual pages of PDF files into one page

## Demo

### Merging 2 pages into 1

| Before | After |
|---------|---------|
| ![Image 1](https://raw.githubusercontent.com/shhossain/PyPDFMerge/main/image.png) | ![Image 2](https://github.com/shhossain/PyPDFMerge/raw/main/image-1.png) |


## Installation

```bash
pip install PyPDFMerge
```

**NOTE**: You need visual studio build tools for C++ to install `PyPDFMerge` package. Refer to [this](https://pymupdf.readthedocs.io/en/latest/installation.html#installation-when-a-suitable-wheel-is-not-available) for more information.

## Usage

### Command Line

You can use the `PyPDFMerge` command to merge pdf files. It has the following options:

```bash
pdfmerger <path> [-o <output>] [-g <group_size>] [-q <quality>]
```

Example:

```bash
pdfmerger test.pdf
```

This will merge the `test.pdf` file and save it as `output.pdf` in the same directory.

**NOTE**: Output defaults to `output.pdf`, group size defaults to `2`, and quality defaults to `1.5`.

### Python

You can also use the `PyPDFMerge` package in your Python code. It has the following options:

```python
from pdfmerger import PDFMerge

pdf = PDFMerge(pdf_file=<path>, output_file=<output>, group_size=<group_size>, quality=<quality>, page_number=<page_number>)
pdf.run()
```

Example:

```python
from pdfmerger import PDFMerge

pdf = PDFMerge(pdf_file="./test.pdf", output_file="./output.pdf", group_size=2, quality=1.5)
pdf.run()
```