Skip to content

Instantly share code, notes, and snippets.

@pprett
pprett / boston.json
Created October 1, 2012 18:28
Decision Tree Viewer (D3 and Sklearn)
{"error": 42716.2954, "samples": 506, "value": [22.532806324110698], "label": "RM <= 6.94", "type": "split", "children": [{"error": 17317.3210, "samples": 430, "value": [19.93372093023257], "label": "LSTAT <= 14.40", "type": "split", "children": [{"error": 6632.2175, "samples": 255, "value": [23.349803921568636], "label": "DIS <= 1.38", "type": "split", "children": [{"error": 390.7280, "samples": 5, "value": [45.58], "label": "CRIM <= 10.59", "type": "split", "children": [{"error": 0.0000, "samples": 4, "value": [50.0], "label": "Leaf - 4", "type": "leaf"}, {"error": 0.0000, "samples": 1, "value": [27.9], "label": "Leaf - 5", "type": "leaf"}]}, {"error": 3721.1632, "samples": 250, "value": [22.90520000000001], "label": "RM <= 6.54", "type": "split", "children": [{"error": 1636.0675, "samples": 195, "value": [21.629743589743576], "label": "LSTAT <= 7.57", "type": "split", "children": [{"error": 129.6307, "samples": 43, "value": [23.969767441860473], "label": "TAX <= 222.50", "type": "split", "children": [{"err
@naiquevin
naiquevin / tw.py
Created September 14, 2013 07:55
Twython wrapper for app authenticated requests to twitter api
from twython import Twython
## Defining access_token as a function so that the token may be cached
## using a decorator as follows,
##
## get_access_token = cache_textfile('.twython-token')(access_token)
##
def access_token(auth_client):
return auth_client.obtain_access_token()
#!/usr/bin/env python
"""git-pr: fetch a pull request
git pr NR
git pr NR0 NR1 NR2
git pr NR0 NR1 NR2 -args -to -git-fetch
Adds a new branch "pr/NR"
"""
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@GaelVaroquaux
GaelVaroquaux / gist:33e7a7b297425890fefa
Created July 10, 2015 14:07
Notes from reproducible machine learning discussion at ICML 2015 MLOSS workshop

Introductory quote:

"Machine learning people use hugely complex algorithms on trivially simple datasets. Biology does trivially simple algorithms on hugely complex datasets."

Concepts of reproducible science

  • Replicability
@juliaferraioli
juliaferraioli / gcp-next-data.md
Last active August 29, 2018 09:33
Test and training image attribution