Hey guys!
I am trying to design a neural network (via fitcnet) to classify subjects into three classes. There is a txt file that consists of 1092 rows and 14 collums (1092 x 14). The 14th collumn has the class of the sets either A, B or C and I specificly want the first 450 x 14 of them to be the training set and the rest of them to be the test set. Is there any way to do that?
Thank you in advance!

 채택된 답변

Cris LaPierre
Cris LaPierre 2022년 8월 17일
The change to make, then, is that you manually create your partition instead of using cvpartition.
dataTrain = mydata(1:450,:);
dataTest = mydata(451:end,:);

댓글 수: 3

Omg thank you, it was easier than I thought !
What if i also want to manually creat a vallidation data set. For example the first 450 rows as training set, the next 50 rows as vallidation data set and the remainings as a testset. Is it based on the same reasoning?
Follow the same process. If you need help with indexing an array, see Ch 5 of MATLAB Onramp.
thank you Cris!

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

추가 답변 (0개)

카테고리

도움말 센터File Exchange에서 Deep Learning Toolbox에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by