Giter VIP home page Giter VIP logo

metricsmlnotebooks's Introduction

Applied Causal ML Notebooks

metricsmlnotebooks's People

Contributors

chansen776 avatar ganglitan avatar indraos avatar jyoung1996 avatar martinspindler avatar nathankallus avatar oliverschacht avatar vasilismsr avatar vsyrgkanis avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

metricsmlnotebooks's Issues

Syntax errors/typos in rct_vaccines.ipynb

  1. In the first code cell,
outcome_controls =115/num_controls

should be outcome_controlled to match later code.

  1. In the first code cell,
std_treatment_effect = np.sqrt(var_treatment_effect

is missing the right parenthesis.

  1. In the first code cell,
print(f"95 % confidence interval is [{CI_delta[0])}, {CI_delta[1]}]")

has an extra parenthesis after CI_delta[0].

  1. In the Pfizer/BNTX Covid-19 RCT markdown cell, "averal" is written instead of "overall."

  2. In the cell below, "vaccie" is written instead of "vaccine."

Revise notebooks

For the polishing of the notebooks, a list of the notebooks is here:

https://docs.google.com/spreadsheets/d/1RL01oaOYDZ2PM9CtjOShPM_dOrxbFbnd72dHPMOpPds/edit?usp=sharing
and the notebooks sections in the book (might slightly differ).

Tasks:

  1. Checking all notebooks (chapter by chapter)
    a) if they run without error and are correct, in particular
  1. If missing, translation of notebooks from R to Python or the other way around, so that R and Python scripts are available (but might differ)
  2. Preparation of new notebooks (Oliver is working on DiD; RD next)

Update kaggle notebooks from new PM1 .Rmd files

In this issue, we will update the notebooks housed on kaggle for PM1 following the updated .Rmd files in PM1.

@MartinSpindler Can you assign a task to the relevant person to take the newly updated .Rmd files in directory PM1 and convert them to Kaggle notebooks? We will then want to change the Python code and notebooks to identical structure.

PM1_prediction.ipynb Jupyter Book Cannot Load .RData

The current code links to github's wage data which is only an RData dataset, then the code reads:

Data Analysis
Set the following file_directory to a place where you downloaded https://github.com/CausalAIBook/MetricsMLNotebooks/blob/main/PM1/wage2015_subsample_inference.rdata

file_dir = None
df = pd.read_csv(file_dir)

I found two solutions:

  1. Import RData to Pandas ready package (taken from my collab code):
!pip install pyreadr
import pyreadr
import numpy as np
import pandas as pd
temp = pyreadr.read_r('/content/wage2015_subsample_inference.Rdata')
df = temp['data']
  1. Upload a CSV

wget error in pm2-notebook-jannis.ipynb

In cell 2 of pm2-notebook-jannis.ipynb

growth_read = read_r(wget("https://github.com/CausalAIBook/MetricsMLNotebooks/blob/main/data/GrowthData.rda?raw=true"))

should be

growth_read = read_r(wget.download("https://github.com/CausalAIBook/MetricsMLNotebooks/blob/main/data/GrowthData.rda?raw=true"))

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.