Input data in excel format

Good Morning All,

I have an excel data containing 4 random variables and their response. I wish to use this data for active learning and have used it as shown below(some part of the code here). However, when I try to run the entire code it says no model defined. I do not have any explicit function for my analysis and my excel fine is in xlsx format please what can I do?
Appreciate any support please.
iOpts.Marginals(1).Type = ‘Uniform’;
iOpts.Marginals(1).Moments = [-4 4];
iOpts.Marginals(2).Type = ‘Uniform’;
iOpts.Marginals(2).Moments = [-4 4];
iOpts.Marginals(3).Type = ‘Uniform’;
iOpts.Marginals(3).Moments = [-4 4];
iOpts.Marginals(4).Type = ‘Uniform’;
iOpts.Marginals(4).Moments = [-4 4];
ALROpts.Type = ‘Reliability’;
ALROpts.Method = ‘ALR’;
ALROpts.ALR.IExpDesign.X = X;
ALROpts.ALR.IExpDesign.G = G;

Appreciate any help/suggestions on this (i.e Using Active Learning module with data of random variables and corresponding response without any explicit limit state function. I have my data in excel and called it as shown in the above but I get an error ( no model defined). In Version 1.3 using PCK, I could even introduce the variable data (X) and response (Y) directly and this will still run) Must we have an analytical expression for the LSF before one can use the Active Learning module?

Hi @aokoro,

It seems I cannot reproduce the error you’ve got when you don’t specify explicitly any MODEL object to the ALR analysis options. I used this part of the code you used to create the ALR analysis with another dataset:

ALROpts.Type = 'Reliability';
ALROpts.Method = 'ALR';
ALROpts.ALR.IExpDesign.X = X;
ALROpts.ALR.IExpDesign.G = G;
myALRAnalysis = uq_createAnalysis(ALROpts);

UQLab seems to be able to create the PCK metamodel (the default) for the limit state function based on the data provided. Can you be more specific about the error you received, including from where it was thrown?

Thank you so much for the response. Below is the error I am getting for attached problemlearning.m (1.1 KB)

No model defined!

Error in uq_evalLimitState (line 67)
** M_X = uq_evalModel(FullModel,X);**

Error in uq_activelearning (line 556)
** gadded = uq_evalLimitState(xadded, Options.Model, Options.LimitState, Options.HPC.MC);**

Error in uq_reliability (line 78)
** results = uq_activelearning(CurrentAnalysis);**

Now I can reproduce the error, thanks a lot for the description and the code. It seems indeed that it was looking for a MODEL object specified in Options.Model and that it can’t be found therefore the error.

Did you say that the exactly same setup (input/output only without explicit LSF specification) of reliability analysis (and not just PCK) worked in the previous version (assuming you were using AKMCS instead of the new ALR)?

Thanks sir- yes it did work in the previous version using AKMCS. I only noticed that it did not work with the new Active Learning Module.

I checked with the previous version of UQLab with AKMCS and the error persists. I suspect when it was working before, there might have been actually a MODEL object in your UQLab session. Although you did not specify a MODEL object in the AKMCS options explicitly, UQLab will use the most recent one available in the session. You might want to double check that again to be sure.

So, I’m not 100% sure if this is supposed to be working even with the previous version. You can always create a metamodel object based on the existing data first if you don’t have direct access to the LSF.

@moustapha: maybe you can help confirming the expected behavior of using existing dataset (X-G pairs) for reliability analysis using AKMCS or ALR? Do Options.Model must be specified or a MODEL object has to exist in the current session? It seems either must (be), but maybe I missed something :sweat_smile: Thanks!

Hi @aokoro ,

Sorry for jumping in late and thanks a lot @damarginal for your input.

Indeed @damarginal is right, you cannot run active learning without defining a model first. If it ran without error with AK-MCS, it’s probably because the most recent MODEL in UQLab was compatible with the data and was then used by the module unbeknownst to you (This behavior is inherited from the RELIABILITY module. In the case of active learning, I will see if we could do something to throw at least a warning if a MODEL is not defined…)

In any case, for active learning you need an oracle to give you the response for a new sample point suggested by the algorithm. Usually such an oracle is assumed to be a computational model, even though in some cases it can be an actual physical experiment. If you only have data, why not using all of them to train a surrogate and then using it to evaluate the failure probability of the system? Now if you have millions of data points, and you would like to only use a few of them, I can imagine you doing active learning and picking up from the available data the point closest to the one suggested by the algorithm. If you want to do that, please consider using the asynchronous option. This will pause the execution of the algorithm and return to you the sample that needs to be evaluated. You can then manually check in the dataset you have which point you could select (you can actually also automatize this process by creating an m-file that will read the dataset and choose the appropriate pair of points). In any case, I think chances are that you would need to adapt/modify the current codes.

I hope this makes things a bit clearer. If I missed your point, apologies and please let me know how I can actually help.


Thank you so much all - I think it is very clear now

Appreciate your input and support @damarginal and @moustapha