how to apply k folder validation in simulink

3 vues (au cours des 30 derniers jours)
Patient Sony
Patient Sony le 14 Sep 2023
Commenté : Patient Sony le 28 Déc 2023
I'm working with simulink to creat an ANN wich will be use to control and keep stable the dc voltage at the dc bus for a hybrid power system so I'm choosing time delay NN to use it as a controller so I already trainned it around 6 times it still give me different MSE, R and other training result so i want to apply K folder validation the validate the best training with a best MSE an R and other parameter so is there anyone know how to apply k folder validation in simulink
thank you for your help

Réponses (1)

Venu
Venu le 27 Déc 2023
You can create a k-fold cross-validation partition for your data in MATLAB. This can be done using the "cvpartition" function. For instance, you can use "cv = cvpartition(numObservations, 'KFold', k)" to create a partition object "cv" with "k" folds.
Find this documentation for your reference:
Use MATLAB script to interact with Simulink. You can initiate the training process within Simulink from MATLAB script and retrieve the trained network and performance metrics back to MATLAB for analysis.
Use a loop in MATLAB to iterate through each fold of the cross-validation partition. For each iteration, select the training and validation sets based on the current fold. Within the loop, train the TDNN network using the training set and validate it using the validation set. Collect the MSE, R, and other relevant parameters for each fold.
  1 commentaire
Patient Sony
Patient Sony le 28 Déc 2023
Thank you
I'm about to try it

Connectez-vous pour commenter.

Catégories

En savoir plus sur Deep Learning Toolbox dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by