Intro To Machine Learning (IML) — #1

Jose Fumo
Simple AI
Published in
4 min readJan 14, 2017
Deep Dream Style

This is the first article of series of tutorials I call Intro To Machine Learning, for short IML. Throughout this series I’ll be explaining some well know machine learning algorithms and using tools to see them in action. I’ll try hardly to make this series as practical as possible.

Agenda:

  • Prerequisites
  • Libraries we are going to use frequently
  • What is Machine Learning?
  • Examples
  • Types of problems and tasks
  • Further readings;
  • Other resources.

Prerequisites

(1). Your Background: To join me on this series, as this is hands on guide, we will be implementing the algorithms using python, so I expect from you:

  • Basic understanding of the Python Programming Language;
  • You don’t need to have math skills as I’ll explain the algorithms at high level and bringing math details only when it’s crucial to our discussion.

(2). Tools and Environment: As we’re going to use tools to implement the algorithms should have installed the following:

  • Python: You can download it from https://www.python.org/
  • Anaconda or Enthought Canopy: Instead of installing the libraries we are going to use one by one, you can install Anaconda or Enthought Canopy as this tools came with the most common libraries used for machine learning and other scientific computations. Other major advantage is that this will enable you to hack the source code most of the times as python notebooks (kernels) I’ll be leaving to you on my Github. Particurlaly I like Enthought Canopy but I have both installed(why? that’s unnecessary I know, but I like to test both).

I guess by this time that’s all you need, other libraries you are going to install by the time we need.

Libraries we are going to use frequently

  • Scikit-Learn: machine learning for python, comes with implementations of many common machine learning algorithms (e.g. Decision Trees, Naive Bayes, SVM, K-Nearest Neighbors, etc) and modules for other operations(e.g. metrics, Cross validation, feature selection, etc).
  • Pandas : pandas is quite useful to work with datasets as DataFrame and do on top of it data analysis, data transformations and so on. You think of DataFrame as Excel spreadsheet with rows and columns.
  • Numpy : Numpy It’s great for numeric computation, it is quite good for manipulating n-dimensional arrays and there are lot built-in mathematical operation.
  • Matplotlib for visualization and others you are going to see along the way.

Don’t worry all the above libraries I’ll be explaining in details when we use Throughout this series, So that said, let’s dive in to what you are here for, Machine Learning.

Sundar Pichai — CEO of Google, announced to the would at Google I/O 2016 that We are transitioning From “Mobile First” to “AI First” and that Google is redefining the strategy to become AI Company.

Machine Learning

Definition: There’s no one definition to what is machine learning but this ones are quite good to carry with you.

(1). Arthur Samuel described it as: “the field of study that gives computers the ability to learn without being explicitly programmed”.“

(2). Tom M. Mitchell provided a widely quoted, more formal definition: “A computer program is said to learn from experience E with respect to some class of tasks T and performance measure P if its performance at tasks in T, as measured by P, improves with experience E.”

The fundamental idea here is, In machine learning computer programs can teach themselves when exposed to new data.

Examples

Clearly machine learning is changing the way we interact with apps today, we can see examples such as:

  • Face Detection on Facebook or on your camera;
  • How google personalize the ads and content that are shown to users based on their behavior;
  • The job done by emails on detecting whether email is spam or not;
  • Recommendations of movies and several products on Amazon or Netflix;
  • Amazon Alexa and Google Home are wining the heart of consumers;
  • Self-driving Cars are coming…
  • hahah better I stop, you can see where this is going, there are many applications of machine learning.

Types of problems and tasks

Machine learning tasks are typically classified into three broad categories, depending on the nature of the learning “signal” or “feedback” available to a learning system. These are:

  • Supervised learning: The computer is presented with example inputs and their desired outputs, given by a “teacher”, and the goal is to learn a general rule that maps inputs to outputs.
  • Unsupervised learning: No labels are given to the learning algorithm, leaving it on its own to find structure in its input. Unsupervised learning can be a goal in itself (discovering hidden patterns in data) or a means towards an end (feature learning).
  • Reinforcement learning: A computer program interacts with a dynamic environment in which it must perform a certain goal (such as driving a vehicle or playing a game against an opponent). The program is provided feedback in terms of rewards and punishments as it navigates its problem space.

In this series we are going to take a look at some well known learning algorithms such as:

  • Decision Trees;
  • Linear Regression;
  • Logistic Regression;
  • SVM (Support Vector Machines);
  • Naive Bayes;
  • KNN (K-Nearest Neighbors);
  • Random Forest;
  • Neural Networks;
  • Etc

My goal in this series is to go through machine learning algorithms, some other techniques used in the machine learning workflow and show you how they can be applied to real problems.

Further Readings:

Other Resources:

  • For Python installation and documentation go here.
  • Anaconda — Python Distribution and Integrated Analysis Environment.
  • Enghouth Canopy — Also a Python Distribution and Integrated Analysis Environment.

Next:

In the next article we are going to talk about Decision Trees and The classic Iris Dataset (Actually this will be our Hello world for Machine Learning).

Let me know what you think about this, If you enjoyed the writings then please use the ❤ heart below to recommend this article so that others can see it.

Happy learning.

--

--

Jose Fumo
Simple AI

Passionate about technology, financial markets and above all, Humanity. I share my journey to Self-Discovery and Personal Growth.