Skip to main content

Python Regression Analysis.

Project description

PRegress

PRegress is a Python package for regression analysis and data visualization. It provides tools for model fitting, prediction, and various types of plots to help visualize your data and regression results.

Features

  • Model fitting and prediction with a convenient formula notation
  • Various types of plots (boxplot, histogram, scatter plot, etc.)
  • Integration with popular libraries like pandas and statsmodels

Installation

You can install the package using pip:

pip install pregress

Usage

Importing the Package

To use the functions provided by the package, import it as follows:

import pregress as pr

Example Usage

Here are some examples of how to use the key functions in the package.

import pandas as pd
import numpy as np

# Generating a DataFrame with random numbers
np.random.seed(42)  # For reproducibility
data = np.random.rand(100, 5)  # 100 rows, 5 columns
columns = ['Y', 'X1', 'X2', 'X3', 'X4']

df1 = pd.DataFrame(data, columns=columns)

Model Fitting and Prediction

import pregress as pr

# Fit model with formula 
model = pr.fit("Y ~ X1 + X2:X3+ log(X3)", df1)

# Generate a model summary
pr.summary(model)

# Make predictions
pr.predict(model, df1)

Plotting

# Generate a boxplot
pr.boxplot("Y ~ X1 + X2", df1)

# Generate a histogram
pr.hist(df1.Y)

# Multiple histograms
pr.hists("Y ~ X1 + X2 + X3+X4",data = df1)

# Scatter plot
pr.plotXY("Y ~ X1", data = df1)

# Multiple Scatter plots
pr.plots("Y ~ X1 + X2 + X3+X4",data = df1)

Required Fixes

Based on current testing, the following fixes are required:

  1. Ensure global scope accessibility for variables.
  2. Adjust summary spacing.
  3. Review file organization.
  4. Provide compatibility with scikit-learn.
  5. Implement AI-generated summaries.

Contributing

We welcome contributions to PRegress! If you find a bug or have a feature request, please open an issue on GitHub. You can also contribute by:

  1. Forking the repository
  2. Creating a new branch (git checkout -b feature-branch)
  3. Committing your changes (git commit -am 'Add some feature')
  4. Pushing to the branch (git push origin feature-branch)
  5. Creating a pull request

License

This project is licensed under the MIT License - see the LICENSE file for details.

Acknowledgements

We would like to thank all contributors and users of PRegress for their support and feedback.

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

pregress-0.9.5.tar.gz (182.7 kB view details)

Uploaded Source

Built Distribution

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

pregress-0.9.5-py3-none-any.whl (195.3 kB view details)

Uploaded Python 3

File details

Details for the file pregress-0.9.5.tar.gz.

File metadata

  • Download URL: pregress-0.9.5.tar.gz
  • Upload date:
  • Size: 182.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.10.9

File hashes

Hashes for pregress-0.9.5.tar.gz
Algorithm Hash digest
SHA256 24b13ca22fd0772eeaaf5de92930d70c9182b93f8f7ce9db8f125d8b6cb3fe6c
MD5 ca305b9137250c535e39c890f3cfe89c
BLAKE2b-256 1d5b03ce9288a9e48c1fa0f0d8338cad11c0b0b6d8a36c6907078f9c0531828e

See more details on using hashes here.

File details

Details for the file pregress-0.9.5-py3-none-any.whl.

File metadata

  • Download URL: pregress-0.9.5-py3-none-any.whl
  • Upload date:
  • Size: 195.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.10.9

File hashes

Hashes for pregress-0.9.5-py3-none-any.whl
Algorithm Hash digest
SHA256 14309733c1431ad2a0b622bd7873164aabbc91c520996fe1c062956a6053fb72
MD5 13eaf00a5571b14c417e97e90fb6f0b7
BLAKE2b-256 8d49db59db392bbf18b30b146c934be80aa2198d7b4088dbe6388e4fa57187aa

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