Skip to main content

PolyTrend is a regression tool that fits polynomial curves to noisy data.

Project description

PolyTrend

PolyTrend is a Python package aimed at facilitating polynomial trend fitting, visualization, and extrapolation. It offers a comprehensive set of functionalities to analyze and interpret data using polynomial regression techniques. Below, we provide an overview of the package along with additional formatting and explanations relevant for PyPI.

Introduction

PolyTrend is designed to approximate and plot a polynomial function onto given data, thereby aiding in the analysis of trends and patterns within datasets. Its development contributes to various fields including interpolation, polynomial regression, and approximation theory.

Key Functionalities

PolyTrend offers the following key functionalities:

  • polyplot(): This method plots the polynomial fit based on specified degrees of the polynomial and the provided data.
  • polyfind(): This method calculates the best-fit polynomial function by evaluating different polynomial degrees and selecting the one with the lowest Bayesian Information Criterion (BIC) score.
  • polygraph(): This method visualizes the polynomial function, the known data points, and any extrapolated data points if provided.

Usage

Users can utilize PolyTrend to perform the following tasks:

  1. Data Analysis: Analyze trends and patterns within datasets using polynomial regression techniques.
  2. Visualization: Visualize polynomial fits alongside original data points to gain insights into the relationship between variables.
  3. Extrapolation: Extrapolate future values based on the fitted polynomial function, enabling predictive modeling tasks.

Dependencies

PolyTrend relies on the following libraries for its computations and visualizations:

  • NumPy
  • pandas
  • Matplotlib
  • scikit-learn

Additional Resources

For further details on polynomial regression, refer to this wiki.

Installation

PolyTrend can be installed via pip:

pip install polytrend

Example Usage

from polytrend import PolyTrend

# Sample data
data = [(1, 2), (2, 3), (3, 5), (4, 7)]

# Initialize PolyTrend object
poly = PolyTrend()

# Fit polynomial and visualize
poly.polyfind(data)
poly.polygraph()

Feedback and Contributions

Feedback and contributions to PolyTrend are welcomed and encouraged. Please feel free to submit any issues or pull requests via the GitHub repository.

License

PolyTrend is licensed under the GNU GPL License. See the LICENSE file for details.

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

polytrend-1.0.0.tar.gz (17.5 kB view details)

Uploaded Source

Built Distribution

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

polytrend-1.0.0-py3-none-any.whl (18.1 kB view details)

Uploaded Python 3

File details

Details for the file polytrend-1.0.0.tar.gz.

File metadata

  • Download URL: polytrend-1.0.0.tar.gz
  • Upload date:
  • Size: 17.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.11.8

File hashes

Hashes for polytrend-1.0.0.tar.gz
Algorithm Hash digest
SHA256 0dac62706d27e62c9a0a5d8efa9d1d1fc09324fd15681f5a54e77a7768d1d9e5
MD5 4068674153099108960c77e326cdb307
BLAKE2b-256 e6faabefdbd6f2c79078575237d3b0a3284f11c91e23b76d73a5c77e7f4e13ab

See more details on using hashes here.

File details

Details for the file polytrend-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: polytrend-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 18.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.11.8

File hashes

Hashes for polytrend-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 a604bf8f016b49f82e837feb5834c9f6779fa49bee3d29e102ad7998130f1c9e
MD5 7a04f3899bbd19f829859d85efa9230d
BLAKE2b-256 f280fca3a02b5284b0dcb1ec18a42082fc829a5da40afda3d10bb2d214f0607f

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