This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import datetime, coronacaster, pandas | |
data = coronacaster.get_data_from_eu() | |
out = [] | |
countries = data.countries | |
for country in countries: | |
# parameters start | |
for ftype in ['poly1', 'poly2', 'poly3', 'logis', 'sigmoid', 'scurve']: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function csvImport(path_to_file) { | |
d3.csv(path_to_file).then(prepData); | |
function prepData(dataset) { | |
// create the columns | |
var keys = Object.keys(dataset[0]) | |
var headers = [] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# name of the service | |
NAME=$1 | |
# exec and service file paths | |
EXEC_FILE=$2 | |
SERVICE_FILE=/etc/systemd/system/"$NAME".service | |
# timing | |
TIMER_FILE=/etc/systemd/system/"$NAME".timer | |
TIMING=$3 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import talos as ta | |
x, y = ta.templates.datasets.cervical_cancer() | |
p = ta.templates.params.cervical_cancer() | |
model = ta.templates.models.cervical_cancer() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import signs as signs | |
import pandas as pd | |
# load some text | |
df = pd.read_csv('tweets.csv').text | |
# load vectors | |
e = signs.Embeds("glove.twitter.27B.25d.txt") | |
# get Keras embeddings layer |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import talos as ta | |
from keras.models import Sequential | |
from keras.layers import Dense | |
def minimal(): | |
x, y = ta.datasets.iris() | |
p = {'activation':['relu', 'elu'], | |
'optimizer': ['Nadam', 'Adam'], |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import talos | |
from keras.models import Sequential | |
from keras.layers import Dense | |
def minimal(): | |
x, y = talos.templates.datasets.iris() | |
p = {'activation':['relu', 'elu'], | |
'optimizer': ['Nadam', 'Adam'], |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def iris_model(x_train, y_train, x_val, y_val): | |
model = Sequential() | |
model.add(Dense(32, input_dim=8, activation='adam')) | |
model.add(Dense(1, activation='sigmoid')) | |
model.compile(optimizer='relu', loss='binary_crossentropy') | |
out = model.fit(x_train, y_train, | |
batch_size=24, | |
epochs=100, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
p = {'lr': (0.8, 1.2, 3), | |
'first_neuron':[4, 8, 16, 32, 64], | |
'hidden_layers':[0, 1, 2], | |
'batch_size': (1, 5, 5), | |
'epochs': [50, 100, 150], | |
'dropout': (0, 0.2, 3), | |
'weight_regulizer':[None], | |
'emb_output_dims': [None], | |
'shape':['brick','long_funnel'], | |
'kernel_initializer': ['uniform','normal'], |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# and run the experiment | |
t = ta.Scan(x=x, | |
y=y, | |
model=breast_cancer_model, | |
grid_downsample=0.01, | |
params=p, | |
dataset_name='breast_cancer', | |
experiment_no='1') |
NewerOlder