Skip to main content

Ravix

Ravix 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.

Features

  • Model fitting and prediction with convenient formula notation
  • Streamlined code for plotting (boxplot, histogram, scatter plot, etc.)
  • Regression analysis diagnostic tools
  • Integration with popular libraries like pandas and statsmodels

Installation

You can install the package using pip:

pip install ravix

Usage

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

Importing the Package

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

import ravix

Getting Data

There are multiple datasets available from Ravix and are easily attained using the get_data function. The datasets currently available can be found using the following:

import ravix
ravix.get_data()

See Applied Linear Regression for Business Analytics with Python for details regarding these datasets. Sample import example:

import ravix

# Load data from ravix
df = ravix.get_data("betas.csv")

# Format the data (for later)
df.drop(columns = df.columns[0], inplace=True)

Model Fitting and Prediction

Ravix formula supports formula functionality similar to R. Fit a model with a formula:

# Fit model with formula 
model = ravix.ols("SPY ~ .", df)

Summary types are specified using the out argument. Different summaries are available including:

  • simple (default)
  • statsmodels
  • R
  • ANOVA
  • coefficients (coef)
# Generate a model summary
model.summary()

Making Predictions

A Statsmodels object is created by default. From this object, the predict function can be used. Since df is the dataframe used to fit the model, the following lines produce the same result.

# Make predictions
ravix.predict(model, df)

# Produce fitted values
ravix.predict(model)

General Plotting

Plotting code is streamlined and built on top of Seaborn and MatPlotLib. Samples provided below.

# Generate a boxplot
ravix.boxplot("SPY ~ .", df)

# Generate a histogram
ravix.hist(df.SPY)

# Multiple histograms
ravix.hist(df)

# Scatter plot
ravix.plot("MSFT ~ SPY", data = df)

# Multiple Scatter plots
ravix.plot(df)

# Correlation Plot
ravix.plot_cor(df)

Contributing

We welcome contributions to Ravix! 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 Ravix for their support and feedback.

Metadata

Release files for ravix 1.0.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for ravix 1.0.2
File Size Uploaded Provenance Actions
ravix-1.0.2.tar.gz 340.0 kB Without provenance Details for ravix-1.0.2.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for ravix 1.0.2
File Interpreter ABI Platform Actions
ravix-1.0.2-py3-none-any.whl Python 3 none any Details for ravix-1.0.2-py3-none-any.whl

Total release size: 698.3 kB

Release files / ravix-1.0.2.tar.gz

Download URL ravix-1.0.2.tar.gz
Size 340.0 kB
Tags Source
SHA-256 checksum
How to use checksums
2be8152cc3e37d5aa392b6373751c5bc069624162c72896efa75d7f988a2a8f0
BLAKE2b-256 checksum
How to use checksums
b935cefc482f7f37f65456c4df9e763e28741bce9f42cbfd8de7ddfbfeab3728
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.11.14

Release files / ravix-1.0.2-py3-none-any.whl

Download URL ravix-1.0.2-py3-none-any.whl
Size 358.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
eb3295f595357873c1a94a890caab33b5a02304b32e1f129e4a4195ec525428c
BLAKE2b-256 checksum
How to use checksums
f5591a7e9bcccb2db34c1cadead1baebdee1cb90a0d880f2510c8f893f19bc86
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.11.14

Security for ravix 1.0.2

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page