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

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.4
File Size Uploaded Provenance Actions
ravix-1.0.4.tar.gz 359.5 kB Without provenance Details for ravix-1.0.4.tar.gz

Built distribution (wheel)

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

Total release size: 735.9 kB

Release files / ravix-1.0.4.tar.gz

Download URL ravix-1.0.4.tar.gz
Size 359.5 kB
Tags Source
SHA-256 checksum
How to use checksums
b1680ff893cf15ee48d8fda6c26a930adf026895d3ee23e3a72f4a60947765ff
BLAKE2b-256 checksum
How to use checksums
77871b3b882b73bfd12e5ebc73d504228fce95b0293023a398b1139384ab535d
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.4-py3-none-any.whl

Download URL ravix-1.0.4-py3-none-any.whl
Size 376.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
30091b8d9dbb735e0687c578a7c3c7f448f81d4290b4d04637d5500bd6db0417
BLAKE2b-256 checksum
How to use checksums
5b4b95c622e7cd0f28da71f79939e9fecf5546c7ec42cecbc6ed64a3d51f8976
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.4

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