How to add a validation data set to the testplan of an one-stage MBC model in a script in order to obtain the validation RMSE?

2 次查看(过去 30 天)
I built a simple one-stage model using a script (see below), but I wasn't able to add a validation data set to the testplan, in order to obtain the validation RMSE. How can I do this?
I saw this: http://au.mathworks.com/help/mbc/examples/gasoline-case-study-design-of-experiment.html?prodcode=MB&language=en, but they just make another data set, and do not use it for validation (to obtain the validation RMSE).
%%Create a New mbcmodel Project
project = mbcmodel.CreateProject;
%%Load Data into Project
load SobolSequence
data = mbcmodel.CreateData;
S = ExportToMBCDataStructure(data);
S.varNames = {'p_im','omega_e','eta_vol'};
S.data = [SobolSequence(:,1),SobolSequence(:,2),SobolSequence(:,3)];
S.varUnits = {'Pa', 'rad/s', '-'};
S.comment = 'Imported from mat data';
data = BeginEdit(data);
data = ImportFromMBCDataStructure(data , S);
data = CommitEdit(data);
%%Build Test Plan
% Define Inputs for test plan.
LocalInputs = mbcmodel.modelinput('Symbol',{'p_im','omega_e'},'Name', ...
{'p_im','omega_e'}, ...
'Range',{[1.02e5 2.32e5],[157 262]});
% Create test plan.
testplan = CreateTestplan( project, {LocalInputs} );
% Attach data to the test plan.
AttachData( testplan, data );
%Model = mbcmodel.CreateModel('RBF',LocalInputs);
LocalModel = testplan.DefaultModels;
CreateResponse(testplan,'eta_vol');
response = testplan.Responses(1)
SummaryStatistics(response);
  1 个评论
Ian Noell
Ian Noell 2016-11-1
Hi Bas,
MBC command-line does not have this capability at the moment. I have taken a note of your request so that we can add this functionality in a future release. For now, you will need to load the validation data into MATLAB and then calculate model predictions and validation RMSE.
Best regards, Ian Noell MBC Toolbox Developer

请先登录,再进行评论。

回答(1 个)

Nishan Nekoo
Nishan Nekoo 2024-1-25
Please see Ian's response above.
Nishan

类别

Help CenterFile Exchange 中查找有关 Testing Frameworks 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by