Reference no: EM133746252
Programming AI for Business Analytics
Assessment - Skills-Building: Causal AI with Python
Assessment - Practical Python Causal Artificial Intelligence Coding
Your Task
Follow the steps within the Google Colab notebook to complete the Python code and interpret the results. At the end of the assessment upload the notebook with your answers and code changes to the portal. Uploading the wrong file will be treated as poor project management practice and penalised accordingly.
Background
Imagine that you are a Business Analyst in a top consulting firm and that you have been tasked with the identification of factors that cause Australian macroeconomic changes.
This skills-building exercise is a workflow that has been designed to simulate this use case and consolidate your practical knowledge of Python, Google Colab, and machine-learning approaches for causal inference.
The Google Colab notebook for this assessment will be provided on the day of the assessment.
Assessment Instructions
Section #1: Machine Learning
1A: Installation & Module Imports
Step 1: Install Python libraries and import Python modules.
Run all the codes that will install and import the necessary Python libraries and models.
Step 2: Load and import macroeconomic data as a dataframe.
Load data: read csv file containing macroeconomic data. Create a suitable variable name for the dataframe.
Write the Python code that displays information about the dataframe.
1B: Ordinary Least Squares
Step 1: Basic Dataframe Operations
Perform the necessary steps to transform the dataframe in a format ready for machine learning.
Step 2: Perform Ordinary Least Squares
Perform Ordinary Least Squares (OLS) and answer the following question: what proportion of the outcome variable could be explained by the predictor, or feature, variables?
1C: Gradient Boosting Method
Step 1: XGBoost Machine Learning Algorithm
Create an XGBoost ML model in Python. Create a suitable variable name for the model.
Section #2: Explainable Machine Learning
2A: SHAP
Step 1: Create a SHAP Waterfall Plot of XGBoost ML
What are the Top 5 features that are correlated with the outcome variable?
Step 2: Create a SHAP Force Plot of XGBoost ML
Write no more than one paragraph summary of the insights shown by the SHAP force plot.
2B: Partial Dependence Plots (PDPs)
Step 1: Create a PDP of one feature against the outcome variable
Select one data feature and create a Python code that will display the PDP chart showing effects of this feature on the outcome.
Step 2: Select a second data feature and create a PDP against the outcome variable Select another, different, data feature and create a Python code that will display the PDP chart showing effects of this feature on the outcome.
Section #3: Predict Causal Factors
Step 1: Use EconML AI Causal Learner
Create a suitable variable name for the causal machine learner.
Complete the Python code to create an EconML causal learner.
Step 2: ATE Chart - Visualisation of Causal Factors
Write Python code that will display a chart of the Average Treatment Effect (ATE) magnitudes, or values, for all the data features.
Which of the data features are macroeconomic causal factors?
Given the macroeconomic causal factors, what recommendations would you make to the Australian government?