Page 14 - MSDN Magazine, November 2017
P. 14

Figure 6 Installing an Add-in to Excel 2016
link to the Web service are now part of the Excel file. You may now save and share the file with interested parties. Other users won’t need to subsequently install the Add-in or configure the Web ser- vice, as the add-in installation and configuration has been taken care of for them.
Accessing the Web Service in Other Applications
Navigate to the Web service dashboard displayed in Figure 5. Note that—as of this writing—there is a new Web service experience in preview. Click the link to view the new Web service dashboard experience. Under Basics, click the “Use endpoint” link to view a num- ber of options on how to consume the service. In addition to the API access keys and service endpoints, there’s sample code for accessing the service in C#, Python and R. There’s also a link to the Azure ML Request-Response Service Web App project that will instantly create an Azure Website that consumes the data, which can be found at bit.ly/2wBHE1j. For more information and for a detailed walk-through on how this template works, please refer to the documentation at bit.ly/2yt99Ye.
Wrapping Up
In this article, I demonstrated how to expose ML models created in Machine Learning Studio to users in the outside world. Starting with a predictive model created in the previous column, I demon-
Figure 7 Searching the Store for the Azure Machine Learning Add-in
Once the add-in is installed, an Azure Machine Learning pane appears on the right-hand side of the spreadsheet. Note that there are services already added by default. Click on the Add Web Ser- vice button to add the Web service just created. The Add Service dialog in the Azure Machine Learning pane will then display two textboxes: One for the Web service URL and another for the API key to access the service. The API key is found on the Web service dashboard in Figure 5. The URL
strated exposing that model to more than just data scientists. After all, a predictive model is only as useful as it is accessible to decision makers. Much of the rapid pace of innovation in machine learning lately can be attributed to making Azure Machine Learning technology widely available to business users and consumers.
Leveraging the cloud, these models may be deployed and scaled without any additional infrastructure burden on the organization’s existing IT Systems. In fact, little additional effort is required on the part of developers to integrate predictive models from Machine Learning Studio. Now that it’s this simple to make these models widely available for exploratory analysis in Excel and integration into other applications, the potential to add value with machine learn- ing is limitless. n
Frank La Vigne leads the Data & Analytics practice at Wintellect and co-hosts the DataDriven podcast. He blogs regularly at FranksWorld.com and you can watch him on his YouTube channel, “Frank’s World TV” (FranksWorld.TV).
Thanks to the following technical experts for reviewing this article: Andy Leonard
can be found on the same dashboard. In the Default Endpoint section, right-click the text link Request/Response and choose Copy Link Address to copy the URL into the clipboard. Paste that value into the URL textbox in Excel, as shown in Figure 8.
Click Add to Add the Web Service to the Current Spreadsheet.
Consuming the Web
Service from Excel
Once the Web service is added you can use it. In the Azure Machine Learning pane, click Binary Classification – Flight Delay prediction from the list of available services. Click Use Sample Data and, in a moment, the spreadsheet is populated with a table of sample values. In the Input textbox, enter “Sheet1!A1:N6” to include all of the sample data (assuming that the worksheet is named Sheet1). In the Output textbox enter “O1.” Immediately below the Output text box a warning message will display about overriding existing values. Click Got It to dismiss the warning message.
Click Predict and the predicted values display in a few moments. The Add-in and
Figure 8 Adding an Azure Machine Learning Web Service to Excel
10 msdn magazine
Artificially Intelligent














































































   12   13   14   15   16