Skip to main content

A Python library for simplifying innovation/policy diffusion modelling.

Project description

innovate

A Python library for simplifying innovation/policy diffusion modelling.

This library aims to provide a flexible and robust framework for modeling the diffusion of innovations and policies across various domains, from advanced health technologies (its origin in genetic and genomic testing) to marketing, economics, and policy research.

Core Features (Initial Release)

  • Diffusion Models: Implementations of classic S-curve models like Gompertz, Logistic, and Bass (closed-form solutions).
  • Generic Competition-Diffusion Framework: A flexible structure to model multi-product or multi-policy diffusion, allowing for intrinsic adoption rates, market sizes, and interaction matrices (within- and cross-imitation).
  • Data Handling: Pandas-friendly API for time-series data with datetime indices.
  • Estimation: Initial fitting capabilities using tried-and-true libraries like SciPy for nonlinear least squares.
  • Seasonality & Dispersion Handling: Practical strategies for dealing with noisy, seasonal, or over-dispersed raw adoption data, including two-stage decomposition (e.g., using STL) and options for more integrated fitting approaches.

Roadmap

The innovate library is designed for phased development, with a clear path towards advanced features and XLA-accelerated performance. See the roadmap.md for detailed plans.

Installation

More information coming soon!

Benchmarks

Here are some initial benchmarks comparing the performance of the ScipyFitter (using the NumPy backend) and the JaxFitter (using the JAX backend).

Single Fit (100 samples, 1 dataset):

  • ScipyFitter: ~0.02s
  • JaxFitter: ~5.7s

Batched Fit (100 samples, 10 datasets):

  • BatchedFitter (NumPy): ~0.06s
  • BatchedFitter (JAX): ~15.5s

Note: For small datasets, the JaxFitter is significantly slower than the ScipyFitter due to the overhead of JIT compilation. However, for larger datasets and in batched scenarios, the JAX backend is expected to be significantly faster. These benchmarks will be updated as the library evolves.

Usage

Examples and tutorials will be provided to demonstrate how to use the library for various modeling scenarios.

License

This project is licensed under the Apache 2.0 License.

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

innovate-0.1.1.tar.gz (22.4 kB view details)

Uploaded Source

Built Distribution

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

innovate-0.1.1-py3-none-any.whl (24.8 kB view details)

Uploaded Python 3

File details

Details for the file innovate-0.1.1.tar.gz.

File metadata

  • Download URL: innovate-0.1.1.tar.gz
  • Upload date:
  • Size: 22.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.11

File hashes

Hashes for innovate-0.1.1.tar.gz
Algorithm Hash digest
SHA256 43921a634b58ad04184851fb69e5766f436dd8aca1030a84d300ea088b8d9958
MD5 067f9134c64e50fb1fdafa543d79db85
BLAKE2b-256 9f9ab636079be099ffbbffda2f9de28111d65eaca4054280bbe88842fdc57a78

See more details on using hashes here.

File details

Details for the file innovate-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: innovate-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 24.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.11

File hashes

Hashes for innovate-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 bdc0f5a9e6f1ab75713b63e5c42dcee7cb771a953dde43bee8e9396cdf0fc1f6
MD5 4a5b686a1feb9bd735ecff83a4590a9b
BLAKE2b-256 ad3a8f12f6362040d270fdb97c0cc4538a1b4c2cdb653118ea706ae85bed5900

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