https://github.com/amazon-science/causal-validation
Validate your causal models!
Science Score: 26.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
○CITATION.cff file
-
✓codemeta.json file
Found codemeta.json file -
✓.zenodo.json file
Found .zenodo.json file -
○DOI references
-
○Academic publication links
-
○Academic email domains
-
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (13.5%) to scientific vocabulary
Keywords
Repository
Validate your causal models!
Basic Info
- Host: GitHub
- Owner: amazon-science
- License: apache-2.0
- Language: Python
- Default Branch: main
- Homepage: https://amazon-science.github.io/causal-validation/
- Size: 2.35 MB
Statistics
- Stars: 4
- Watchers: 2
- Forks: 2
- Open Issues: 3
- Releases: 6
Topics
Metadata Files
README.md
Causal Validation
This package provides functionality to define your own causal data generation process and then simulate data from the process. Within the package, there is functionality to include complex components to your process, such as periodic and temporal trends, and all of these operations are fully composable with one another.
A short example is given below ```python from causalvalidation import Config, simulate from causalvalidation.effects import StaticEffect from causalvalidation.plotters import plot from causalvalidation.transforms import Trend, Periodic from causal_validation.transforms.parameter import UnitVaryingParameter from scipy.stats import norm
cfg = Config( ncontrolunits=10, npreinterventiontimepoints=60, npostinterventiontimepoints=30, )
Simulate the base observation
base_data = simulate(cfg)
Apply a linear trend with unit-varying intercept
intercept = UnitVaryingParameter(samplingdist = norm(0, 1)) trendcomponent = Trend(degree=1, coefficient=0.1, intercept=intercept) trendeddata = trendcomponent(base_data)
Simulate a 5% lift in the treated unit's post-intervention data
effect = StaticEffect(0.05) inflateddata = effect(trendeddata)
Plot your data
plot(inflated_data) ```

Examples
To supplement the above example, we have two more detailed notebooks which exhaustively present and explain the functionalty in this package, along with how the generated data may be integrated with AZCausal. 1. Data Synthesis: We here show the full range of available functions for data generation. 2. Placebo testing: Validate your model(s) using placebo tests. 3. AZCausal notebook: We here show how the generated data may be used within an AZCausal model.
Installation
In this section we guide the user through the installation of this package. We distinguish here between users of the package who seek to define their own data generating processes, and developers who wish to extend the existing functionality of the package.
Prerequisites
- Python 3.10 or higher
- Hatch (optional, but recommended for developers)
To install the latest stable version, run
pip install causal-validation
in your terminal.
For Users
- It's strongly recommended to use a virtual environment. Create and activate one using your preferred method before proceeding with the installation.
- Clone the package
git clone git@github.com:amazon-science/causal-validation.git - Enter the package's root directory
cd causal-validation - Install the package
pip install -e .
For Developers
- Follow steps 1-3 from
For Users - Create a hatch environment
hatch env create - Open a hatch shell
hatch shell - Validate your installation by running
hatch run dev:test
Owner
- Name: Amazon Science
- Login: amazon-science
- Kind: organization
- Website: https://amazon.science
- Twitter: AmazonScience
- Repositories: 80
- Profile: https://github.com/amazon-science
GitHub Events
Total
- Push event: 4
- Pull request review event: 1
- Pull request event: 4
Last Year
- Push event: 4
- Pull request review event: 1
- Pull request event: 4
Issues and Pull Requests
Last synced: over 1 year ago
All Time
- Total issues: 6
- Total pull requests: 39
- Average time to close issues: 13 days
- Average time to close pull requests: about 7 hours
- Total issue authors: 2
- Total pull request authors: 3
- Average comments per issue: 0.0
- Average comments per pull request: 0.08
- Merged pull requests: 39
- Bot issues: 0
- Bot pull requests: 0
Past Year
- Issues: 6
- Pull requests: 39
- Average time to close issues: 13 days
- Average time to close pull requests: about 7 hours
- Issue authors: 2
- Pull request authors: 3
- Average comments per issue: 0.0
- Average comments per pull request: 0.08
- Merged pull requests: 39
- Bot issues: 0
- Bot pull requests: 0
Top Authors
Issue Authors
- thomaspinder (3)
Pull Request Authors
- thomaspinder (31)
- semihakbayrak (6)
- B-Deforce (2)
Top Labels
Issue Labels
Pull Request Labels
Packages
- Total packages: 1
-
Total downloads:
- pypi 51 last-month
- Total dependent packages: 0
- Total dependent repositories: 0
- Total versions: 9
- Total maintainers: 1
pypi.org: causal-validation
A validation framework for causal models.
- Documentation: https://causal-validation.readthedocs.io/
- License: apache-2.0
-
Latest release: 0.0.9
published over 1 year ago
Rankings
Maintainers (1)
Dependencies
- JamesIves/github-pages-deploy-action v4.4.1 composite
- actions/checkout v3.5.2 composite
- actions/setup-python v4 composite
- pypa/hatch install composite
- actions/checkout v3.5.2 composite
- actions/setup-python v4 composite
- pypa/hatch install composite
- actions/checkout v3.5.2 composite
- chartboost/ruff-action v1 composite
- actions/checkout v3.5.2 composite
- actions/setup-python v4 composite
- pypa/hatch install composite
- azcausal *
- beartype *
- jaxtyping *
- matplotlib *
- numpy *
- pandas *