SymFit's little brother
Project description
SlimFit
SymFit's little brother
Documentation: https://jhsmit.github.io/slimfit/
This project is inspired by SymFit and is functional, to some degree, but in currently in BETA
- Free software: MIT license
Aims
- Inspiration for a potential SymFit 2.0
- Expectation-Maximization likelihood maximization
Quick Start
from sympy import symbols
from slimfit import Model, Fit, Parameter
import numpy as np
y, a, x, b = symbols('y a x b')
model = Model({y: a*x + b})
parameters = [
Parameter(a, guess=2.5),
Parameter(b, guess=1, lower_bound=0.)
]
xdata = np.linspace(0, 11, 25)
ydata = 0.5*xdata + 2.5
ydata += np.random.normal(0, scale= ydata / 10.0 + 0.2)
data = {'x': xdata, 'y': ydata}
fit = Fit(model, parameters, data)
result = fit.execute()
print(result.parameters)
>>> {'a': array(0.47572707), 'b': array(2.6199133)}
Installation
$ pip install slimfit
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
slimfit-0.1.4.tar.gz
(1.4 MB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
slimfit-0.1.4-py3-none-any.whl
(34.2 kB
view details)
File details
Details for the file slimfit-0.1.4.tar.gz.
File metadata
- Download URL: slimfit-0.1.4.tar.gz
- Upload date:
- Size: 1.4 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
827ee55cd47839b9954bcdeec124f74609493b967da6961ba2130bc5a210a9c0
|
|
| MD5 |
82bbf83ad4df0bdb7464048376a7fce8
|
|
| BLAKE2b-256 |
305c6dc50513828e417a8d53d5b6e68bb4311d0fc9ab5b05f74e3b43e4a4d557
|
File details
Details for the file slimfit-0.1.4-py3-none-any.whl.
File metadata
- Download URL: slimfit-0.1.4-py3-none-any.whl
- Upload date:
- Size: 34.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
baf595aaaafd3826a89448ac66b400fbd88f8535f6f0031f886f7dfd775e0538
|
|
| MD5 |
da62dcd9582c4c89cf1619879a340ab6
|
|
| BLAKE2b-256 |
2e726403f2f6c3bf5184b20cc5ce1e63e0e390cfef9b22bbb99a98ffd4a077cf
|