In this tutorial we want to do a detailed introduction to creating
locations and deployments with RapidMiner's Model Operations feature. Model
Operations is a one-click approach to putting models into production via its
seamless integration with AutoModel. As such it is an enriched alternative to
the well-established process of deploying models into RapidMiner Server
from Studios 'design' view. With model operations you can deploy to local but
also remote locations for which you need to have a RapidMiner Server installed.
We will get to the remote part in a bit but first let's start with a local
deployment for which we have to define a location first. We are asked to provide a
name and description - keep in mind that you may end up with multiple ones so
don't make it too generic. Now this second step is a very important one and
you should ask yourself the following questions before choosing: Will this
deployment need a web service to be part of a production process?
Will there be collaboration with others on this deployment? Is this deployment
going to run continuously or for a longer term? If the answer to any of
these is 'yes' then you should choose 'remote.' On the other hand, if you are
creating a space for your own deployments which you use to score data
in batches then 'local' is perfectly fine. In this step the 'Repository Browser'
opens and we can select or create a new folder representing this deployment
location. In case you don't create a new one here please note that you can only
select an empty folder. Despite the fact that this is a normal folder we urgently
recommend to not change or store anything manually within folders which
are used as deployment locations. You can choose any name but it makes sense to
use one which matches your location's name. We won't activate monitoring for
now, but we will come back to it shortly. With the 'location' in place the next step
is to create a deployment within the location to which we can then add models.
Apart from the name you also need to identify what kind of machine learning
model you will have this deployment execute. If your predictions will have
class labels like 'true or false' then you are doing a classification, but if the
output variable takes continuous values then you need to choose regression. We
will stick with classification here. As we click 'OK' we are dropped into the
locations overview page, showing our first deployment within this location. As
mentioned, the next step would be to add models to this deployment but I want to
show you the difference between each location type first. So let's create
another location which is again local but with monitoring and then after that
we'll look at a remote one. All right now first the local one 'with' monitoring. As
planned we set it to 'local'
and we create a folder with the same name
and we activate the monitoring and now we can select the connection and create
this local monitored location. As we now have two locations we can use the
selector here or the manage button to change things related to our deployment
locations. Take note here of the option to 'forget.' This will disconnect you from
a location without deleting anything. A location which you forget keeps being
available and as needed you or anyone else can reconnect to it and that is
really handy for POCs or a handover or for a deployment in production which you
just want to check-in every now and then. So after leading with it, this is exactly
what we are showing you now. We are connecting to a monitored, remote
deployment location which contains an active deployment. Since it is a remote
one, we need to access a RapidMiner Server repository to which we connected
our Studio previously. Before we click connect let's see what is in this
location. We see the settings table for the location which you could take a peek
into. And we can do the same for the settings of the deployment. Then there
are folders that contain models which have been added to this deployment and
other sorts of associated files. Again, I want to emphasize that even if you have
access to the folders and their content you should not store, delete, or change
anything here. To finish connecting to this remote location we simply select
the location folder and voila. OK, now let's recap, we have one local
location without monitoring to which we added at deployment, but we left that
empty. Then we have a completely blank location which is also local but has
monitoring turned on, and then the one which we just connected to which is
remote, monitoring on, and it has one deployment inside and models have been
added to the deployment. In order to compare now how the different settings
look and operate we will need to amend the to local locations with models and
deployments respectively. We will start with the scenario that we want to do a
'proof-of-concept' to see if machine learning will help us to assess credit
requests. I am starting with a fresh deployment in
my local un-monitored playground to create a pilot. The next step is to build
and add models with RapidMiner's AutoModel. I'm going to use this data set
from the Training Resources to keep it simple.
Now we'll go through this process of modeling quickly and we'll stick with
all the defaults also with respect to cost or gains resulting from right or
wrong predictions. Also, we will stick with AutoModel's selection on the
attributes to be included and just for fun we will run it with all the
available models. I'm not making you wait and watch the results come in one by one,
but I am skipping ahead to when all models have been calculated. Total time
on my laptop was just a few minutes for calculating and validating all model
types. The model with the highest accuracy is a 'Logistic Regression,'
somewhat closely followed by Deep Learning and others. As we expand the
subsection of a model and click into it you can see that the deployment button
becomes activated. Let me do it again. Ok, now to add this model to a
deployment we can just click the button, give it a name,
select a location, and a deployment
and - boom - we are done. Let's do it once more with another one.
We select the subsection of the one we want,
click 'deploy,'
and then we walk through the dialogue
and we have completed our first deployment. Given this is our pilot we
could now apply the models to other data, maybe a sample from another date or set
of customers from another country. I'll simulate this by just scoring the same
data again. In this second step we get an overview on the data set and a
structural comparison with the data used for the model training. The next step
provides a summary which helps to see what changed, which data types were maybe
adjusted, or which attributes were added. Now after the predictions are added we
see the error rate - if the data had labels added, otherwise we get only the
predictions, confidences, and the coloring to explain the predictions. Of course we
can also export our scored examples. However if we go back to the overview
there is no tracking of the latest scoring meta information like the time
it took and so on. Sit back and enjoy as I do all the same things which we have
just done but this time with the local deployment which has monitoring turned
on. I'll take a shortcut and just repurpose
the models which were trained by auto model before.
Make sure to select the right location and deployment.
And one last time with another model. You can see immediately that things have
changed in our deployment overview as more tabs have become active which are
now available since we have monitoring enabled. The scoring process stays the
same so we will repeat that again also with the same data for the purpose of
this demonstration. Now our data set has the actuals already included which is
why an accuracy can be calculated. When we click on the 'models' tab this time you
can see how things have been populated so we could keep track of the
performance while running through our trial phase with this project. The most
flexible deployment and scoring setup however, is when you use a remote
deployment location with monitoring enabled. When I open this deployment -
which is about predicting on-time arrivals of flights - you can see that all
tabs are active. I don't want to go into the details of model management here but
let's look at least at the scoring options. The scoring tab here is the
same as before, but then there is also this tab called 'integrations.' This
deployment is remote and active which means you can score data also via a webservice.
You can see the URL for example and actual submission here. We can
request a test URL and when we paste it into a browser and enter our credentials,
we can see how the resulting prediction for this flight is passed back. With this
nice outlook into a full integration of machine learning into any business
process we end our tutorial on 'locations,' 'deployment,' and 'scoring' with RapidMiner's
Model Operations. Thank you very much for watching!