How to prepare target vector in matlab?

조회 수: 1 (최근 30일)
Andualem alemu
Andualem alemu 2015년 3월 19일
댓글: Greg Heath 2016년 2월 18일
I am developing time series forecasting using feedforwarenet in matlab. But I don't know 1. what is a target vector 2. how to prepare target vector 3. How can I choose data for a target vector(if needed)
Below I have sample excel data if it is useful to prepare target data (Sorry I don't know about it) Thank you. and please help me

채택된 답변

Greg Heath
Greg Heath 2015년 3월 20일
Neural networks are models of functions. There are 4 basic types. The types and corresponding MATLAB functions are
1. FITNET: Curve-fitting & regression
2. PATTERNNET: Pattern-Recognition & Classification
3. KMEANS: Clustering
4. NARXNET: Time-series Prediction
When training nets, there is a matrix of input column vectors and a target matrix of corresponding output column vectors.
Although the double output syntax, [ x, t] works for MATLAB example data, e.g.,
help nndatasets
doc nndatasets
You may have to use the single output syntax twice for other data.
Hope this helps.
Thank you for formally accepting my answer
Greg

추가 답변 (1개)

Greg Heath
Greg Heath 2015년 3월 21일
Time-series forecasting involves predicting future outputs given a subset of the present input, delayed past inputs and delayed past outputs.
Design of a time-series net uses pairs of input vectors and corresponding output target vectors to determine the weights and delays of the net.
See the time-series documentation on www.mathworks.com
Also see the specific documentation
help narxnet
doc narxnet
and numerous examples posted on both NEWSGROUP and ANSWERS.Search with
greg narxnet
Hope this helps.
Thank you for formally accepting my answer
Greg
  댓글 수: 3
Synthia Nongkhlaw
Synthia Nongkhlaw 2016년 2월 18일
Hi. I am working on neural network and i am facing the same problem - how to choose data for a target vector. If you know the answer please let me know. Thank you.
Greg Heath
Greg Heath 2016년 2월 18일
Each column "O"utput target vector of length O is associated with an I dimensional "I"nput vector.
So all you have to do is quantify what you would like to see when each input vector is presented. However, this is not necessarily a simple task.
For example, in classifying an input into one of c = 10 classes or categories, a neophyte might just use the class indices 1:c as targets.
However, since the difference between classes is not usually ordinal (e.g., features of class a are always greater than the corresponding features of class b just because a > b.)
Common practice now uses nominal outputs that are columns of the unit matrix eye(c).
For example, if c = 5
trueclassindices = [ 1 3 5 4 2] are converted to
target = full(ind2vec(trueclassindices))
Then if the output is a contaminated verion of the target, say,
output = target + 0.01*randn(5)
Then the estimated class indices are recovered via
estimatedclassindices = vec2ind(output)
Hope this helps.
Greg

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

카테고리

Help CenterFile Exchange에서 Sequence and Numeric Feature Data Workflows에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by