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
protein = "beta2" | |
fingerprint = "KlekFP" | |
# Read data, not important | |
actives, inactives = get_protein_fingerprint_cluster_files(protein, fingerprint) | |
clusters_active = [] | |
for a, _ in actives: | |
clusters_active.append(pd.io.parsers.read_csv(os.path.join(c["DATA_DIR"], a), header=None).as_matrix().astype("float32")) | |
inactive = pd.io.parsers.read_csv(os.path.join(c["DATA_DIR"], inactives), header=None).as_matrix().astype("float32") |
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 get_sabina_clusters(protein, fingerprint): | |
# Read data | |
actives, inactives = get_protein_fingerprint_cluster_files(protein, fingerprint) | |
clusters_active = [] | |
for a, _ in actives: | |
clusters_active.append(pd.io.parsers.read_csv(os.path.join(c["DATA_DIR"], a), header=None).as_matrix().astype("float32")) | |
inactive = pd.io.parsers.read_csv(os.path.join(c["DATA_DIR"], inactives), header=None).as_matrix().astype("float32") |
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
Protein: 5ht1a | |
Satisfied? Not satisfied | |
Sizes of clusters [5669, 6, 12, 30, 11, 3] | |
----- | |
Protein: 5ht2a | |
Satisfied? Not satisfied | |
Sizes of clusters [2828, 191, 29, 55, 11, 6, 2] | |
----- |
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
- przypomnienie lub wprowadzenie do sieci feedforward i ich trenowanie przy pomocy stochastic gradient descent | |
- sieci konwolucyjnych (CNN): | |
- local connectivity | |
- parameter sharing | |
- convolution | |
- pooling / subsampling | |
- trenowanie CNN | |
- zastosowanie CNN w computer vision | |
- object recognition | |
- deep rank |
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
# coding: utf-8 | |
## Praktyczny Machine Learning w Pythonie | |
### Czy wszystko jest poprawnie zainstalowane? | |
# In[14]: | |
import matplotlib.pylab as plt # pakiet do rysowania | |
import numpy as np # pakiet do manipulacji macierzami | |
import sklearn # scikit-learn, który będzie podstawowym tematem dzisiejszych warsztatów |
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
In file included from cec/kmeanspp_assignment.cpp:1: | |
In file included from ../inst/include/cec/kmeanspp_assignment.hpp:4: | |
In file included from /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/list:178: | |
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/algorithm:685:97: error: invalid operands to binary expression ('const gmum::Pair' and 'const gmum::Pair') | |
_LIBCPP_INLINE_VISIBILITY bool operator()(const _T1& __x, const _T1& __y) const {return __x < __y;} | |
~~~ ^ ~~~ | |
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/list:2188:13: note: in instantiation of member function 'std::__1::__less<gmum::Pair, gmum::Pair>::operator()' requested here | |
if (__comp(*--__e2, *__f1)) | |
^ | |
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault |
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 odespy | |
import numpy as np | |
dt = np.float64 | |
mu = dt(1.0)/dt(82.45) | |
lamb = dt(1.0) - mu | |
def gprim_1(t,z): | |
return z[1] |
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 pandas as pd | |
import numpy as np | |
def get_city_meteo(city): | |
a = [pd.read_csv(os.path.join(c["DATA_DIR"], str(city)+"-201"+str(i)+".csv"), sep=",") for i in range(4)] | |
csv = pd.concat(a) | |
# Do simple transformations | |
columns = ["date_year", "date_month", "date_day", "date_hour", "cloud_amount", "pressure", "temperature", "wind_speed", "percipitation_amount"] | |
csv.index = range(len(csv)) | |
csv = csv[columns] |
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
dataset = DenseDesignMatrix(X=X_train, y=Y_train[:,11:12].reshape(-1,1).astype("int64")) | |
hidden_layer = mlp.Sigmoid(layer_name='hidden', dim=1000, sparse_init =15, init_bias=1.) | |
output_layer = mlp.Softmax(n_classes=1, sparse_init =1, layer_name='output') | |
layers = [hidden_layer, output_layer] | |
ann = mlp.MLP(layers, nvis=X_train.shape[1]) | |
trainer = sgd.SGD( | |
learning_rate=.05, batch_size=250, termination_criterion=EpochCounter(10), monitoring_dataset=dataset) | |
trainer.setup(ann,dataset) | |
while True: |
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
if self.state == Turner.STATE_SCANNING: | |
x_disc, y_disc = int(self.x + 0.5), int(self.y + 0.5) | |
# +0.5 because axis origin is in the middle of a field | |
print "Scanning on ",x_disc, " ",y_disc | |
import math | |
# Determine vector in which direction we are scanning | |
vector = (math.cos((self.angle - 90.0)/180.0 * pi), \ | |
math.sin((self.angle - 90.0)/180.0 * pi)) |