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
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 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Repeated Measures and MANOVA 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!