An Introduction to Machine Learning

Machine learning

The term machine learning was first coined in the 1950s when AI pioneer Arthur Samuel built the first self-learning system for playing checkers. He noticed that the more the system played, the better it performed.

Fueled by advances in statistics and computer science, as well as better datasets, machine learning really took off towards the end of the 20th century.

Today, whether you realize it or not, machine learning is everywhere ‒ automated translation, image recognition, voice search technology, and beyond.

In this guide, we’ll explain how machine learning works and how you can use it in your business. We’ll also introduce you to machine learning software and show you how to get started.

Read along, skip to a section, or bookmark this post for later:

  1. What Is Machine Learning?
  2. Machine Learning Algorithms
  3. Machine Learning Applications
  4. Machine Learning Libraries in Python
  5. Machine Learning Software

What Is Machine Learning?

What is ML?

Machine learning (ML) is a branch of artificial intelligence (AI) that enables computers to self-learn and improve over time without being explicitly programmed. In short, machine learning algorithms are able to detect and learn from patterns in data and make their own predictions.

In traditional programming, someone writes a series of instructions so that a computer can transform input data into a desired output. Instructions are mostly based on an IF-THEN structure: when certain conditions are met, the program executes a specific action.

Machine learning, on the other hand, is an automated process that enables machines to solve problems and take actions based on past observations.

Basically, the machine learning process includes these stages:

  1. Feed a machine learning algorithm examples of input data and a series of expected tags for that input.

  2. The input data is transformed into text vectors, an array of numbers that represent different data features.

  3. Algorithms learn to associate feature vectors with tags based on manually tagged samples, and automatically makes predictions when processing unseen data.

While artificial intelligence and machine learning are often used interchangeably, they are two different concepts. AI is the broader concept – machines making decisions, learning new skills, and solving problems in a similar way to humans – whereas machine learning is a subset of AI that enables intelligent systems to autonomously learn new things from data.

Instead of programming machine learning algorithms to perform tasks, you can feed them examples of labeled data (known as training data), which helps them make calculations, process data, and identify patterns automatically.

Another way to help you understand it: Google’s Chief Decision Scientist describes machine learning as a fancy labeling machine. After teaching machines to label things like apples and pears, by showing them examples of fruit, eventually they will start labeling apples and pears without any help – bearing in mind that we show them correct examples!

Machine Learning Algorithms

To understand how machine learning works, you’ll need to explore different types of machine learning algorithms, which are basically sets of rules that machines use to make decisions. Below, you’ll find the most common types of machine learning algorithms:

Supervised Learning

Supervised learning algorithms make predictions based on labeled training data. Each training sample includes an input and a desired output. A supervised learning algorithm analyzes this sample data and makes an inference – basically, an educated guess when determining the labels for unseen data.

This is the most common and popular approach to machine learning. It’s “supervised” because these models need to be fed manually tagged sample data so that they can learn from it. For example, if you want to automatically detect spam, you’ll need to feed a machine learning algorithm examples of emails that you’d classify as spam and those that are important.

This brings us to the next point. There are two types of supervised learning tasks: classification and regression.

Classification

In classification tasks, the output value is a category with a finite number of options. For example, with this free online sentiment analysis model, you can classify data as positive, negative, or neutral.

Let’s say you want to analyze support conversations to understand your client’s emotions: are they happy or frustrated after contacting your customer service team? A sentiment analysis classifier can automatically tag responses for you, like in this example, below:

a sentiment analysis model tagging a frustrating customer support experience as “Negative”.

In this example, a sentiment analysis model tags a frustrating customer support experience as “Negative”.

Regression

In regression tasks, the expected result is a continuous number. This model is used to predict quantities, such as the probability an event will happen. Predicting the value of a property in a specific neighborhood, or the spread of COVID19 in a particular region are examples of regression problems.

Unsupervised Learning

Unsupervised learning algorithms uncover insights and relationships in unlabeled data. In this case, models are fed input data but the desired outcomes are unknown, so they have to make inferences based on circumstantial evidence, without any guidance or training.

One of the most common types of unsupervised learning is clustering, which consists of grouping similar data. This method is mostly used for exploratory analysis and can help you detect hidden patterns or trends.

For example, the marketing team of an e-commerce company can use clustering to improve customer segmentation. Given a set of income and spending data, a machine learning model can identify groups of customers with similar behaviors.

Segmentation allows marketers to tailor strategies for each key market. They might offer promotions and discounts for low-income customers that are high spenders on the site, as a way to reward loyalty and improve retention.

Semi-Supervised Learning

In semi-supervised learning, training data is split into two. A small amount of labeled data and a larger set of unlabeled data.

In this case, the model uses labeled data as an input to make inferences about the unlabeled data, providing more accurate results than regular supervised-learning models.

This approach is gaining popularity, especially for tasks involving large datasets such as image classification. Semi-supervised learning doesn’t require a large number of labeled data, so it’s faster to set up, more cost-effective than supervised learning methods, and ideal for businesses that receive huge amounts of data.

Reinforcement Learning

Reinforcement learning (RL) is concerned with how a software agent (or computer program) ought to act in a situation to maximize the reward. In short, reinforced machine learning models attempt to determine the best possible path they should take in a given situation. They do this through trial and error. Since there is no training data, machines learn from their own mistakes and choose the actions that lead to the best solution or maximum reward.

This machine learning method is mostly used in robotics and gaming. Video games demonstrate a clear relationship between actions and results, and can measure success by keeping score. Therefore, they’re a great way to improve reinforcement learning algorithms.

In a nutshell, supervised learning algorithms learn to make predictions from a set of labeled examples (every input has a correct output). Unsupervised and reinforcement learning models, on the other hand, don’t learn from labeled data. The difference between these two learning models is that one predicts outputs based on patterns (unsupervised), while the other uses trial and error (reinforcement).

Commonly Used Machine Learning Models

How it Works

There are plenty of machine learning models to choose from, each one with their own set of rules, depending on how you want to draw conclusions.

Support Vector Machines (SVM)

A supervised machine learning algorithm, mostly used to solve classification problems. Given a set of labeled training data, an SVM model maps examples on a plane as data points belonging to x or y categories and creates a hyperplane between them – this acts as a decision boundary. New pieces of data are then tagged based on which side of the hyperplane they land.

For SVM, the best hyperplane is the one that provides the maximum distance between data points in both categories.

SVM

This algorithm is highly accurate and is especially effective when working with small datasets. When dealing with larger sets of data, it can take time to process the results.

Naive Bayes

One of the most popular and simple probabilistic algorithms is Naive Bayes. It’s a supervised algorithm based on Bayes' Theorem with the ‘naive’ assumption that two random events are conditionally independent given a third dependent variable. Used as a benchmarked for classification tasks, it calculates the probability of each tag or variable for a given input and chooses the tag with the maximum likelihood.

Naive Bayes classifier is widely used for tasks such as sentiment analysis, spam detection, and building recommendation systems.

Deep learning (DL)

Deep learning models can be supervised, semi-supervised, or unsupervised. They’re advanced machine learning algorithms, and currently a hot topic of conversation in the data mining sphere. Tech giants, like Google, Microsoft, and Amazon, are already ramping up their research in DL algorithms, so it’s clear that deep learning is here to stay – at least until it evolves into something even more advanced!

It’s based on Artificial Neural Networks (ANN), a type of computer system that tries to emulate the way the human brain works. Deep learning algorithms or neural networks are built with multiple layers of interconnected neurons.

When a model receives input data ‒ which could be image, text, or sound ‒ and is asked to perform a task (for example, classification), the data passes through every layer enabling the model to learn progressively. It’s kind of like a human brain that evolves with age and experience!

This approach is being increasingly used for image recognition, speech recognition, and Natural Language Processing. Deep learning models usually perform better than other machine learning algorithms for complex problems and massive sets of data. However, they require a large amount of training data.

Machine Learning Applications

Applications

Machine learning in finance, healthcare, hospitality, government, and beyond, is slowly going mainstream. Businesses are beginning to see the benefits of using machine learning tools to improve their processes, gain valuable insights from unstructured data, and automate tasks that would otherwise require hours of manual work.

Many applications, tools, and services that we use today wouldn't be able to function without machine learning. For example, UberEats uses machine learning to estimate optimum times for drivers to pick up food orders, while Spotify leverages machine learning to offer personalized content.

How do you think Netflix creates personalized movie recommendations, and Google Maps predicts peaks in traffic at certain times of the day? By using machine learning, of course.

There are many different applications of machine learning, which can benefit your business in many ways. You’ll just need to define a strategy to help you decide the best way to implement machine learning into your processes. In the meantime, here are some common applications of machine learning, which might spark some ideas:

  • Social Media Monitoring
  • Image Recognition
  • Virtual Assistants
  • Online Fraud Detection
  • Product Recommendations
  • Stock Market Trading
  • Medical Diagnosis
  • Fake News Detection

Social Media Monitoring

Using machine learning you can monitor mentions of your brand on social media and quickly identify if customers require urgent attention. By detecting mentions from angry customers in real-time, you can respond immediately. You might also want to analyze customer support interactions on social media and gauge customer satisfaction, to see how well your team is performing.

Image Recognition

Image recognition is helping companies identify and classify images. For example, facial recognition technology is being used as a form of identification, from unlocking phones to making payments. Self-driving cars also use image recognition to perceive space and obstacles. For example, they can learn to recognize stop signs, identify intersections, and make decisions based on what they see.

Virtual Assistants

Virtual assistants, like Siri, Alexa, Google Now, all make use of machine learning to automatically process and answer voice requests. They rely on text analysis with machine learningto quickly scan information, remember related queries, learn from previous interactions, and send commands to other apps, so they can collect information and deliver the most effective answer.

Customer support teams are already using virtual assistants to handle phone calls, automatically route support tickets to the correct teams, and speed up interactions with customers via computer-generated responses.

Online Fraud Detection

Machine learning techniques, like anomaly detection are used to detect fraud (as well as intrusion detection in cybersecurity) and can also be used to detect weather anomalies.

Global bank Citi Group, for example, has implemented a machine learning solution to detect outlier payments in credit cards. The solution analyzes payment patterns from users, proactively identifies ‘outliers’ – such as payments to other regions – and asks clients to confirm or reject those payments.

Product Recommendations

Association rule-learning is a machine learning technique that can be used to analyze purchasing habits at the supermarket or on e-commerce sites. It works by searching for relationships between variables and finding common associations in transactions (products that consumers usually buy together). This data is then used for product placement strategies and similar product recommendations.

Associated rules can also be useful to plan a marketing campaign or analyze web usage.

Stock Market Trading

Machine learning algorithms can be trained to identify trading opportunities, by recognizing patterns and behaviors in historical data. Humans are often driven by emotions when it comes to making investments, so sentiment analysis can play a huge role in identifying good and bad investing opportunities, without any bias.

Medical Diagnosis

The ability of machines to find patterns in complex data is shaping the present and future. Take machine learning initiatives during the COVID-19 outbreak, for instance. AI tools have helped predict how the virus will spread over time, and shaped how we control it. It’s also helped diagnose patients by analyzing lung CTs and detecting fevers using facial recognition, and identified patients at a higher risk of developing serious respiratory disease.

Fake News Detection

Recent studies show that machine learning algorithms can help detect fake news and mitigate the risks of consuming false information.

How? Given a collection of news articles, the algorithm identifies different groups of news sharing similar content, called topic clusters. When a piece of news can not be identified as a part of any existing topic cluster, it is considered as a piece of potentially fake news.

Machine learning is driving innovation in many fields and every day we are seeing interesting use cases emerge. In business, the overall benefits of machine learning are:

  • It’s cost-effective and scalable. You only need to train a model once, and you can scale up or down depending on low or peak seasons.
  • Accuracy. Machine learning models are trained with a certain amount of labeled data and will use it to make predictions on unseen data. Based on this data, machines define a set of rules that they apply to all datasets, helping them provide consistent and accurate results.
  • Works in real-time, 24/7. Machine learning models can automatically analyze data in real-time, allowing you to immediately detect negative opinions or urgent tickets and take action.

Machine Learning Python Libraries & Resources

How to Get Started

Open source machine learning libraries offer collections of pre-made models and components that developers can use to build their own applications, instead of having to code from scratch. They are free, flexible, and can be customized to meet specific needs.

Another perk of open-source libraries is that they’re regularly updated by contributors, and have an active community, so help is always at hand.

Python is the go-to language for developing machine learning models for its flexibility, availability and accessibility. There’s an extensive list of open source libraries in Python, too, so you’ll never be hard-pressed to find a solution to your problem.

Some of the most popular open-source libraries for machine learning include:

Scikit-learn

A popular Python library and a great option for those who are just starting out with machine learning. Why? It’s easy to use, robust, and very well documented. You can use this library for tasks such as classification, clustering, and regression, among others.

PyTorch

Developed by Facebook, PyTorch is an open source machine learning library based on the Torch library with a focus on deep learning. It’s used for computer vision and natural language processing, and is much better at debugging than some of its competitors. Get started with PyTorch tutorials for both beginners and advanced coders. Known for its flexibility and speed, it’s ideal if you need a quick solution.

Kaggle

Launched over a decade ago (and acquired by Google in 2017), Kaggle has a learning-by-doing philosophy, and it’s renowned for its competitions in which participants create models to solve real problems. Check out this online machine learning course in Python, which will have you building your first model in next to no time.

NLTK

The Natural Language Toolkit (NLTK) is possibly the best known Python library for working with natural language processing. It can be used for keyword search, tokenization and classification, voice recognition and more. With a heavy focus on research and education, you’ll find plenty of resources, including data sets, pre-trained models, and a textbook to help you get started.

TensorFlow

An open-source Python library developed by Google for internal use and then released under an open license, with tons of resources, tutorials, and tools to help you hone your machine learning skills. Suitable for both beginners and experts, this user-friendly platform has all you need to build and train machine learning models (including a library of pre-trained models).

Tensorflow is more powerful than other libraries and focuses on deep learning, making it perfect for complex projects with large-scale data. However, it may take time and skills to master. Like with most open-source tools, it has a strong community and some tutorials to help you get started.

Want to learn more about machine learning before you dive into open-source tools? Here are some courses and books to help you along the way:

Top Machine Learning Courses

Doing an online course is a great way to gain further machine learning knowledge. Here are some options, depending on your goals and level:

Andrew Ng's (Stanford University) machine learning course in Coursera: the most popular course for beginners, highly recommended by those who have completed it. Led by former Google Brain researcher, Stanford professor, and Coursera co-founder Andrew Ng, this course offers a systematic approach to machine learning, examples of real use cases, and practical guidelines on how to put algorithms to work.

John W. Paisley (Columbia University) machine learning course in edX: an in-depth theoretical approach to machine learning, with a strong focus on the math behind the algorithms rather than on practical applications of ML. The program covers supervised and unsupervised learning, probabilistic and non-probabilistic methods. This 12-week course is intended for advanced learners who are familiar with calculus, linear algebra, probability, statistics, and coding.

Machine Learning Crash Course: a practical introduction to the fundamentals of machine learning, designed by Google. This course includes video lessons, case studies, and exercises so that you can put what you’ve learnt to practice and create your own machine learning models in TensorFlow. No prior knowledge in machine learning is required, but you do need to have basic coding skills and experience in Python.

Top Machine Learning Books

Discover Machine Learning Software

Resources

Machine learning is everywhere, and it’s quickly becoming the must-have business solution. Whether you work in retail, medicine, finance, or software, machine learning can help improve and automate internal processes and empower decision-making.

While machine learning can be complex, there are many out-of-the-box tools that make it easy to implement machine learning right away.

SaaS (software as a service) tools, for instance, make machine learning accessible to everyone, with ready-to-use solutions that require little expert knowledge.

These tools can make your venture into machine learning really simple. If you have limited resources, or you don’t want to invest too much effort and time developing a complex infrastructure, SaaS tools are ideal.

Learn the difference between building and buying your own software.

There is next to no setup, and ready-to-use machine learning software allows you to build powerful machine learning models that you can easily connect to your favorite apps through an API or integrations. Yes, even without previous machine learning experience!

Monkeylearn, for example, is an easy-to-use platform that allows you to create machine learning models to perform text analysis tasks such as topic classification, sentiment analysis, keyword extraction, and more.

Ready to take your first steps with MonkeyLearn's low-code, no-code solution. Request a demo and start creating value from your data.

MonkeyLearn Inc. All rights reserved 2020