Thomas Keck (contact@tkeck.de)
电
Chinese
Japanese (hiragana)
ま ち ね ら に ご
Chinese (kanji)
电 买 开 东 车 红 马
の
Japanese (hiragana)
る
Japanese (hiragana)
热
Chinese (kanji)
时
Chinese (kanji)
な
Japanese (hiragana)
陸
Chinese (kanji)
Take a moment to appreciate what you just did
Let's build a machine that can do this!
from sklearn import tree
dt = tree.DecisionTreeClassifier(max_depth=4)
dt.fit(X, y)
dt.predict(X)
from sklearn import ensemble
bdt = ensemble.GradientBoostingClassifier(subsample=0.5,
max_depth=3,
n_estimators=50)
bdt.fit(X, y)
bdt.predict(X)
from sklearn import svm
svc = svm.SVC(kernel='rbf')
svc.fit(X, y)
svc.predict(X)
Link | $\hat{=}$ | $w_{ij}$ |
Neuron | $\hat{=}$ | $\sigma \left( \sum \dots \right)$ |
from sklearn import neural_network
ann = neural_network.MLPClassifier(activation='tanh',
hidden_layer_sizes=(3,))
ann.fit(X, y)
ann.predict(X)
Initial noisy optimization phase is similar to simulated annealing
$\rightarrow$ explored region is determined by the noise scale $g$
Idea: Prevent overfitting by stopping the training before convergence
Very effective and simple!
Idea: Prevent overfitting by penalize large weights
Optimal Brain Damage: Forget unimportant stuff
$$\mathcal{L} \rightarrow \mathcal{L} + L_{\textrm{Penalty}}$$
On the Problem of the most Efficient Tests of Statistical Hypotheses$$ f\left(\vec{x}\right) = \frac{\mathrm{PDF}\left( \vec{x} | \mathrm{S} \right)}{\mathrm{PDF}\left( \vec{x} | \mathrm{B} \right)} $$
By J. Neyman and E. S. Pearson
Most powerful test at a given significance level to distinguish between two simple hypotheses (signal or background)
Signal and Background PDF are usually unknown
from sklearn import lda
ld = lda.LDA()
ld.fit(X, y)
ld.predict(X)
$ f(x) = \frac{\sqrt{2 \pi | \Sigma_{\mathrm{B}} |} \exp\left( - \frac{1}{2} \left(x - \mu_{\mathrm{S}}\right)^{\mathrm{T}} \Sigma^{-1}_{\mathrm{S}} \left(x - \mu_{\mathrm{S}}\right) \right) }{ \sqrt{2 \pi | \Sigma_{\mathrm{S}} |} \exp\left( - \frac{1}{2} \left(x - \mu_{\mathrm{B}}\right)^{\mathrm{T}} \Sigma^{-1}_{\mathrm{B}} \left(x - \mu_{\mathrm{B}}\right) \right) }$
from sklearn import qda
qd = qda.QDA()
qd.fit(X, y)
qd.predict(X)
from scipy.stats import gaussian_kde
signal = gaussian_kde(signal_samples)
background = gaussian_kde(background_samples)
All concepts we encountered are still valid