Skip to content

Instantly share code, notes, and snippets.

Gonzalo Gasca Meza spicyramen

  • Silicon Valley
Block or report user

Report or block spicyramen

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View kfold_verification.py
# MLP for Pima Indians Dataset with 10-fold cross validation
from keras.models import Sequential
from keras.layers import Dense
from sklearn.model_selection import StratifiedKFold
import numpy
# fix random seed for reproducibility
seed = 7
numpy.random.seed(seed)
# load pima indians dataset
View manual_verification.py
# MLP with manual validation set
from keras.models import Sequential
from keras.layers import Dense
from sklearn.model_selection import train_test_split
import numpy as np
# fix random seed for reproducibility
seed = 7
np.random.seed(seed)
# load pima indians dataset
View automatic_verification.py
# MLP with manual validation set
from keras.models import Sequential
from keras.layers import Dense
from sklearn.model_selection import train_test_split
import numpy as np
# fix random seed for reproducibility
seed = 7
np.random.seed(seed)
# load pima indians dataset
View model_final.py
# Create your first MLP in Keras
from keras.models import Sequential
from keras.layers import Dense
import numpy
FILENAME = '../data/pima-indians-diabetes.csv'
# Fix random seed for reproducibility.
seed = 7
numpy.random.seed(seed)
View model_evaluate.py
scores = model.evaluate(X, Y)
print("%s: %.2f%%" % (model.metrics_names[1], scores[1]*100))
View model_fit.py
model.fit(X, Y, nb_epoch=150, batch_size=10)
View model_compile.py
model.compile(loss='binary_crossentropy', optimizer='adam', metrics=['accuracy'])
View model.py
model = Sequential()
model.add(Dense(12, input_dim=8, init='uniform', activation='relu'))
model.add(Dense(8, init='uniform', activation='relu'))
model.add(Dense(1, init='uniform', activation='sigmoid'))
View dataset.py
from keras.models import Sequential
from keras.layers import Dense
import numpy
seed = 7
numpy.random.seed(seed)
# Cargar el dataset de los indios Pima.
dataset = numpy.loadtxt("pima-indians-diabetes.csv", delimiter=",")
View app.py
"""Extract important information from AppAnnie via API."""
import pandas as pd
from absl import app
from absl import flags
from absl import logging
from bs4 import BeautifulSoup as BS
from collections import namedtuple
from retrying import retry
You can’t perform that action at this time.