semvec/pypi-packages huggingface dataset:
bejoor 0.1.6
This project is a collection of optimization algorithms.
Requires Python: >=3.6

This package is a collection of optimization algorithms. The aim is high diversity of optimizers and eased of use. 

For documentation, [Visit this](https://amzmohammad.com/bejoor/).

# Usage
```python
from bejoor.genetic import BaseGeneticAlgorithm

def func(sol):
    return abs( (sol[0]**sol[3] + sol[1]**sol[3] - sol[2]**sol[3]))


solution_vector =  [{"type": "integer", "lower_bound": 1, "upper_bound": 500}] * 3 + \
                   [{"type": "integer", "lower_bound": 2, "upper_bound": 100}] + \
                   [{"type": "float", "lower_bound": 0, "upper_bound": 1}] * 2 + \
                   [{"type": "string", "possible_values": ["option1", "option2", "option3"]}]

bga = BaseGeneticAlgorithm(objective_function=func, solution_vector_size=7,
                           solution_vector=solution_vector, optimization_side="min", target_objective_upper_bound=5,
                           crossover_probability=0.9, mutation_probability=0.1,
                           elitism_rate=0.05, selection_strategy="roulette",
                           crossover_type="one-point", population_size=500, epochs=200)

bga.run()

print(bga.best_solution)
print(bga.best_objective_value)
```
polars-loess 0.1.1
LOESS algorithm for Polars
Requires Python: >=3.9
Keywords: polars, loess, regression, smoothing, data

# Polars Loess

This is a loess local regression (locally estimated scatterplot smoothing) implementation in Rust for Polars.

**This is an early release. There is room for improvement in terms of performance, memory efficiency and feature set.
I value feedback from the community to see where to go next.**

## Installation

```bash
pip install polars-loess
```

## API

```python
loess(
    'x-column',     # Name of the existing x-values
    'y-column',     # Name of the existing y-values
    'new-x-column', # Name of the new x values. y-values are interpolated for these x-values using loess
    
    # Optional float to specify the fraction of the data used in each local regression.
    # Exactly one of frac or points must be specified.
    frac=None,
    
    # Optional integer to specify the number of points used in each local regression.
    # Exactly one of frac or points must be specified.
    points=None,
    
    # Optional integer to specify the degree of the polynomial used in each local regression.
    # Default is 1.
    degree=None,
)
```


## Example

```python
import polars as pl
from polars_loess import loess

df = pl.DataFrame({
    'time': [
        0.5578196, 2.0217271, 2.5773252, 3.4140288, 4.3014084,
        4.7448394, 5.1073781, 6.5411662, 6.7216176, 7.2600583,
        8.1335874, 9.1224379, 11.9296663, 12.3797674, 13.2728619,
        14.2767453, 15.3731026, 15.6476637, 18.5605355, 18.5866354
    ],
    'price': [
        18.63654, 103.49646, 150.35391, 190.51031, 208.70115,
        213.71135, 228.49353, 233.55387, 234.55054, 223.89225,
        227.68339, 223.91982, 168.01999, 164.95750, 152.61107,
        160.78742, 168.55567, 152.42658, 221.70702, 222.69040,
    ],
})
result = df.with_columns(loess = loess('time', 'price', 'time', frac=0.5))
print(result)
```

Another example can be found in `run.py`. The result looks like.

![Loess example](https://gitlab.sauerburger.com/frank/polars-loess/-/raw/main/example.png)

## Acknowledgements


* The loess implementation is based on https://github.com/joaofig/loess-rs
* The Python bindings are based on https://marcogorelli.github.io/polars-plugins-tutorial/