hi welcome back in this video we will see how the prognostics model that we
built before works we will see how it performs and then we will also explore
how we can deploy it so we're gonna see a couple of options so we can deploy the
model either as a tendril application or is a web app so here we are back in MATLAB
let me open an app that I have built without designer
we're going to use this app to check how our model performs and then we will also use it
to deploy the prognostics model so here we have the remaining useful life in terms of
weeks as estimated by the model and then we have a couple of axes to better interpret the results
we also have a couple of buttons here so we have one to predict and then want to select
the files so if we right-click on the button we can go to the callback that we have implemented
before and this is essentially the code that you can write to customize the behavior of your app
and essentially this is what's happening behind the scenes when we click on the predict button
so essentially what we do here we raid the data that we select we cut the initial data
and extract features we perform pca using the training data and then when you predict
the revenues of life of the machine so if you right-click on this function you
can notice that we are here implementing the two steps that we talked about in the
previous video so there is the update function and then predict rul function
okay so the code view is basically what you can write your code that implements
the behavior of the app so if we switch to design view
can run the app and see how the model performs
so let me actually close this so the first thing that we do here we select the data
so this is the data that we measure from the Slovak machine and let's select for
example the data that we measured in week 110 we click on predict and then we see the results
so our model is telling us that we have 47 weeks before the machine fails but of course this is
just an estimation so this is a prediction that we do with a certain degree of confidence so here
with the red we have extrapolation of the health indicator of our machine so the health indicator
could be anywhere between these two red lines and this is the PDF of the remaining useful life
of our machine so the model is telling us that we have forty seven weeks of remaining use for
life so maybe this means that we don't need to perform maintenance right now so for this
reason we wait 10 more weeks we measure the data and then we perform again the prediction
so after selecting the data we click on predict so now you can see that the remaining use of
life is actually gotten down to 32 this is how the PDF changed and here you can see how the
confidence interval is getting tighter so we are gaining confidence about our prediction and this
is normal because we're getting closer to failure but 32 weeks might still be a good amount of time
to have our system works so maybe we don't need to perform maintenance right now and for this reason
we just wait 15 more weeks measure the data and then we launch the prediction again so now you
can see that many useful life is down to 30 weeks so now it's really up to us to decide whether we
want to perform maintenance now or maybe wait few more weeks but essentially you can see that
the intersection between the health indicator and the threshold in black is getting closer
okay so now how do we deploy this app so how do we share
this app with other people so that they can use it
so we have different options that you can select directly from app designer so you can either share
this as a malabar so that people with a MATLAB license can use it or maybe you can create a
web app so that people can access a link and use this app as if they had MATLAB or maybe
you can just create a standalone desktop app so you can just create an executable
so in our case we will look at how we can create a web app so once the
packaging is done reopen the folder so what we can find here is a file in the
particular SCDF file that we will need to copy so we copy this file
and then we open the web app server and this comes with MATLAB compiler
so we open the app folder and the only thing we need to do is just paste the CTF file that
we copied before and this is essentially all you need to do to the pull your app
so now we go back here and we open the homepage
so this is where you will find all the apps that you have deployed so in this case we only
have one because we only had one Cydia file in the web app server folder and you can see that
now you can use the app as if it was actually installed in MATLAB but basically you can use
this app just by accessing the link and you don't need to have a MATLAB license to run
this so as you can see you can do exactly what we did before so you can select File that you
can call predict and then you can see how the remaining useful life goes down and then again
you can select data for future weeks once again you open the file and then predict now if you
want to share this with other people all you need to do is just copy this link and give it to them
so this brings us to the end of our journey together we have seen how to
create an app in app designer and deploy it as a web app or standalone executable
so I'd like to thank you for being on this journey with me and I'll see you next time