Dlearning

Deep Learning

Basic

  • 神经网络:
algorithm1
input1
output
input2
input3
input4
algorithm2
  • 监督学习:1个x对应1个y;

  • Sigmoid:
    s i g m o i d = 1 1 + e − x sigmoid=\frac{1}{1+e^{-x}} sigmoid=1+ex1

  • ReLU :线性整流函数;

---
config:
    xyChart:
        width: 400
        height: 300
    themeVariables:
        xyChart:
            plotColorPalette: "#000000"
---
xychart-beta
	title "ReLU function"
	x-axis [-2,-1,0,1,2]
	y-axis 0-->2
	line [0,0,0,1,2]
	

Logistic Regression

–>binary classification / x–>y 0 1

some sign

( x , y ) , x ∈ R n x , y ∈ 0 , 1 M = m t r a i n m t e s t = t e s t M : ( x ( 1 ) , y ( 1 ) ) , ( x ( 2 ) , y ( 2 ) ) . . . , ( x ( m ) , y ( m ) ) X = [ x ( 1 ) x ( 2 ) ⋯ x ( m ) ] ← n x × m y ^ = P ( y = 1 ∣ x ) y ^ = σ ( w t x + b ) w ∈ R n x b ∈ R σ ( z ) = 1 1 + e − z (3) (x,y) , x\in{R^{n_{x}}},y\in{0,1}\\\\ M=m_{train}\quad m_{test}=test\\\\ M:{(x^{(1)},y^{(1)}),(x^{(2)},y^{(2)})...,(x^{(m)},y^{(m)})}\\\\ X = \left[ \begin{matrix} x^{(1)} & x^{(2)} &\cdots & x^{(m)} \end{matrix} \right] \tag{3}\leftarrow n^{x}\times m\\\\ \hat{y}=P(y=1\mid x)\quad\hat{y}=\sigma(w^tx+b)\qquad w\in R^{n_x} \quad b\in R\\ \sigma (z)=\frac{1}{1+e^{-z}} (x,y),xRnx,y0,1M=mtrainmtest=testM:(x(1),y(1)),(x(2),y(2))...,(x(m),y(m))X=[x(1)x(2)x(m)]nx×my^=P(y=1x)y^=σ(wtx+b)wRnxbRσ(z)=1+ez1(3)

cost function

L o s s   f u n c t i o n : L ( y ^ , y ) = 1 2 ( y ^ − y ) 2 L ( y ^ , y ) = − ( y log ⁡ ( y ^ ) + ( 1 − y ) log ⁡ ( 1 − y ^ ) ) Loss\:function:\mathcal{L}(\hat{y},y)=\frac{1}{2}(\hat{y}-y)^2\\\\ \mathcal{L}(\hat{y},y)=-(y\log(\hat{y})+(1-y)\log(1-\hat{y})) Lossfunction:L(y^,y)=21(y^y)2L(y^,y)=(ylog(y^)+(1y)log(1y^))

你可能感兴趣的:(机器学习,逻辑回归,人工智能)