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:
- Data Analysis: Analyze trends and patterns within datasets using polynomial regression techniques.
- Visualization: Visualize polynomial fits alongside original data points to gain insights into the relationship between variables.
- 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
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
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
File details
Details for the file polytrend-1.0.7.tar.gz.
File metadata
- Download URL: polytrend-1.0.7.tar.gz
- Upload date:
- Size: 18.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.11.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
cb5d1ff337cd1cb94605fc9c928a06c5d0851f8e0d73a774f8e362c3bb391527
|
|
| MD5 |
3d6dd4c09c854f8c8ac37f913ef76c37
|
|
| BLAKE2b-256 |
a7c92c0a0c3b219544cf25af78d5939e7dc00ac6e81f2641653ba152bf21ed70
|
File details
Details for the file polytrend-1.0.7-py3-none-any.whl.
File metadata
- Download URL: polytrend-1.0.7-py3-none-any.whl
- Upload date:
- Size: 18.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.11.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
451e8fd08125c878c91ca335349162bf235ba6964901b669cc99015ea1dba4cd
|
|
| MD5 |
1f6e5218585eca8a67d6bf998348edf3
|
|
| BLAKE2b-256 |
ea48fba94e3c08efd7d1dc7e8c2dc7be6bc34c8d542638cf2c4a0ac5e234d2fa
|