A package for performing Deming regression
Project description
Deming Regression
This package provides a simple implementation of Deming regression, an errors-in-variables model which tries to find the line of best fit for a two-dimensional dataset when there are errors in both the x and y variables.
Installation
You can install the package using pip:
pip install deming_regression
Usage
Here's a simple example of how to use the deming_regression
function:
from deming_regression import deming_regression
import numpy as np
x = np.array([1, 2, 3, 4, 5])
y = 2 * x + 1 + np.random.normal(0, 0.1, 5)
intercept, slope = deming_regression(x, y, 0.1, 0.1)
print(f"Intercept: {intercept}, Slope: {slope}")
Running Tests
To run the unit tests, navigate to the package directory and run:
python -m unittest discover tests
License
This project is licensed under the MIT License.
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
demingfit-0.1.0.tar.gz
(3.1 kB
view hashes)
Built Distribution
Close
Hashes for demingfit-0.1.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | eeb0d1ec5997a40da9cc7d7cd3557105f4594819ccfbbb4392b39fb7f8a1d7d3 |
|
MD5 | 681bfabac8ae25aaf5ee459d0f4ecd11 |
|
BLAKE2b-256 | 064c7a2eab12f1a0bb41ad47cafb8385d7b2050d51167f1bfa2de4bdaf99a78e |