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!

 Réponse acceptée

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 commentaires

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!

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

En savoir plus sur Deep Learning Toolbox dans Centre d'aide et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by