{"id":37073728,"url":"https://github.com/fraunhoferiks/parcs","last_synced_at":"2026-01-14T08:39:24.649Z","repository":{"id":77716253,"uuid":"592506885","full_name":"FraunhoferIKS/parcs","owner":"FraunhoferIKS","description":null,"archived":true,"fork":false,"pushed_at":"2024-11-20T15:57:23.000Z","size":361052,"stargazers_count":5,"open_issues_count":1,"forks_count":2,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-09-24T23:51:42.431Z","etag":null,"topics":["causal-discovery","causal-inference","certification","simulation"],"latest_commit_sha":null,"homepage":"https://fraunhoferiks.github.io/parcs/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/FraunhoferIKS.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-01-23T21:49:17.000Z","updated_at":"2025-02-13T12:03:12.000Z","dependencies_parsed_at":"2024-11-13T09:35:59.522Z","dependency_job_id":null,"html_url":"https://github.com/FraunhoferIKS/parcs","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/FraunhoferIKS/parcs","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FraunhoferIKS%2Fparcs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FraunhoferIKS%2Fparcs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FraunhoferIKS%2Fparcs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FraunhoferIKS%2Fparcs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/FraunhoferIKS","download_url":"https://codeload.github.com/FraunhoferIKS/parcs/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/FraunhoferIKS%2Fparcs/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28414670,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-14T08:38:59.149Z","status":"ssl_error","status_checked_at":"2026-01-14T08:38:43.588Z","response_time":107,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["causal-discovery","causal-inference","certification","simulation"],"created_at":"2026-01-14T08:39:23.980Z","updated_at":"2026-01-14T08:39:24.638Z","avatar_url":"https://github.com/FraunhoferIKS.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003ch1 align=\"center\"\u003e\n\u003cimg src=\"https://raw.githubusercontent.com/FraunhoferIKS/parcs/9027c844fb1a46cacfdc55af5f54bf090ba8f707/images/parcs_light.svg\" width=\"300\"\u003e\n\u003c/h1\u003e\u003cbr\u003e\n\n\n\n[![DOI](https://zenodo.org/badge/592506885.svg)](https://zenodo.org/badge/latestdoi/592506885)\n![PyPI](https://img.shields.io/pypi/v/pyparcs)\n\n**PA**-rtially **R**-andomized **C**-ausal **S**-imulator is a simulation tool for causal \nmethods. This library is designed to facilitate simulation study design and serve as a standard \nbenchmarking tool for causal inference and discovery methods. PARCS generates simulation \nmechanisms based on causal DAGs and a wide range of adjustable parameters. Once the simulation \nsetup is described via legible instructions and rules, PARCS automatically probes the space of \nall complying mechanisms and synthesizes data from both observational and interventional distributions. We encourage the causal inference researchers to utilize PARCS as a standard benchmarking tool for future works.\n\n**_Funding statement:_** This project was funded by the Bavarian Ministry for Economic Affairs, \nRegional Development and \n Energy as part of a project to support the thematic development of the Institute for Cognitive Systems.\n\n**_Cite this work:_** The supporting research paper for PARCS will be announced here soon for \ncitation and reference.\n\n\u003e **_NOTE:_** This project is not under active development anymore. It remains here for reference only.\n\n## Installation\n\nInstallation is possible using pip:\n\n```commandline\npip install pyparcs\n```\n\n## Get started (A bare minimum)\n\nTo simulate a causal DAG, describe the graph by its nodes and edges and instantiate a graph object. You can sample from the graph's observational and interventional \ndistributions:\n\n```python\nfrom pyparcs import Description, Graph\nimport numpy as np\nnp.random.seed(2023)\n\ndescription = Description({'C': 'normal(mu_=0, sigma_=1)',\n                           'A': 'normal(mu_=2C-1, sigma_=C^2+1)',\n                           'Y': 'uniform(mu_=A+C, diff_=2)'},\n                          infer_edges=True)\ngraph = Graph(description)\nsamples, _ = graph.sample(size=5)\n#           C         A         Y\n# 0  1.228778  0.297618  1.702500\n# 1 -1.074313 -5.610021 -6.748542\n# 2  0.604591 -2.538791 -1.885425\n# 3 -0.109575 -1.104919 -1.211730\n# 4 -1.031419 -3.615304 -4.924973\n\nsamples, _ = graph.do(size=3, interventions={'A': 2.5})\n#           C    A         Y\n# 0 -0.418041  2.5  1.442606\n# 1 -1.803585  2.5  0.826138\n# 2 -0.466009  2.5  1.787118\n\nsamples, _ = graph.do_functional(size=3,\n                                 intervene_on='Y', inputs=['A', 'C'],\n                                 func=lambda a, c: (a+c)*10)\n#           C         A          Y\n# 0 -1.259351 -5.846128 -71.054782\n# 1 -0.309356 -2.557167 -28.665228\n# 2  0.741366  1.578032  23.193976\n```\n\nYou can describe a graph partially and only up to a level:\n```yaml\n# description_outline.yml\n\nC: normal(mu_=1, sigma_=1)\nA: normal(mu_=?C+2, sigma_=1) # mu_ parameter is not specified\nY: random # Y conditional distribution is not specified\n\nC-\u003eA: identity()\nC-\u003eY: identity()\nA-\u003eY: identity()\n```\n\nand let PARCS randomize the free parameters according to a guideline:\n```yaml\n# guideline_outline.yml\n\nnodes:\n  bernoulli:\n    p_: [ [f-range, 1, 2] , 0 , [f-range, 2, 3] ]\n  normal:\n    mu_: [ [f-range, -2, -1] , [f-range, 0.5, 1] , 0 ]\n    sigma_: [ [f-range, 1, 3] , 0 , 0 ]\nedges:\n  identity: null\n```\n\nIn this guideline, randomization ranges are specified (e.g. bias term for `mu_` is sampled \nfrom the continuous uniform `[-2, -1]`). \n```python\nfrom pyparcs import Description, Graph, Guideline\nimport numpy as np\nnp.random.seed(2023)\n\n\ndescription = Description('description_outline.yml')\nguideline = Guideline('guideline_outline.yml')\n\ndescription.randomize_parameters(guideline)\ngraph = Graph(description)\nsamples, _ = graph.sample(size=3)\n#           C         A    Y\n# 0  1.434386  1.447402  1.0\n# 1  0.351719  2.092142  1.0\n# 2 -0.026576  1.479390  1.0\n\n# Randomized description for the graph\ndescription.outline\n# {'A': 'normal(mu_=1.0+0.66C, sigma_=1.0+C^2)',\n#  'C': 'normal(mu_=1, sigma_=1.0)',\n#  'C-\u003eA': 'identity()',\n#  'C-\u003eY': 'identity(), correction[]',\n#  'Y': 'bernoulli(p_=1.44+2.67C^2), correction[]'}\n\n```\n\n## Documentation \u0026 Support\n\n- The PARCS documentation can be found [here](https://fraunhoferiks.github.io/parcs/).\n- Contact the authors for theoretical and technical support:\n  - [Alireza Zamanian](\u003chttps://orcid.org/0000-0001-7412-6755\u003e)\n  - [Ruijie Chen]()\n  - [Leopold Mareis](\u003chttps://orcid.org/0000-0002-2624-6522\u003e)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffraunhoferiks%2Fparcs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffraunhoferiks%2Fparcs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffraunhoferiks%2Fparcs/lists"}