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.0.tar.gz (21.0 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.0-py3-none-any.whl (23.6 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: innovate-0.1.0.tar.gz
  • Upload date:
  • Size: 21.0 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.0.tar.gz
Algorithm Hash digest
SHA256 9e0a025497ecd3aa55a8a52350121b201470e8dc3584e4c4415100db8a9bfc50
MD5 0b8c21cae538fd4e389a10a685980974
BLAKE2b-256 4037f296bddd8b7735f4a8abe7a3b06a929989b33487b74b46b978f0980e201b

See more details on using hashes here.

File details

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

File metadata

  • Download URL: innovate-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 23.6 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.0-py3-none-any.whl
Algorithm Hash digest
SHA256 17c66b06dfbe3639470907e00b48b8d00bd13c65c20acb2c4fd7465ce5746ba0
MD5 edb0306953a6e5570b3e7212e6ea6638
BLAKE2b-256 112f6ccb849a07154401e6dda0844dce37d79a0fa18bb45aa39bcf3442b5e56d

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