Skip to content

Instantly share code, notes, and snippets.

@savvastj
savvastj / predict_vs_simulate.org
Created August 9, 2018 15:55 — forked from tmalsburg/predict_vs_simulate.org
Predict vs simulate in lme4

Predict vs simulate in lme4

For this investigation we are going to use the sleepdata data set from the lme4 package. Here is the head of the data frame:

import numpy as np
from scipy.stats import binom_test
from sklearn.base import BaseEstimator, RegressorMixin
from xgboost.sklearn import XGBRegressor
from functools import partial
class XGBOOSTQUANTILE(BaseEstimator, RegressorMixin):
def __init__(self, quant_alpha,quant_delta,quant_thres,quant_var,
n_estimators = 100,max_depth = 3,reg_alpha = 5.,reg_lambda=1.0,gamma=0.5):
self.quant_alpha = quant_alpha
self.quant_delta = quant_delta
@savvastj
savvastj / convert.sh
Created February 27, 2016 04:30 — forked from betatim/convert.sh
🚀 Minimal `nbconvert` template to convert jupyter notebooks to HTML + thebe (details: https://betatim.github.io/posts/really-interactive-posts/). Open the generated HTML in a browser it will look like a normal notebook except for the code cells, which you can edit and execute!
# Convert your notebook to an interactive webpage
#
# Attached a notebook (really-interactive-posts.ipynb) and the generated
# output (really-interactive-posts.html). The thebe.tpl template file is
# at the very end of the gist.
$ jupyter nbconvert --template thebe.tpl --to html <notebook.ipynb>
# You can open the generated webpage locally file://... howerver some
Data Science
http://radar.oreilly.com/2010/06/what-is-data-science.html,What is data science? (oreilly.com)
http://hortonworks.com/blog/how-to-get-started-in-data-science/,How To Get Started In Data Science (hortonworks.com)
http://www.insidephilanthropy.com/home/2014/4/14/whos-getting-the-big-bucks-for-data-science-and-why.html,Who's Getting The Big Bucks? (insidephilanthropy.com)
http://www.citeworld.com/article/2139987/big-data-analytics/heres-how-one-company-built-its-data-science-operation.html,How To Build A data Science Team (citeworld.com)
http://www.computerworld.com/s/article/9248050/Cornell_Tech_funded_startup_launching_bootcamp_for_data_scientists,Data Science Bootcamp (computerworld.com)
http://www.datasciencetoolkit.org/,Data Science Toolkit (datasciencetoolkit.org)
http://blog.stephenwolfram.com/2013/04/data-science-of-the-facebook-world/,Data Science of the Facebook World (blog.stephenwolfram.com)
http://strata.oreilly.com/2011/05/data-science-terminology.html,Why The Term “Data Scien