Hi Emer,
Based on the provided description, it seems that you would like to understand why the “plotregression” consists of test plot as well which makes use of target value of the test sample as well.
Please go through the following explanation to your query:
- The “feedforwardnet” is trained on a dataset which is split into the following 3 splits:
a. Train:
i. The dataset split on which the model is trained.
ii. Passed into the model using the “train” function.
iii. Targets of “Train” split is used to train the model
b. Validation:
i. The dataset split on which the model is validated to stop the training iterations.
ii. A performance metric measures the loss between predicted and target values of Validation set.
iii. This dataset split is given as an argument in “trainingOptions”.
c. Test:
i. After training is complete, this dataset split is used to measure the performance of the model.
ii. Used for final performance metric in a loss function or “plotregression” function.
3. The target values for all samples in the three subsets are known and used at different stages of training the feed-forward neural network.
4. However, when applying the trained feed-forward network to new samples, the target values are usually unknown, and hence, plots cannot be generated for these samples.
Please refer to following documentation of related functions for more details:
- Feed Forward Net (To generate a feed-forward network for a given network hyperparameters): https://www.mathworks.com/help/deeplearning/ref/feedforwardnet.html
- TrainingOptions (Selecting options for training the deep learning network): https://www.mathworks.com/help/deeplearning/ref/trainingoptions.html
- TrainNetwork (For training a deep learning network for a classification or regression task): https://www.mathworks.com/help/deeplearning/ref/trainnetwork.html
- Train (For training a shallow network): https://www.mathworks.com/help/deeplearning/ref/network.train.html
- Plotregression (For plotting linear regression between outputs and targets): https://www.mathworks.com/help/deeplearning/ref/plotregression.html
I hope this helps.
Regards
Binaya