{"id":21722011,"url":"https://github.com/iftekheraziz/causality-mining","last_synced_at":"2025-10-19T01:13:13.304Z","repository":{"id":264536814,"uuid":"893619900","full_name":"IftekherAziz/Causality-Mining","owner":"IftekherAziz","description":"Data Mining","archived":false,"fork":false,"pushed_at":"2024-11-24T22:33:54.000Z","size":125,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-20T21:55:46.582Z","etag":null,"topics":["casuality","computer-science","data-mining","data-mining-algorithms","data-mining-python","masters-degree","university-coursework"],"latest_commit_sha":null,"homepage":"","language":"Jupyter Notebook","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/IftekherAziz.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2024-11-24T22:25:22.000Z","updated_at":"2024-11-24T22:34:58.000Z","dependencies_parsed_at":"2024-11-24T23:36:25.779Z","dependency_job_id":null,"html_url":"https://github.com/IftekherAziz/Causality-Mining","commit_stats":null,"previous_names":["iftekheraziz/causality-mining"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/IftekherAziz/Causality-Mining","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/IftekherAziz%2FCausality-Mining","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/IftekherAziz%2FCausality-Mining/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/IftekherAziz%2FCausality-Mining/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/IftekherAziz%2FCausality-Mining/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/IftekherAziz","download_url":"https://codeload.github.com/IftekherAziz/Causality-Mining/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/IftekherAziz%2FCausality-Mining/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":263088148,"owners_count":23412002,"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":["casuality","computer-science","data-mining","data-mining-algorithms","data-mining-python","masters-degree","university-coursework"],"created_at":"2024-11-26T02:20:13.604Z","updated_at":"2025-10-19T01:13:13.253Z","avatar_url":"https://github.com/IftekherAziz.png","language":"Jupyter Notebook","funding_links":[],"categories":[],"sub_categories":[],"readme":"Here is the updated `README.md` file reflecting the use of the Jupyter Notebook file:\n\n---\n\n### README.md\n\n# Assignment: Causality in Data Mining\n\nThis repository contains solutions and explanations for **Exercise Sheet 3: Causality** from the Data Mining course at the University of Vienna, Winter Semester 2024/25. The assignment explores concepts of causality using statistical methods, with a focus on Granger causality, multivariate causal models, and bivariate additive noise models.\n\n---\n\n## Assignment Overview\n\n### **Exercise 3-1: Granger Causal Test (6 points)**  \nThe objective is to analyze causal relationships between variables using Granger causality with real-world data on chickens (\\(Y\\)) and eggs (\\(X\\)) from U.S. egg production (1930–1935).\n\n1. **Auto-regression for \\(X\\) and \\(Y\\) (1.5 points)**  \n   Compute regression coefficients \\((\\beta_0, \\beta_1, \\beta_2)\\) for predicting \\(Y\\) based on lagged values of \\(X\\) and \\(Y\\). Compute \\(RSS1\\) (Residual Sum of Squares for the full model).\n\n2. **Auto-regression without \\(Y\\) (1.5 points)**  \n   Repeat the regression excluding \\(Y\\) and compute \\(RSS2\\) (Residual Sum of Squares for the reduced model).\n\n3. **Statistical Test (1.5 points)**  \n   Use the Granger-Sargent test to determine if \\(X\\) Granger-causes \\(Y\\) with \\(\\alpha = 0.05\\).\n\n4. **Causal Test for the Reverse Direction (1.5 points)**  \n   Repeat the above steps to test if \\(Y\\) Granger-causes \\(X\\). Interpret the results to address the \"chicken or egg\" question.\n\n---\n\n### **Exercise 3-2: Multivariate Granger Model (2 points)**  \nAnalyze causal relationships in high-dimensional settings using multivariate Granger models.\n\n1. **Consistency of Granger Models (1 point)**  \n   Evaluate the consistency of causal inference with ordinary least squares and adaptive Lasso penalties. Discuss if the method generalizes well in high-dimensional data.\n\n2. **HMMLGA Algorithm (1 point)**  \n   Explain the **High-order Mixed Model Lasso Granger Algorithm (HMMLGA)** and describe its key hyperparameters, including regularization parameter \\((\\lambda)\\), lag order \\((d)\\), and stopping criteria.\n\n---\n\n### **Exercise 3-3: Bivariate Causal Models on Non-Temporal Data (2 points)**  \nExplore causal relationships using bivariate additive noise models.\n\n1. **Non-identifiability in Linear-Gaussian Cases (1 point)**  \n   Explain why causal relationships between variables \\(X\\) and \\(Y\\) are non-identifiable when the noise is Gaussian and relationships are linear. Discuss the role of symmetry in the joint distribution.\n\n2. **Causal and Anti-Causal Directions (1 point)**  \n   For \\(X =\\) age and \\(Y =\\) blood pressure, explain:\n   - How to change \\(P(\\text{effect}|\\text{cause})\\) without affecting \\(P(\\text{cause})\\).\n   - How to change \\(P(\\text{cause})\\) without affecting \\(P(\\text{effect}|\\text{cause})\\).\n   - Challenges in the anti-causal direction.\n\n---\n\n## Key Topics Covered\n\n- **Granger Causality**:\n  - Statistical framework for analyzing temporal causal relationships.\n  - Tests based on differences in residual sums of squares.\n- **Multivariate Granger Models**:\n  - Extensions to handle high-dimensional data with sparse penalties like Lasso.\n- **Bivariate Additive Noise Models**:\n  - Challenges of causal inference in non-temporal, symmetric distributions.\n- **Real-World Applications**:\n  - Example datasets and domain-specific interpretations (e.g., chickens and eggs, age and blood pressure).\n\n---\n\n## Repository Structure\n\n```plaintext\n├── Exercise_Sheet_3_Solution.ipynb  # Jupyter Notebook containing all solutions\n├── README.md                        # Overview of the assignment\n```\n\n---\n\n## Instructions\n\n1. Clone this repository:\n   ```bash\n   git clone https://github.com/username/causality-assignment.git\n   cd causality-assignment\n   ```\n2. Install dependencies:\n   ```bash\n   pip install -r requirements.txt\n   ```\n3. Run the solutions:\n   Open the Jupyter Notebook in your preferred environment (e.g., Jupyter Lab or Jupyter Notebook):\n   ```bash\n   jupyter notebook Exercise_Sheet_3_Solution.ipynb\n   ```\n   - **Exercise 3-1**: Granger causality tests.\n   - **Exercise 3-2**: Multivariate Granger models.\n   - **Exercise 3-3**: Bivariate additive noise models.\n\n---\n\n## Acknowledgments\n\nThis assignment is part of the **Data Mining** course at the University of Vienna, guided by **RNDr. Katerina Schindlerová, CSc., Privatdoz.** and **Pranava Mummoju, MSc.**.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fiftekheraziz%2Fcausality-mining","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fiftekheraziz%2Fcausality-mining","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fiftekheraziz%2Fcausality-mining/lists"}