Skip to main content

Azure Machine Learning (Day 13 of 31)

List of all posts from this series:

Short Description 
Machine Learning is a new service time on Microsoft Azure that can be used with success for predictive analytics. It can be used with success for machine learning AS A SERVICE. You don’t need to make any kind of hardware configuration, system configuration and so on. Everything is offered as a service, you only need to define the source, what algorithms and mechanism you want to define and this is all.

Main Features 
Easy configuration
Defining input/output sources, what kind of algorithms model you want to define and so on can be made very easily.
Configuration as a Workflow
The configuration portal is simple and very simple to use. You have the ability to configure everything from portal, using drag and drop very similar with a workflow. Because of this is easy to learn and use. For people is very natural.
There is a long list of predefined algorithms that can be used by default. This algorithms can be used as they are with success. Below you can find some algorithms that are available:

  • Scalable Boosted Decision trees
  • Bayesian Recommendation Systems
  • Deep Neural Networks 
  • Decision Jungles

R Language
You have the ability to write your own algorithm in language R and import in Machine Learning. In this way you can use Machine Learning for any kind of use cases.
Fast deploy and analyzed
The configuration and deployment is extremely fast and easy. In a few minutes you can configure it and start it. In this way you can have more focus on your data and how you can configure it to get the expected output. For focus in machine ‘training’ and less on system configuration.
No hardware and software configuration
Yes, you don’t need to make any kind of configuration. You only use it as it is.    
Training models
You have the ability to train and test you models. There is full support to create and train your own models.
Once you created your model, it is simple to monitor your model, see how it work and check the performance of it.
Data Scientist 
It is oriented to data scientist that can focus on model, experiments and scoring. For them and machine learning world this is more important than everything else.
Yes, each configuration is available over RESTfull.
Batch execution service 
There is full support for batches. You can take data from Azure Storage, HD Insight, SQL Azure or HTTP resources. It is very simple to ingest data from different sources.
Scoring support
You can check for machine learning alg. Based on the generated score and check how good is your solution.
Publish as a Service
Once you have your solution validate, you can publish it as a service simple. In a few clicks you can get your own model publish as a service that can be used by external sources. You can even sell it as a service.

I have only a little experience on Machine Learning. Because of this I’m not in the position to give feedback related to this topic.

Applicable Use Cases 
Personally I would use it in the fallowing use cases:
Real time logs analytics
I would use Machine Learning to analyze logs in real time to detect strange behavior and trigger different alerts to our support team.
Device Health Status
If you have a lot of devices and you want to detect the health of device and predict when they will fail, than Machine Learning is an interesting tool for that.
Possible Security Problems
Machine Learning can be used with success to check what users are doing on the system and check if the behavior of them is not the one that is expected and what is the normal one (based on history).

Code Sample 
# Map 1-based optional input ports to variables
mydata <- maml.mapInputPort(1) # class: data.frame

data.split <- strsplit(mydata[1,1], ",")[[1]]
data.split <- sapply(data.split, strsplit, ";", simplify = TRUE)
data.split <- sapply(data.split, strsplit, ";", simplify = TRUE)
data.split <-

data.split <- data.matrix(data.split)
data.split <- data.frame(data.split)

# K-Means Cluster Analysis
fit <- kmeans(data.split, mydata$k) # k-cluster solution

# get cluster means 
# append cluster assignment
mydatafinal <- data.frame(t(fit$cluster))
colnames(mydatafinal) <- paste("V",1:n_col,sep="")

# Select data.frame to be sent to the output Dataset port
Code sample source:

Pros and Cons 
  • Easy to use
  • Expose as a service very easily
  • R support
  • Scoring support
  • Multiple ingest sources supported
  • Salable

When you calculate the cost of Machine Learning you should take into account:

  • How long the system runs
  • How many predictions are done
  • Outbound traffic
In conclusion I would say that Machine Learning is it an interesting service that should be checked by data scientist and people that are working with big data. There is an business opportunity there that is very interesting.


Popular posts from this blog

ADO.NET provider with invariant name 'System.Data.SqlClient' could not be loaded

Today blog post will be started with the following error when running DB tests on the CI machine:
threw exception: System.InvalidOperationException: The Entity Framework provider type 'System.Data.Entity.SqlServer.SqlProviderServices, EntityFramework.SqlServer' registered in the application config file for the ADO.NET provider with invariant name 'System.Data.SqlClient' could not be loaded. Make sure that the assembly-qualified name is used and that the assembly is available to the running application. See for more information. at System.Data.Entity.Infrastructure.DependencyResolution.ProviderServicesFactory.GetInstance(String providerTypeName, String providerInvariantName) This error happened only on the Continuous Integration machine. On the devs machines, everything has fine. The classic problem – on my machine it’s working. The CI has the following configuration:

TeamCity.NET 4.51EF 6.0.2VS2013
It seems that there …

Entity Framework (EF) TransactionScope vs Database.BeginTransaction

In today blog post we will talk a little about a new feature that is available on EF6+ related to Transactions.
Until now, when we had to use transaction we used ‘TransactionScope’. It works great and I would say that is something that is now in our blood.
using (var scope = new TransactionScope(TransactionScopeOption.Required)) { using (SqlConnection conn = new SqlConnection("...")) { conn.Open(); SqlCommand sqlCommand = new SqlCommand(); sqlCommand.Connection = conn; sqlCommand.CommandText = ... sqlCommand.ExecuteNonQuery(); ... } scope.Complete(); } Starting with EF6.0 we have a new way to work with transactions. The new approach is based on Database.BeginTransaction(), Database.Rollback(), Database.Commit(). Yes, no more TransactionScope.
In the followi…

GET call of REST API that contains '/'-slash character in the value of a parameter

Let’s assume that we have the following scenario: I have a public HTTP endpoint and I need to post some content using GET command. One of the parameters contains special characters like “\” and “/”. If the endpoint is an ApiController than you may have problems if you encode the parameter using the http encoder.
using (var httpClient = new HttpClient()) { httpClient.BaseAddress = baseUrl; Task<HttpResponseMessage> response = httpClient.GetAsync(string.Format("api/foo/{0}", "qwert/qwerqwer"))); response.Wait(); response.Result.EnsureSuccessStatusCode(); } One possible solution would be to encode the query parameter using UrlTokenEncode method of HttpServerUtility class and GetBytes method ofUTF8. In this way you would get the array of bytes of the parameter and encode them as a url token.
The following code show to you how you could write the encode and decode methods.