How to write an input and output vectors
조회 수: 2 (최근 30일)
이전 댓글 표시
Hi all. I am using nntool to train a network. I need an input and a target in order to train the network. Assume that I have 5 projects. Each project has 3 inputs and one output. For example, project1={x1,x2,x3;y1}. project2={x4,x5,x6;y2}. project3={x7,x8,x9; y3}. project4={x10,x11,x12; y4}. project5={x13,x14,x15; y5} (x is the input and y is the output) my question is, how to write an input vector and an output (target) vector for the 4 projects? Thank you
댓글 수: 0
답변 (2개)
Veera Kanmani
2018년 4월 20일
https://nl.mathworks.com/matlabcentral/answers/uploaded_files/25103/NN-examples.pdf
댓글 수: 0
Walter Roberson
2018년 4월 20일
The majority of MATLAB routines that take samples and classes expect the samples to go across rows, each column representing a different feature. However, some of the Neural Network functions expect the rows to be the individual features with the columns corresponding to the different samples. This is just the transpose of the other arrangement.
I would tend to suggest storing in the first (more used) data arrangement, and transpose when passing into a function that expects the other way. This is a matter of taste - but be consistent. You will find your programs difficult to read if you use both arrangements, unless perhaps you use a naming convention that makes it clear which variables are which.
댓글 수: 0
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!