logistic_regression-tensorflow slides

Logistische Regression - ein Neuron

In [1]:
from IPython.display import Image
Image(filename='./pics/Deeplearning 1a.png') 
Out[1]:

Neuron

Input (Merkmale): $$ \vec x^T = (x_1, x_2, \dots x_n) $$

Output $h$ des Neurons: $$ h = \sigma(\sum_{i=1}^n w_i x_i + b) = \sigma(\vec x^T \cdot \vec w + b) $$

  • $\sigma$: Aktivierungsfunktion
  • $w_i$: Neuronengewichte
  • $b$: Bias
In [2]:
from IPython.display import Image
Image(filename='./pics/Deeplearning 1b.png')
Out[2]:

Logistische Funktion

In [4]:
def logistic_function(z):
    return 1./(1+np.exp(-z))

z = np.arange(-8.,8.01,0.01) 
plt.plot(z, logistic_function(z))
plt.ylim([-0.1, 1.1])
plt.xlabel("z")
plt.ylabel("g(z)")
plt.title("Logistic Function")
Out[4]:
<matplotlib.text.Text at 0x107f99610>

First generate some train data:

In [6]:
from IPython.display import Image
Image(filename='./pics/Deeplearning 3.png') 
Out[6]: