Skip to content

Instantly share code, notes, and snippets.

View FavioVazquez's full-sized avatar
💻
Changing the world :)

Favio André Vázquez FavioVazquez

💻
Changing the world :)
View GitHub Profile
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
%matplotlib inline
from urllib.request import urlopen
import numpy as np
import cv2
from matplotlib import pyplot as plt
from albumentations import (
HorizontalFlip, IAAPerspective, ShiftScaleRotate, CLAHE, RandomRotate90,
Transpose, ShiftScaleRotate, Blur, OpticalDistortion, GridDistortion, HueSaturationValue,
id firstname lastname billingid product price birth new_date years_between
10 james maxwell 875 taco 3 1923/03/12 12-03-1923 95.4355
11 isaac newton 992 pasta 9 1999/02/15 15-02-1999 19.5108
12 emmy noether 234 pasta 9 1993/12/08 08-12-1993 24.6962
12| emmy| noether| 234| pasta| 9|1993/12/08|08-12-1993| 24.6962|
id firstName lastName billingId product price birth dummyCol
1 Luis Alvarez$$%! 123 Cake 10 1980/07/07 never
2 André Ampère 423 piza 8 1950/07/08 gonna
3 NiELS Böhr//((%% 551 pizza 8 1990/07/09 give
3| NiELS| Böhr//((%%| 551| pizza| 8|1990/07/09| give|
import numpy as np
from sklearn.datasets import make_classification
from torch import nn
import torch.nn.functional as F
from skorch import NeuralNetClassifier
X, y = make_classification(1000, 20, n_informative=10, random_state=0)
X = X.astype(np.float32)
from tpot import TPOTClassifier
from sklearn.datasets import load_digits
from sklearn.model_selection import train_test_split
# load and split dataset
digitsdigits == load_digitsload_di ()
X_train, X_test, y_train, y_test = train_test_split(digits.data, digits.target,
train_size=0.75, test_size=0.25)
# Fit the TPOT classifier
from tpot import TPOTClassifier
from sklearn.datasets import load_iris
from sklearn.model_selection import train_test_split
# Load iris dataset
iris = load_iris()
# Split the data
X_trainX_train, X_test, y_train, y_test = train_test_split(iris.data, iris.target,
from keras.datasets import mnist
from autokeras.classifier import ImageClassifier
if __name__ == '__main__':
(x_train, y_train), (x_test, y_test) = mnist.load_data()
x_train = x_train.reshape(x_train.shape + (1,))
x_test = x_test.reshape(x_test.shape + (1,))
clf = ImageClassifier(verbose=True, augment=False)
clf.fit(x_train, y_train, time_limit=12 * 60 * 60)