Skip to main content

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


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 details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

demingfit-0.1.0-py3-none-any.whl (2.6 kB view details)

Uploaded Python 3

File details

Details for the file demingfit-0.1.0.tar.gz.

File metadata

  • Download URL: demingfit-0.1.0.tar.gz
  • Upload date:
  • Size: 3.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.2

File hashes

Hashes for demingfit-0.1.0.tar.gz
Algorithm Hash digest
SHA256 492b8730c986825d39bc8752b5a8d3dfc7a7cda4563e4ddecbdcf7a2e138244b
MD5 c5b745e1117fcc7a762f9fd45299a6eb
BLAKE2b-256 688d8845d9bc82d7ba95d79dc953d8fcd14bfc610374623ce053cf1affb22592

See more details on using hashes here.

File details

Details for the file demingfit-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: demingfit-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 2.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.2

File hashes

Hashes for demingfit-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 eeb0d1ec5997a40da9cc7d7cd3557105f4594819ccfbbb4392b39fb7f8a1d7d3
MD5 681bfabac8ae25aaf5ee459d0f4ecd11
BLAKE2b-256 064c7a2eab12f1a0bb41ad47cafb8385d7b2050d51167f1bfa2de4bdaf99a78e

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page