Skip to content

Instantly share code, notes, and snippets.

View jhemann's full-sized avatar

Josh Hemann jhemann

View GitHub Profile
@johnmyleswhite
johnmyleswhite / indexing.R
Created September 18, 2014 05:32
R indexing showcases all possible design theories
> v <- c(1, 2, 3, 4)
> v[1]
[1] 1
> v[4]
[1] 4
> v[0]
numeric(0)
> v[5]
[1] NA
> v[-1]
import numpy as np
from matplotlib import pylab as plt
#from mpltools import style # uncomment for prettier plots
#style.use(['ggplot'])
# generate all bernoulli rewards ahead of time
def generate_bernoulli_bandit_data(num_samples,K):
CTRs_that_generated_data = np.tile(np.random.rand(K),(num_samples,1))
true_rewards = np.random.rand(num_samples,K) < CTRs_that_generated_data
return true_rewards,CTRs_that_generated_data
@debasishg
debasishg / gist:8172796
Last active July 5, 2024 11:53
A collection of links for streaming algorithms and data structures

General Background and Overview

  1. Probabilistic Data Structures for Web Analytics and Data Mining : A great overview of the space of probabilistic data structures and how they are used in approximation algorithm implementation.
  2. Models and Issues in Data Stream Systems
  3. Philippe Flajolet’s contribution to streaming algorithms : A presentation by Jérémie Lumbroso that visits some of the hostorical perspectives and how it all began with Flajolet
  4. Approximate Frequency Counts over Data Streams by Gurmeet Singh Manku & Rajeev Motwani : One of the early papers on the subject.
  5. [Methods for Finding Frequent Items in Data Streams](http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.187.9800&amp;rep=rep1&amp;t
@jhemann
jhemann / MomentOfScience_blog_post.ipynb
Last active September 21, 2016 12:30
Code to evaluate speed improvements using numba versus cython on a matrix factorization problem used in the setting of a recommendation system.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@agramfort
agramfort / nngarotte.py
Created April 10, 2012 12:31
Non Negative Garotte
"""
Non-Negative Garotte implementation with the scikit-learn
"""
# Author: Alexandre Gramfort <alexandre.gramfort@inria.fr>
# Jaques Grobler (__main__ script) <jaques.grobler@inria.fr>
#
# License: BSD Style.
import numpy as np