I hereby claim:
- I am rupenp on github.
- I am rupen (https://keybase.io/rupen) on keybase.
- I have a public key ASBpT2nygtlnBCiKuT8ovgw3R68waWeXOaQ1VCDcT4r0cgo
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
| from UserDict import IterableUserDict | |
| import collections | |
| __author__ = 'github.com/hangtwenty' | |
| def tupperware(mapping): | |
| """ Convert mappings to 'tupperwares' recursively. |
| from math import sqrt | |
| phi = (1 + sqrt(5))/2 | |
| resphi = 2 - phi | |
| # a and b are the current bounds; the minimum is between them. | |
| # c is the center pointer pushed slightly left towards a | |
| def goldenSectionSearch(f, a, c, b, absolutePrecision): | |
| if abs(a - b) < absolutePrecision: | |
| return (a + b)/2 | |
| # Create a new possible center, in the area between c and b, pushed against c |
| import numpy as np | |
| import warnings | |
| from itertools import cycle, izip | |
| from sklearn.utils import gen_even_slices | |
| from sklearn.utils import shuffle | |
| from sklearn.base import BaseEstimator | |
| from sklearn.base import ClassifierMixin | |
| from sklearn.preprocessing import LabelBinarizer |