Skip to content

Instantly share code, notes, and snippets.

View ychervonyi's full-sized avatar
⚒️
Focusing

Yuri Chervonyi ychervonyi

⚒️
Focusing
  • Google
  • San Francisco Bay Area
View GitHub Profile
@ychervonyi
ychervonyi / simplified_auc.py
Created April 7, 2019 01:26
Simplified tf.metrics.auc
def auc(labels,
predictions,
weights=None,
num_thresholds=200,
metrics_collections=None,
updates_collections=None,
curve='ROC',
name=None):
with variable_scope.variable_scope(name, 'auc',
(labels, predictions, weights)):
@ychervonyi
ychervonyi / mlp_iris_keras_dropouts.py
Last active August 24, 2017 20:43
MLP on IRIS using Keras with different dropouts
import seaborn as sns
import numpy as np
from sklearn.cross_validation import train_test_split
from sklearn.linear_model import LogisticRegressionCV
from keras.models import Sequential
from keras.layers import Dense, Dropout
from keras.regularizers import l2
from keras.utils import np_utils
import matplotlib.pyplot as plt
import keras
@ychervonyi
ychervonyi / mlp_iris_keras_hidden.py
Last active August 24, 2017 21:40
MLP on IRIS using Keras with different size of hidden layer
import seaborn as sns
import numpy as np
from sklearn.model_selection import train_test_split
from keras.models import Sequential
from keras.layers import Dense, Dropout
from keras.regularizers import l2
from keras.utils import np_utils
import matplotlib.pyplot as plt
import keras