Skip to content

Instantly share code, notes, and snippets.

View ttungl's full-sized avatar

Tung Thanh Le ttungl

View GitHub Profile
@ttungl
ttungl / ex matching.py
Created April 4, 2022 06:30 — forked from BioSciEconomist/ex matching.py
Very basic propensity score matching and IPTW analysis with balance diagnostics
# *-----------------------------------------------------------------
# | PROGRAM NAME: ex matching.py
# | DATE: 6/25/21
# | CREATED BY: MATT BOGARD
# | PROJECT FILE:
# *----------------------------------------------------------------
# | PURPOSE: very basic matching and IPTW analysis with balance diagnostics
# *----------------------------------------------------------------
@ttungl
ttungl / stacking_example.py
Last active October 31, 2021 03:10 — forked from geffy/stacking_example.py
Stacking example
# -*- coding: utf-8 -*-
"""
Created on Mon Sep 23 23:16:44 2017
@author: Marios Michailidis
This is an example that performs stacking to improve mean squared error
This examples uses 2 bases learners (a linear regression and a random forest)
and linear regression (again) as a meta learner to achieve the best score.
The initial train data are split in 2 halves to commence the stacking.