Package AzureML. August 15, 2015



Similar documents
Package uptimerobot. October 22, 2015

Package urltools. October 11, 2015

Package searchconsoler

Package retrosheet. April 13, 2015

Package OECD. R topics documented: January 17, Type Package Title Search and Extract Data from the OECD Version 0.2.

Package syuzhet. February 22, 2015

Package whoapi. R topics documented: June 26, Type Package Title A 'Whoapi' API Client Version Date Author Oliver Keyes

Package sjdbc. R topics documented: February 20, 2015

Package pinnacle.api

Package R4CDISC. September 5, 2015

Package hazus. February 20, 2015

Package TSfame. February 15, 2013

vcloud Air Platform Programmer's Guide

Office365Mon Developer API

New Features... 1 Installation... 3 Upgrade Changes... 3 Fixed Limitations... 4 Known Limitations... 5 Informatica Global Customer Support...

Package translater. R topics documented: February 20, Type Package

Package sendmailr. February 20, 2015

Package cgdsr. August 27, 2015

Data Domain Profiling and Data Masking for Hadoop

Coveo Platform 7.0. Microsoft Dynamics CRM Connector Guide

Package DCG. R topics documented: June 8, Type Package

Package decompr. August 17, 2016

Phone Manager Application Support JANUARY 2015 DOCUMENT RELEASE 4.2 APPLICATION SUPPORT

Package pdfetch. R topics documented: July 19, 2015

Package LexisPlotR. R topics documented: April 4, Type Package

Package hoarder. June 30, 2015

Package RCassandra. R topics documented: February 19, Version Title R/Cassandra interface

Package optirum. December 31, 2015

ColdFusion Adwords API Library

Package bizdays. March 13, 2015

Data Domain Discovery in Test Data Management

Specify the location of an HTML control stored in the application repository. See Using the XPath search method, page 2.

SnapLogic Salesforce Snap Reference

Introduction to HP ArcSight ESM Web Services APIs

Herve Roggero 3/3/2015

Qlik REST Connector Installation and User Guide

Elixir Schedule Designer User Manual

ICE Trade Vault. Public User & Technology Guide June 6, 2014

Package xtal. December 29, 2015

[MS-DVRD]: Device Registration Discovery Protocol. Intellectual Property Rights Notice for Open Specifications Documentation

MONAHRQ Installation Permissions Guide. Version 2.0.4

Package wordnet. January 6, 2016

Package franc. R topics documented: November 12, Title Detect the Language of Text Version 1.1.1

Package fimport. February 19, 2015

SQUEEZE SERVER. Operation Guide Version 3.0

Package RIGHT. March 30, 2015

Active Directory Management. Agent Deployment Guide

Pervasive Data Integrator. Oracle CRM On Demand Connector Guide

Distributed R for Big Data

Sage CRM Connector Tool White Paper

Workflow approval via

RTI Database Integration Service. Getting Started Guide

Package RSQLite. February 19, 2015

Administration Guide for the System Center Cloud Services Process Pack

Package hive. July 3, 2015

Lab 02 Working with Data Quality Services in SQL Server 2014

DreamFactory on Microsoft SQL Azure

Using IBM dashdb With IBM Embeddable Reporting Service

Package HadoopStreaming

How To Install An Aneka Cloud On A Windows 7 Computer (For Free)

Package jrvfinance. R topics documented: October 6, 2015

Package erp.easy. September 26, 2015

Orchestrating Document and Media Management using CMIS

Sentinel EMS v7.1 Web Services Guide

Learn how to create web enabled (browser) forms in InfoPath 2013 and publish them in SharePoint InfoPath 2013 Web Enabled (Browser) forms

Credit Card Processing

Cloud Services ADM. Agent Deployment Guide

IBM Campaign and IBM Silverpop Engage Version 1 Release 2 August 31, Integration Guide IBM

INTEGRATING MICROSOFT DYNAMICS CRM WITH SIMEGO DS3

Installing R and the psych package

Introduction to Directory Services

Cloud Powered Mobile Apps with Azure

webcrm API Getting Started

IaaS Configuration for Cloud Platforms

UT Video Conferencing Update Notes

Treemap by Category Visualizations. Product: IBM Cognos Active Report Area of Interest: Reporting

KMx Enterprise: Integration Overview for Member Account Synchronization and Single Signon

Technical Support Set-up Procedure

Extensibility. vcloud Automation Center 6.0 EN

INTRODUCTION: SQL SERVER ACCESS / LOGIN ACCOUNT INFO:

Package tagcloud. R topics documented: July 3, 2015

HP Operations Orchestration Software

NAIP Consortium Strengthening Statistical Computing for NARS SAS Enterprise Business Intelligence

Tenrox and Microsoft Dynamics CRM Integration Guide

MOC 20461C: Querying Microsoft SQL Server. Course Overview

Package WikipediR. January 13, 2016

Table of Contents VISMA ANALYSIS VISMA ANALYSIS VISMA ANALYSIS

Visualization with Excel Tools and Microsoft Azure

Overview of Microsoft Office 365 Development

Data Mailbox. support.ewon.biz. Reference Guide

IBM Campaign Version-independent Integration with IBM Engage Version 1 Release 3 April 8, Integration Guide IBM

HP Project and Portfolio Management Center

End User Setup and Handling

PTC Integrity Eclipse and IBM Rational Development Platform Guide

Introduction to Building Windows Store Apps with Windows Azure Mobile Services

Package HHG. July 14, 2015

Transcription:

Version 0.1.1 Date 2015-08-14 Type Package Package AzureML August 15, 2015 Title Discover, Publish and Consume Web Services on Microsoft Azure Machine Learning Maintainer Raymond Laghaeian <raymondl@microsoft.com> Provides an interface with Microsoft Azure to easily publish functions and trained models as a web service, and discover and consume web service. License MIT + file LICENSE Copyright Microsoft Corporation LazyData TRUE Imports RCurl, uuid, codetools, base64enc, df2json, jsonlite, rjson Suggests testthat, knitr VignetteBuilder knitr NeedsCompilation no Author Raymond Laghaeian [aut, cre], Brianna Gerads [aut], Ritika Ravichandra [aut], Alex Wang [aut] Repository CRAN Date/Publication 2015-08-15 08:01:54 R topics documented: AzureML-package..................................... 2 consumedataframe..................................... 3 consumefile......................................... 4 consumelists........................................ 5 discoverschema....................................... 6 getendpoints........................................ 7 getepdetails........................................ 8 1

2 AzureML-package getwebservices....................................... 9 getwsdetails........................................ 10 publishwebservice..................................... 11 updatewebservice..................................... 12 Index 13 AzureML-package Discover, publish and consume Microsoft Azure Web Services This package implements an interface with Microsoft Azure Machine Learning, allowing you to publish a function, e.g. a prediction function using a trained machine learning model, as a web service from which it can be utilized by users on Visual Studio, Excel, etc., or consumed within R itself. You are also able to access pre-existing web service endpoints to consume directly from R. Finding the workspace ID and authorization token All functions require a workspace ID (wsid) and authorization token (authtoken). You can find these on the settings tab of https://studio.azureml.net, but users can make a temporary free account at https://azure.microsoft.com/en-us/pricing/free-trial/. For more information, see: https://github.com/azure/azure-machinelearning-clientlibrary-r or refer to the vignette included in this package. Summary of functions 1. Discovery Get web services: getwebservices Get web service details getwsdetails Get endpoints: getendpoints Get endpoint details: getepdetails 2. Publish Publish a new web service: publishwebservice Update an existing web service: updatewebservice 3. Consume Discover web service schema: discoverschema Score a file: consumefile Score a dataframe: consumedataframe Score data as lists: consumelists

consumedataframe 3 consumedataframe Use a web service to score a data frame Score a data frame, where each row is the input to the scoring function, using a Microsoft Azure Machine Learning web service consumedataframe(apikey, requesturl, scoredataframe, globalparam = setnames(list(), character(0)), batchsize = 300, retrydelay = 0.3) apikey requesturl primary access key of the web service as a string API URL scoredataframe the data frame to be scored globalparam global parameters entered as a list, default value is an empty list batchsize batch size of each batch, default value is 300 retrydelay the time in seconds to delay before retrying in case of a server error, default value is 0.3 seconds returndataframe data frame containing results returned from web service call discoverschema publishwebservice Other consumption functions: consumefile; consumelists add <- function(x,y) { return(x+y) } newservice <- publishwebservice("add", "add", list("x"="int","y"="int"), list("z"="int"), wsid, authtoken) webservicedetails <- newservice[[1]] endpoints <- newservice[[2]] df <- data.frame("x"=c(1,2), "y"=c(3,4)) response <- consumedataframe(endpoints[[1]]$primarykey, endpoints[[1]]$apilocation, df)

4 consumefile consumefile Use a web service to score a file Read in a csv and score it in batches using a Microsoft Azure Machine Learning Web Service. The results are stored in a new csv, default named "results.csv" consumefile(apikey, requesturl, infilename, globalparam = setnames(list(), character(0)), outputfilename = "results.csv", batchsize = 300, retrydelay = 0.3) apikey requesturl infilename globalparam primary access key as a string API URL the name of the file to be scored as a string global parameters entered as a list, default value is an empty list outputfilename the name of the file to output results to, entered as a string, default value is "results.csv" batchsize batch size of each batch, default value is 300 retrydelay the time in seconds to delay before retrying in case of a server error, default value is 0.3 seconds returndataframe data frame containing results returned from web service call discoverschema publishwebservice Other consumption functions: consumedataframe; consumelists add <- function(x,y) { return(x+y) } newservice <- publishwebservice("add", "add", list("x"="int","y"="int"), list("z"="int"), wsid, authtoken) webservicedetails <- newservice[[1]] endpoints <- newservice[[2]] response <- consumefile(endpoints[[1]]$primarykey, endpoints[[1]]$apilocation, "test.csv")

consumelists 5 consumelists Use a web service to score data in list format Score data represented as lists, where each list represents one parameter of the web service consumelists(apikey, requesturl,..., globalparam = setnames(list(), character(0)), retrydelay = 0.3) apikey requesturl primary access key as a string API URL... variable number of requests entered as lists in key-value format globalparam retrydelay global parameters entered as a list, default value is an empty list the time in seconds to delay before retrying in case of a server error, default value is 0.3 seconds returndataframe data frame containing results returned from web service call discoverschema publishwebservice Other consumption functions: consumedataframe; consumefile add <- function(x,y) { return(x+y) } newservice <- publishwebservice("add", "add", list("x"="int","y"="int"), list("z"="int"), wsid, authtoken) webservicedetails <- newservice[[1]] endpoints <- newservice[[2]] response <- consumelists(endpoints[[1]]$primarykey, endpoints[[1]]$apilocation, list("x"=1, "y"=2), list("x"=3, "y"=4))

6 discoverschema discoverschema Discover web service schema Discover the expected input to a web service specified by a web service ID ng the workspace ID and web service ID, information specific to the consumption functions discoverschema(helpurl, scheme = "https", host = "ussouthcentral.services.azureml.net", api_version = "2.0") helpurl URL of the help page of the web service scheme the URI scheme host optional parameter that defaults to ussouthcentral.services.azureml.net api_version defaults to 2.0 List containing the request URL of the webservice, column names of the data, sample input as well as the input schema publishwebservice consumelists Other discovery functions: getepdetails; getendpoints; getframework; getwsdetails; getwebservices endpoints <- getendpoints("wsid", "wsauth", "webserviceid") wsschema <- discoverschema(endpoints[[1]]$helplocation)

getendpoints 7 getendpoints Get Web Service Endpoints. Get the API endpoints that belong to a Microsoft Azure Machine Learning web service. getendpoints(wkid, authtoken, wsid, url = produrl) wkid authtoken wsid url workspace ID primary authorization token the web service ID the API url to make the call to, by default hits the Azure management API Returns a list of lists, where each endpoint is represented as a nested named list with the following fields: Name CreationTime WorkspaceId WebServiceId HelpLocation PrimaryKey SecondaryKey ApiLocation Version MaxConcurrentCalls DiagnosticsTraceLevel ThrottleLevel publishwebservice consumelists Other discovery functions: discoverschema; getepdetails; getframework; getwsdetails; getwebservices

8 getepdetails endpoints <- getendpoints("wkid", "authtoken", "wsid") helpurl <- endpoints[[1]]$helplocation pkey <- endpoints[[1]]$primarykey apiurl <- endpoints[[1]]$apilocation getepdetails Get Endpoint Details. Get detailed information about a specific endpoint for a web service specified by the Azure ML web service ID and endpoint name. getepdetails(wkid, authtoken, wsid, epname, url = produrl) wkid authtoken wsid epname url workspace ID primary authorization token the web service ID endpoint name, e.g. "default" the API url to make the call to, by default hits the Azure management API Returns a list with the following fields: Name CreationTime WorkspaceId WebServiceId HelpLocation PrimaryKey SecondaryKey ApiLocation Version MaxConcurrentCalls DiagnosticsTraceLevel ThrottleLevel

getwebservices 9 publishwebservice consumelists Other discovery functions: discoverschema; getendpoints; getframework; getwsdetails; getwebservices getwebservices Get Available Web Services. Get a list of webservices available to the Microsoft Azure Machine Learning workspace specified by the Azure ML workspace ID. getwebservices(wkid, authtoken, url = produrl) wkid authtoken url workspace ID primary authorization token the API url to make the call to, by default hits the Azure management API Returns a list of lists, where each web service is represented as a nested named list with the following fields: Id Name CreationTime WorkspaceId DefaultEndpointName publishwebservice consumelists Other discovery functions: discoverschema; getepdetails; getendpoints; getframework; getwsdetails services = getwebservices("wsid", "authtoken") serviceid = services[[1]]["id"]

10 getwsdetails getwsdetails Get Web Service Details. Get detailed information about a specific Microsoft Azure Machine Learning web service specified by the Azure ML web service ID. getwsdetails(wkid, authtoken, wsid, url = produrl) wkid authtoken wsid url workspace ID primary authorization token the web service ID the API url to make the call to, by default hits the Azure management API Returns a list with the following fields: Id Name CreationTime WorkspaceId DefaultEndpointName publishwebservice consumelists Other discovery functions: discoverschema; getepdetails; getendpoints; getframework; getwebservices

publishwebservice 11 publishwebservice Publish a function to Microsoft Azure Publish a function to Microsoft Azure Machine Learning as a web service. The web service created is a standard Azure ML web service, and can be utilized from any web or mobile platform. as long as the user has the API key and URL. The function to be published can use arbitrary objects and packages. Currently, the function to be published can only take in primitive data types as input, i.e. no data frames or lists, but support for those functions will be added in the future. publishwebservice(functionname, servicename, inputschema, outputschema, wkid, authtoken) functionname function name as a string to be published servicename name of the new web service inputschema list of input parameters of format list("arg1"="type", "arg2"="type",...) outputschema list of outputs of format list("output1"="type", "output2"="type",...) wkid the workspace ID authtoken primary authorization token nested list, the first element is a list containing information about the new web service, the second element is a list of its endpoints getwsdetails getendpoints discoverschema consumelists Other publishing functions: updatewebservice add <- function(x,y) { return(x+y) } newservice <- publishwebservice("add", "add", list("x"="int","y"="int"), list("z"="int"), wsid, authtoken) webservicedetails <- newservice[[1]] endpoints <- newservice[[2]] helpurl <- endpoints[[1]]$helplocation pkey <- endpoints[[1]]$primarykey apiurl <- endpoints[[1]]$apilocation

12 updatewebservice updatewebservice Update a Published Web Service Update a web service, i.e. change the underlying R code that the service will run when called. The same restrictions that apply to publishwebservice() also apply to updatewebservice() updatewebservice(functionname, servicename, wsid, inputschema, outputschema, wkid, authtoken) functionname servicename wsid function name as a string to be published name of the new web service ID of the web service to be updated inputschema list of input parameters of format list("arg1"="type", "arg2"="type",...) outputschema list of outputs of format list("output1"="type", "output2"="type",...) wkid authtoken the workspace ID primary authorization token List of webservice details, default endpoint details, and the consumption function getwsdetails getendpoints discoverschema consumelists Other publishing functions: publishwebservice add1 <- function(x) { return(x+1) } addservice <- publishwebservice("add1", "add1", list("x"="int"), list("z"="int"), wsid, wsauth) add2 <- function(x) { return(x+2) } addservice <- updatewebservice("add2", "add2", addservice[[1]]$id, list("x"="int"), list("z"="int"), wsid, wsauth)

Index Topic package AzureML-package, 2 AzureML (AzureML-package), 2 AzureML-package, 2 consumedataframe, 2, 3, 4, 5 consumefile, 2, 3, 4, 5 consumelists, 2 4, 5, 6, 7, 9 12 discoverschema, 2 5, 6, 7, 9 12 getendpoints, 2, 6, 7, 9 12 getepdetails, 2, 6, 7, 8, 9, 10 getframework, 6, 7, 9, 10 getwebservices, 2, 6, 7, 9, 9, 10 getwsdetails, 2, 6, 7, 9, 10, 11, 12 publishwebservice, 2 7, 9, 10, 11, 12 updatewebservice, 2, 11, 12 13