how to apply k folder validation in simulink

3 visualizaciones (últimos 30 días)
Patient Sony
Patient Sony el 14 de Sept. de 2023
Comentada: Patient Sony el 28 de Dic. de 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

Respuestas (1)

Venu
Venu el 27 de Dic. de 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.

Categorías

Más información sobre Deep Learning Toolbox en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by