how to apply k folder validation in simulink
3 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
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
0 Kommentare
Antworten (1)
Venu
am 27 Dez. 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.
Siehe auch
Kategorien
Mehr zu Deep Learning Toolbox finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!