how to apply k folder validation in simulink
3 ビュー (過去 30 日間)
古いコメントを表示
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 件のコメント
回答 (1 件)
Venu
2023 年 12 月 27 日
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.
参考
カテゴリ
Help Center および File Exchange で Deep Learning Toolbox についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!