Classification: Scores, Training, Decisions
- Rows are examples; prerequisites are dot products and gradient descent.
- Binary: sigmoid; exactly one of K classes: softmax.
- Multilabel targets need independent label decisions.
1 / 8
z=dot(x,w)+b; default label is 1 when p>=0.5.z>=0, use 1/(1+exp(-z)).exp(z)/(1+exp(z)).z=-1000 must not overflow; rounded 0/1 endpoints are possible.X=[[0],[2]], y=[0,1], w=0, b=0, lr=0.4
[0.5,0.5]; errors [0.5,-0.5].dw=-0.5, db=0; updated w=0.2.log(2).[1000,1001,1002] -> [-2,-1,0]
[0.135335,0.367879,1].[0.090031,0.244728,0.665241].X:(n,d), W:(d,K), b:(K,).Z=X@W+b, P and one-hot Y: (n,K).E=P-Y; dW=X.T@E/n; db=column_sums(E)/n.P=[0.2,0.5,0.3] gives error [0.2,-0.5,0.3].For p=[0.9,0.6,0.4,0.2], y=[1,0,1,0]: