{"id":19647079,"url":"https://github.com/idsia/credici","last_synced_at":"2025-09-09T06:55:18.042Z","repository":{"id":44051531,"uuid":"271822066","full_name":"IDSIA/credici","owner":"IDSIA","description":"Credici: Credal Inference for Causal Inference","archived":false,"fork":false,"pushed_at":"2024-03-20T06:38:45.000Z","size":1025849,"stargazers_count":13,"open_issues_count":10,"forks_count":1,"subscribers_count":8,"default_branch":"master","last_synced_at":"2024-03-20T07:40:41.509Z","etag":null,"topics":["causal-inference","causal-models","causality","credal","imprecise-probability","probabilistic-graphical-models"],"latest_commit_sha":null,"homepage":"https://credici.readthedocs.io/","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"lgpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/IDSIA.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","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}},"created_at":"2020-06-12T14:48:46.000Z","updated_at":"2024-04-15T10:42:09.862Z","dependencies_parsed_at":"2023-10-16T23:39:46.973Z","dependency_job_id":"fa0d5974-68a8-49e0-a9be-a88c59d1525a","html_url":"https://github.com/IDSIA/credici","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/IDSIA%2Fcredici","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/IDSIA%2Fcredici/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/IDSIA%2Fcredici/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/IDSIA%2Fcredici/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/IDSIA","download_url":"https://codeload.github.com/IDSIA/credici/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251338613,"owners_count":21573585,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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-inference","causal-models","causality","credal","imprecise-probability","probabilistic-graphical-models"],"created_at":"2024-11-11T14:42:18.054Z","updated_at":"2025-04-28T15:31:16.107Z","avatar_url":"https://github.com/IDSIA.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cimg src=\"./docs/_static/img/logo.png\" alt=\"Credici\" width=\"500\"/\u003e\n\nCredici is an open-source library that allows to use credal inference methods\nfor causal analysis:\n\n\n```\nimport ch.idsia.credici.inference.CredalCausalApproxLP;\nimport ch.idsia.credici.inference.CredalCausalVE;\nimport ch.idsia.credici.model.StructuralCausalModel;\nimport ch.idsia.crema.IO;\nimport ch.idsia.crema.factor.credal.linear.IntervalFactor;\nimport ch.idsia.crema.factor.credal.vertex.VertexFactor;\nimport ch.idsia.crema.model.graphical.specialized.BayesianNetwork;\nimport gnu.trove.map.TIntIntMap;\nimport gnu.trove.map.hash.TIntIntHashMap;\n\nimport java.io.IOException;\n\npublic class EquationlessFromFile {\n    public static void main(String[] args) throws IOException, InterruptedException {\n\n        // Load the empirical model\n        String fileName = \"./models/simple-bayes.uai\";\n        BayesianNetwork bnet = (BayesianNetwork) IO.read(fileName);\n\n        // Get the markovian equationless SCM\n        StructuralCausalModel causalModel = StructuralCausalModel.of(bnet);\n\n        // Set query\n        TIntIntMap intervention = new TIntIntHashMap();\n        intervention.put(0,1);\n        int target = 1;\n\n\n        // Approx inference\n        CredalCausalAproxLP inf = new CredalCausalAproxLP(causalModel, bnet.getFactors());\n        IntervalFactor res = inf.doQuery(target, intervention);\n        System.out.println(res);\n\n        //Exact inference\n        CredalCausalVE inf2 = new CredalCausalVE(causalModel, bnet.getFactors());\n        VertexFactor res2 = inf2.doQuery(target, intervention);\n        System.out.println(res2);\n        \n    }\n}\n\n\n\n```\n\n\n## Installation\n\nAdd the following code in the  pom.xml of your project:\n\n```\n    \u003crepositories\u003e\n        \u003crepository\u003e\n            \u003cid\u003ecremaRepo\u003c/id\u003e\n            \u003curl\u003ehttps://raw.github.com/idsia/crema/mvn-repo/\u003c/url\u003e\n        \u003c/repository\u003e\n    \u003c/repositories\u003e\n\n    \u003cdependencies\u003e\n        \u003cdependency\u003e\n            \u003cgroupId\u003ech.idsia\u003c/groupId\u003e\n            \u003cartifactId\u003ecredici\u003c/artifactId\u003e\n            \u003cversion\u003e0.1.4\u003c/version\u003e\n            \u003cscope\u003ecompile\u003c/scope\u003e\n        \u003c/dependency\u003e\n    \u003c/dependencies\u003e\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fidsia%2Fcredici","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fidsia%2Fcredici","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fidsia%2Fcredici/lists"}