Skip to main content

Romus

Romus is a passion project of mine. I often have to deal with coding up simple conjugate models and gibbs samplers at work. This is useful for the variety of experimentation asks my data science team supports. I also use these models to help educate more junior data scientists about Bayesian statistics. This package is meant to serve a dual purpose as a tool for simple modeling and as an example for educational purposes.

I'm open to all questions, feedback, commentary, and suggestions as long as they are constructive and polite! Discussions should always come in the form of git issues.

Authors

James Montgomery - Initial Work - jamesmontgomery.us

License

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

About the Name

Why call the package Romus? Romulus and Remus were a famous pair of twins whose myth is tied to the founding of Rome. Conjugate distributions (or distributions closed under sampling) are pairs of distributions who have a special relationship that is sometimes useful in machine learning and statistics. Therefore I thought it would be fun to name my package after a famous pair of twins!

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes.

Installing

For a local installation, first git clone this repository. Then follow these instructions:

pip install .

To install from pypi:

pip install -U romus

Testing

Testing is an important part of creating maintainable, production grade code. Below are instructions for running unit and style tests as well as installing the necessary testing packages. Tests have intentionally been separated from the installable pypi package for a variety of reasons.

Make sure you have the required testing packages:

pip install -r requirements_test.txt

Running the unit tests

We use the pytest framework for unit testing.

pytest -vvl -s --cov romus --disable-pytest-warnings

Running the style tests

Having neat and legible code is important. Having documentation is also important. We use pylint as our style guide framework. Many of our naming conventions follow directly from the literary sources they come from. This makes it easier to read the mathematical equations and see how they translate into the code. This sometimes forces us to break pep8 conventions for naming.

pylint romus --disable=invalid-name

Contributor's Guide

Here are some basic guidelines for contributing.

Branch Strategy

This repository doesn't use a complicated branching strategy. Simply create a feature branch off of master. When the feature is ready to be integrated with master, submit a pull request. A pull request will re quire at least one peer review and approval from the repository owner.

Style Guide

Please stick to pep8 standards when for your code. Use numpy style docstrings.

Test Requirements

Please use pytest as your testing suite. You code should have >= 80% coverage.

Updating the Docs

Updating the documentation is simple. First, let auto-docs check for updates to the package structure.

cd docs
sphinx-apidoc -o . ../romus/

Finally, rebuild the html files.

make html

Acknowledgments

A big thank you to Keegan Hines and Mack Sweeney both of who helped start me on my journey into Bayesian statistics.

TODO

This package is still in the development phase. Here I list some tasks that are still left to be completed...

  • Add ToC to README
  • Add gibbs samplers to package
  • Add mixture conjugate models to package
  • Fill out examples
  • Fill out model specification docs
  • Fill out distributions docs
  • Update docstrings
    • module docstrings
    • class docstrings
    • function docstrings
  • Type Hints
  • Proper Test
    • Units Tests
    • Smoke Tests
    • Integration Tests
  • Add docs
  • Add branch protection

Useful Resources

General

Distribution Specific

Metadata

Release files for romus 0.0.1

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

Source distribution (sdist)

Source distribution for romus 0.0.1
File Size Uploaded Provenance Actions
romus-0.0.1.tar.gz 30.9 kB Without provenance Details for romus-0.0.1.tar.gz

Built distribution (wheel)

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

Total release size: 51.0 kB

Release files / romus-0.0.1.tar.gz

Download URL romus-0.0.1.tar.gz
Size 30.9 kB
Tags Source
SHA-256 checksum
How to use checksums
bf28c85b5eedc082c622e8445b5b4f186519cdd31f5d2c984feb80eb970d628c
BLAKE2b-256 checksum
How to use checksums
0f68b0a04d3eb2b19d5743faebc878d2c2c886801f16262bed4f9e926a76ef1c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.12.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/47.1.1 requests-toolbelt/0.8.0 tqdm/4.43.0 CPython/3.7.5

Release files / romus-0.0.1-py3-none-any.whl

Download URL romus-0.0.1-py3-none-any.whl
Size 20.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
bf8a88e8e913a5a7ca2940db37bb170ae52381e39b164061894e5abb247c47a8
BLAKE2b-256 checksum
How to use checksums
2ea09495f6eb3293724cd798f46e4e67e245ea87d6c66ad81dd026cf512e2367
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.12.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/47.1.1 requests-toolbelt/0.8.0 tqdm/4.43.0 CPython/3.7.5

Security for romus 0.0.1

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.

Release history Release notifications | RSS feed

This release

0.0.1 This release

2 release files No provenance

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