Using R to get Data into Azure ML Studio — file.choose gotcha

This is the first post related to upcoming SQL Day conference at which I will have a chance to deliver a pre-conf “Data Scientist in the Cloud” (http://sqlday.pl/marcin-szeligamistrz-danych-data-scientist-w-chmurze/).

Microsoft Azure Machine Learning is a beautiful combination of two different approaches:

1. With growing library of predefined tasks you can easily perform complex action (like building a prediction model or transform your data) in one-click fashion.

2. With R script tasks you can execute in virtually way any R script you have.

Hence you have a easy to use (but still quite powerful) interface combined with almost infinite flexibility of R scripts.

But be careful — at least when this post was published (February 2015) you really can execute any R script, including modal functions, inside Azure ML Studio.

For example, a base function to load data is a read.table. R allows you to nest function (actually, the true power of R comes from nameless functions — they deserve separate post, for now you can think of them as a nested, declared on-the-fly functions). So, instead of using a fixed file name as a first parameter, we can feed read.table with file.choose function.

This function executed inside R Studio shows a familiar “Choose file” dialog box:

image

Anyone wants to guess what will be the result of executing this function inside Azure ML Studio?

Actually, in this case Azure ML Studio follows the original R concept of throwing at users as few massages as possible and the following script will run forever, without any warning:

image

See you at SQL Day!

Share this article ...

Google Plus
Ihren LinkedIn Kontakten zeigen



This entry was posted in Machine Learning, R Scripts by Marcin Szeliga. Bookmark the permalink.
Marcin Szeliga

About Marcin Szeliga

Since 2006 invariably awarded Microsoft Most Valuable Professional title in the SQL category. A consultant, lecturer, authorized Microsoft trainer with 15 years’ experience, and a database systems architect. He prepared Microsoft partners for the upgrade to SQL Server 2008 and 2012 versions within the Train to Trainers program. A speaker at numerous conferences, including Microsoft Technology Summit, SQL Saturday, SQL Day, Microsoft Security Summit, Heroes Happen {Here}, as well as at user groups meetings. The author of many books and articles devoted to SQL Server.

Leave a Reply

Connect with:
  • This field its required.
  • This field its required.
    • Message is required