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 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
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 Kommentar
Ian Noell
am 1 Nov. 2016
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
Antworten (1)
Siehe auch
Kategorien
Mehr zu Repeated Measures and MANOVA finden Sie in Help Center und File Exchange
Produkte
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!