Clear Filters
Clear Filters

Train, Validation and Test in different folders

4 views (last 30 days)
Hello everyone,
I'm sorry but I'm new in matlab.
I'm building my ANN, I already downloaded a huge dataset divided in train, val and test set. These 3 sets stay in 3 different folder, how can I say to my script to take the training set from one folder, validation set from another folder and test set from another one?
Another problem is that there are the same names (example: train set have x1, x2, x3...xn, val set have inside x1, x2, x3....xm, same for the test set)

Answers (1)

Biral Pradhan
Biral Pradhan on 3 Jun 2022
I understand, you have your training, validation, and test datasets in 3 different folders, and want to import them into MATLAB. MATLAB allows you to specify the complete path to a file while importing it to the workspace. For example, if you are using the "readtable" function, then the filename parameter accpets complete path to the file. Kindly refer to below link for better understanding:
Regarding your second query, you can import the 3 datasets as they are, into 3 different variables. There should not be a problem with field names being same.

Categories

Find more on Get Started with MATLAB in Help Center and File Exchange

Products


Release

R2022a

Community Treasure Hunt

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

Start Hunting!