필터 지우기
필터 지우기

how to know the indices of the test data?

조회 수: 1 (최근 30일)
Wafa
Wafa 2015년 7월 13일
답변: farzad 2015년 7월 24일
I am trying to use the data used for testing only to predict the output since it is not used in training but I can't find the indices to use the data
  댓글 수: 2
Rohit Kudva
Rohit Kudva 2015년 7월 16일
Hi Wafa,
It would be nice if you could clarify your question so that the community can help you further.
  • What is your use case?
  • What is the domain of your problem?
  • What are you trying to achieve?
  • Which MATLAB functions are you using?
  • Can you provide an example as to what are your inputs & expected output?
- Rohit
Wafa
Wafa 2015년 7월 20일
thank you, I have 3 inputs and one output and I want to use neural network in matlab to predict the output. Since I need to select the optimal number of neurons in the hidden layer where I am using technique depends only in comparing the error from the test data, so I need to know which data points from the set the system classifies as a test data so I can use them. For example, if we have the following output vector: output=[1 2 3 4 5 6 7 3 4 5 6 7]; according to ANN the output points will randomly be classified in three groups: training, testing, and validation, so I need to know the points that are being used as a test. In the user's guide for neural network toolbox, the function that has been used is: Test_Data=output(tr.testInd) which should return a vector of the data points that are classified in the test group. when I tried that I have an error of undefined tr.testInd. hope this make it clearer. Regards, Wafa I have read in the manual that the function that I should use is

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

답변 (2개)

Greg Heath
Greg Heath 2015년 7월 21일
Test data is not to be used to determine parameter settings.
It is to be used only for obtaining UNBIASED estimates of performance on unseen nondesign (nontraining and nonvalidation ) data.
You can explicitly choose your datadivision subsets before training by using functions dividetrain, divideblock, divideind, divideint or dividerand. Use the help and doc commands for documentation details.
Or, you can accept the dividerand default.
Either way, the indices are available from the training record tr. If
[ net tr ... ] = train( net, input, target, ... )
then
tr = tr % NO SEMICOLON!
will yield a treasure trove of post training info, including the indices of the train/val/test subsets.
Hope this helps.
Thank you for formally accepting my ANSWER
Greg

farzad
farzad 2015년 7월 24일
Dear Professor Heath
shall you please refer us to some published papers from you so we can verify and give reference to your work in accademic works ?
thank you very much

카테고리

Help CenterFile Exchange에서 Get Started with Deep Learning Toolbox에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by