Adding Custom Code
Start course

Machine learning is a notoriously complex subject that usually requires a great deal of advanced math and software development skills. That’s why it’s so amazing that Azure Machine Learning lets you train and deploy machine learning models without any coding, using a drag-and-drop interface. With this web-based software, you can create applications for predicting everything from customer churn rates to image classifications to compelling product recommendations.

In this course, you will learn the basic concepts of machine learning and then follow hands-on examples of choosing an algorithm, running data through a model, and deploying a trained model as a predictive web service.

Learning Objectives

  • Create an Azure Machine Learning workspace
  • Train a machine learning model using the drag-and-drop interface
  • Deploy a trained model to make predictions based on new data

Intended Audience

  • Anyone who is interested in machine learning


  • General technical knowledge
  • A Microsoft Azure account is recommended (sign up for a free trial at if you don’t have an account)


The GitHub repository for this course is at


So far, I’ve only shown you prebuilt modules that don’t require you to write any code. But what if there isn’t a prebuilt module that can perform a specific task that you need to run? Well, there actually is a way to add code to your pipeline, but you still need to use a module to do it. If you search for script, you’ll see two modules, one for Python and one for R. Let’s see how the Python one works.

The “Execute Python Script” module has two input ports for datasets and one for a zip bundle. If you need to import additional Python resources, you can put them in a zip bundle and add them through this port. It has two output ports. Each of them outputs a results dataset. 

You don’t have to use all of these ports, of course. In fact, you don’t have to use any of them because you can input and output data using your Python code. For example, you can send output directly to Azure Storage if you want. If you’re going to build a pipeline with multiple modules, though, then of course you’ll have to use at least one input and one output port.

It helpfully includes some sample code, although this is just skeleton code that doesn’t do very much. Bear in mind that the Designer doesn’t provide tools for development and debugging, so you should do your development in a different environment, and then just paste the code here.

And that’s it for this lesson.

About the Author
Learning Paths

Guy launched his first training website in 1995 and he's been helping people learn IT technologies ever since. He has been a sysadmin, instructor, sales engineer, IT manager, and entrepreneur. In his most recent venture, he founded and led a cloud-based training infrastructure company that provided virtual labs for some of the largest software vendors in the world. Guy’s passion is making complex technology easy to understand. His activities outside of work have included riding an elephant and skydiving (although not at the same time).