How create training and testing data with k-fold validation using neural network ?

조회 수: 10 (최근 30일)
Hi, I have finished training and testing data with the neural network formula that I calculated manually. Where is my data x = input (275x25) and t = target (275x1). Now I want to partition my data using K-fold validation where k = 5.
If I make (train or test) it manually, I have to train the input.mat data for the training, which consists of five files with dimension 220x25 every file.mat and five input.mat data for test with dimension 55x25 . I do this by inputting or loading the file repeatedly.
How can I implement the k-fold in the neural network code that I created? Is that possible, do the training and testing partitions then each data partition results in the accuracy of each partition both training and test?
please help me, I confused how where I should put code for k-fold. May anyone help some clear steps to explain it? Thanks

채택된 답변

Yuvaraj Venkataswamy
Yuvaraj Venkataswamy 2018년 11월 27일
편집: madhan ravi 2018년 11월 27일
  댓글 수: 1
Oman Wisni
Oman Wisni 2018년 11월 27일
편집: Oman Wisni 2018년 11월 27일
There are tutorial how create cross valitadion. should I partition first and then training or what?
input = inputs;
target =targets;
k=5;
cvFolds = crossvalind('Kfold');
How I create in cv ? can give me example ?

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

추가 답변 (0개)

카테고리

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