I hereby claim:
- I am victorgarritano on github.
- I am victor_garritano (https://keybase.io/victor_garritano) on keybase.
- I have a public key ASCdHnMkIDTKSETCpwMlM1I7iWxtuNiJM_foOkuS_UM0Ygo
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
import requests | |
import pandas as pd | |
from bs4 import BeautifulSoup | |
url = "http://www.maisbolao.com.br/bolao/classificacao/31858/bolao-da-twist" | |
class HTMLTableParser: | |
def parse_url(self, url): |
import numpy as np | |
import matplotlib.pyplot as plt | |
n = 50 | |
Xtest = np.linspace(-5, 5, n).reshape(-1,1) | |
def kernel(a, b, param): | |
sqdist = np.sum(a**2, 1).reshape(-1,1) + np.sum(b**2, 1) - 2*np.dot(a, b.T) | |
return np.exp(-0.5 * (1/param) * sqdist) |
hamming = lambda x,y: (1.0/len(x))*sum([a != b for a,b in zip(x,y)]) |
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
"""Usage: | |
>>> from sklearn.datasets import load_iris | |
>>> data = load_iris() | |
>>> obj = disc.Discretization(data.data, {0:7,1:3, 2:10, 3:4}) | |
>>> X_t = obj.fit_transform() | |
>>> sample = X_t[65,:] |