machine learning - Interpret the output of neural network in matlab -
i have build neural network model, 3 classes. understand best output classification process boolean 1 class , boolean zeros other classes , example best classification result class, output of classifire lead on how data belong class first element in vector [1 , 0 , 0]. output of testing data not that,instead rational numbers [2.4 ,-1 , .6] ,so how interpret result? how decide class testing data belong?
have tried take absolute value , turn maximum element 1 , other zeros, correct?
learner.
it appears neural network bad designed.
regardless structure -number of input-hidden-output- layers, when doing multiple classification problem, must ensure each of output neurones evaluating individual class, is, each them has bounded output, in case, between 0 , 1. use of defined function on output layer performing this.
nevertheles, neural network work properly, must remember, every single neuron loop -from input output- operates classificator, is, define region on input space going classified.
under framework, every single neuron has direct interpretable sense on non-linear expansion nn defining, particularly when there few hidden layers. ensured general expression of neural networks:
y_out=f_n(y_n-1*w_n-t_n)
...
y_1=f_0(y_in-1*w_0-t_0)
for example, radial basis neurons -i.e. f_n=sqrt(sum(yni-rni)^2)
, w_n=1
(identity):
yn+1=sqrt(sum(yni-rni)^2)
a dn
-dim spherical -being dn
dimension of n-1
layer- clusters classification induced first layer. similarly, elliptical clusters induced. when 2 radial basis neuron layers added under structure of spherical/elliptical clusters, unions , intersections of spherical/elliptical clusters induced, 3 layers unions , intersections of previous, , on.
when using linear neurons -i.e. f_n=(.)
(identity), linear classificators induced, is, input space divided dn
-dim hyperplanes, , when adding 2 layers, union , intersections of hyperplanes induced, 3 layers unions , intersections of previous, , on.
hence, can realize number of neurons per layer the number of classificators per each class. if geometry of space -lets put graphically- 2 clusters class a, 1 cluster class b , 3 clusters class c, need @ least 6 neurons per layer. thus, assuming expect anything, can consider rough approximate, n
neurons per class per layer, is, n
neurons n^2
minumum neurons per class per layer. number can increased or decreased according topology of classification.
finally, best advice here n outputs (classes), r inputs:
- have
r
classificator neurons on first layers, radial or linear, segmenting space according expectations, - have
n
n^2
neurons per layer, or per dificulty of problem, - have 2-3 layers, increase number after getting clear results,
- have
n
thresholding networks on last layer, 1 layer, continuous function 0 1 (make crisp on code)
cheers...
Comments
Post a Comment