How to prepare target vector in matlab?

1 次查看(过去 30 天)
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