필터 지우기
필터 지우기

patternnet for classification to 5bit targets?

조회 수: 1 (최근 30일)
renz
renz 2012년 10월 26일
I have 30 classifications in my target.
Everything that I've searched regarding patternnet uses 1-of-C or 1-of(C-1) representations only.
I MUST use 5 output neurons only: I'm using 5 bit-representation for each category.
Can I do this using patternnet? If yes, how? If no, what is the best network to use here in Neural Network toolbox, and how? Will a simple feedforwardnet suffice?
Thanks in advance!
  댓글 수: 1
renz
renz 2012년 10월 26일
It is like having 5 separate PATTERNNETS with same inputs and only 1 output neuron each. But I don't know how to implement this in a single patternnet.

댓글을 달려면 로그인하십시오.

채택된 답변

Greg Heath
Greg Heath 2012년 10월 26일
I remember Warren Sarle, the maintainer of the CANN FAQ lecturing and/or demonstrating the folly of using regular binary coding instead of 1-of(c or c-1). I thought it was in the FAQ. However, if you didn't find it, it must have been in a CANN post. Sorry for the missdirect.
As far as your training problem, it should be straightforward: just replace the column of eye(30) with the corresponding 5-dimensional 2 bit binary code.
You just need to find the functions that convert the elements of class = [1:32] to the corresponding columns of the 2-bit binary matrix with size(target) = [ 5 32 ]. ... and vice versa.
It sounds like your real problem stems from the post training algorithms of patternnet assuming the 1-of-c coding.
In that case you probably have to write your own or modify the source code of the MATLAB routines.
Modifying the nnet functions used to be very easy. Now it is rather complicated because of voluminous overhead. However, you could wade thru all of the overhead to find the important statements to modify. Then either keep the overhead or use a stripped down version.
Also, check the source code of patternnet to see what changes are made before and after it's call to feedforwardnet. You may just want to use feedforwardnet with defaults overwritten.
Hope this helps.
Greg
  댓글 수: 1
renz
renz 2012년 10월 27일
Thanks!
I think I'll just use normal feedforwardnet. Though I'm not sure if that would still be a classifier nnet since I was wishing to use confusion plots from patternnet to present the results and I don't know if regression plots from the feedforwardnet would also be correct to present.

댓글을 달려면 로그인하십시오.

추가 답변 (1개)

Greg Heath
Greg Heath 2012년 10월 26일
Yes you can use 5 bit binary coding. However, the training will be quite a bit(no pun intended) more difficult.
There is no mystery. For four classes the targets are
transpose([ 0 0 ; 0 1; 1 0 ; 1 1 ]) instead of eye(4).
See the comp.ai.neural-nets FAQ.
Hope this helps.
Greg
  댓글 수: 2
renz
renz 2012년 10월 26일
I'm sorry I can't find any similar cases in the "How should categories be encoded?" section of the FAQ (Or am I just misunderstanding the FAQ?). I can't find any patternnet usage that is similar to this case anywhere.
What is that "more difficult"? How different is it from using a normal patternnet? Last time I checked, my patternnet was just recognizing the output as 5 categories (from plotconfusion).
I really need examples but I can't find one.
Thanks
renz
renz 2012년 10월 26일
편집: renz 2012년 10월 26일
For example, the "Character Recognition" demo in the NNet Toolbox has eye(26) targets. Can you tell(or show, would be better) me how should it be done if the output neurons will be reduced to 5 instead of 26?
Thanks

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Pattern Recognition and Classification에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by