From the course: Machine Learning in Mobile Applications

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Client tie to custom model: Set up request

Client tie to custom model: Set up request - Xamarin Tutorial

From the course: Machine Learning in Mobile Applications

Start my 1-month free trial

Client tie to custom model: Set up request

- [Instructor] To send data to our custom model service, we're going to create an anonymous object to contain it. The structure of the object can be found in the same place we got our URL from. So we're going to go back to Azure Machine Learning Studio and click on the request response. And if we scroll down, we can find information on what the sample request should look like. So we can see the column names, and we see that we pass in an array of values. So technically we could set up multiple ranges of values to get predictions at the same time. We're only going to do one at a time. So now we're going to go back to Visual Studio, and in our method we want to continue by making an anonymous object for our request using the structure that we just looked at from the API documentation. So we're going to go var, scoreRequest, equals, and new, and this is going to be an object, so it's going to be Inputs, and that's going to equal a new object as well, and we've got input1, and that's…

Contents