Skip to content

Instantly share code, notes, and snippets.

View ejokeeffe's full-sized avatar

Eoin O'Keeffe ejokeeffe

  • Edinburgh
View GitHub Profile
@ejokeeffe
ejokeeffe / install-postgis.sh
Last active November 2, 2017 12:11 — forked from whyvez/install-postgis.sh
postGIS install on AWS linux AMI
#!/bin/bash
#
# Script to setup a Elastic Beanstalk AMI with geospatial libraries and postGIS
#
# sh aws_ami_prep.sh > aws_ami_prep.log 2>&1 &
# Go to ec2-user home directory
cd /home/ec2-user
# yum libraries
from sklearn import linear_model
from scipy import stats
import numpy as np
class LinearRegression(linear_model.LinearRegression):
"""
LinearRegression class after sklearn's, but calculate t-statistics
and p-values for model coefficients (betas).
Additional attributes available after .fit()