Deploying web service

Now that we have seen how the model is able to predict the outcome of rain, based on temperature and humidity values, let's convert this data model into a web service so that we can use a REST API to pass values to this model and get the results in real time:

  1. From the footer of the experiment, select Set up Web Service | Predictive Web Service.
If this option is disabled, delete any existing web service items in the experiment, save, and then run the experiment, and you should be good to go.
  1. This will take a couple of minutes and generate a new tab in our experiment named Predictive experiment:
  1. By default, the Web service input item will be connected to the Select Columns in Dataset item. Delete this link and drag the Web service input item next to Score Model, and then connect the output of Web service input to the Score Model dataset input, as shown in the following screenshot:
  1. Now, we are going to run this experiment, and once it is successfully executed, we will deploy the web service. If everything goes well, we should be automatically taken to the web services page. Here, we should see two endpoints, as shown in the following screenshot:

You can look at an article titled How to call a Azure Machine Learning Web Service from NodeJS at https://blogs.msdn.microsoft.com/bigdatasupport/2016/02/18/how-to-call-a-azure-machine-learning-web-service-from-nodejs/ to see how to work with this web service using a programming language such as Node.js.

For now, we are going to use the Test button, as illustrated in the previous screenshot, to test this service.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.129.249.105