DEV Community

Cover image for Beginners Guide to Machine Learning: what you need to know
Victor Isaac Oshimua
Victor Isaac Oshimua

Posted on • Updated on

Beginners Guide to Machine Learning: what you need to know

It is difficult to think of a major industry that AI will not transform. This includes healthcare, education, transportation, retail, communications, and agriculture. There are surprisingly clear paths for AI to make a big difference in all of these industries. - Andrew Ng

Buzzwords such as Machine learning, Deep learning, Artificial intelligence(AI), etc. have been the latest trends almost everywhere, from the internet to your local newspaper, you come across these words.
It is no longer news that AI is the future, and no one wants to be left behind, You might have become curious to know what these words mean and why they are trending, well this article is aimed at giving introductory knowledge about everything you need to know about Machine learning.

Table of Contents

  1. What is Machine Learning
  2. Ingredients of Machine Learning
  3. How Does Machine Learning Works
  4. Types of Machine Learning
  5. Machine Learning vs Rule Based System
  6. Relationship Between Machine Learning and Artificial Intelligence
  7. Applications of Machine Learning
  8. Conclusion

What is Machine Learning

Many definitions of Machine Learning are built around these definitions:

The use and development of computer systems that are able to learn and adapt without following explicit instructions, by using algorithms and statistical models to analyse and draw inferences from patterns in data.- Oxford

Machine learning algorithms can figure out how to perform important tasks by generalizing from examples.- University of Washington

These definitions are provided by professionals in the field and might sound too technical for beginners.
For simplicity's sake, Machine learning can be defined as the process of teaching machines to predict future outcomes from past experience, without being explicitly programmed.

Ingredients of Machine Learning

To understand machine learning, you need to know the following concepts:

1. Data: This is a set of observations that are used to train a machine learning model.

2. Features: These are selected data which your machine learning model learns from.

3. Target/Label: This is what your machine learning model will try to predict.

4. Model: A machine learning model is a file that has been trained to recognize patterns from your data.

How Does Machine Learning Works

Suppose you own a loan company, and you've been experiencing a large rate of loan default on your new customers, this is bad for business, you need to reduce this or possibly stop it. Applying machine learning can be a solution to your company's problem.
Here is how machine learning provides a solution to this problem.

  1. First, You gather data of your old customers, this data contains

    • Features(Customer details e.g Age, Salary, Gender)
    • Target(Default or Won't Default )
  2. You train a machine learning model with the data, this model recognizes patterns from your data and can use this pattern to predict if a customer will default or won't default

  3. When you get a new customer, you can easily feed the customer details to your trained model, and this model will predict if this customer will default or not.

  4. From the model prediction you can decide if your new customer is loan worthy, machine learning has provided a solution to your company's problem, fascinating right?

Types of Machine Learning

There are four main classes of machine learning:

  • Supervised learning
  • Unsupervised learning
  • Semi-supervised learning
  • Reinforcement learning

Flow chart of machine learning types

Abstract of Supervised learning

Supervised learning is a machine learning approach where algorithms learn from a labelled dataset to identify and understand the connections and patterns between input features and their corresponding target.

Supervised learning can be categorised into two main parts:

  • Classification: This is a machine learning problem whereby the target variable is divided into different classes.
    Common examples of classification problems include spam message detection(classifies messages as spam or not spam), Loan default prediction( Identifies customers that will default on a loan or not)

  • Regression: In a Regression problem the target variable is a continuous real number. Unlike classification, the goal of prediction is to estimate a numerical value.
    Common examples of regression include house price prediction(Predict the price of a house based on the house details), Age detection(Predict the age of an individual)

Abstract of unsupervised learning

In unsupervised learning, the machine learns from an unlabeled dataset

Common tasks in unsupervised learning include:

  • Clustering: Similar data points are grouped based on their shared characteristics. The algorithm discovers subgroups in the data without any labels.

  • Anomaly Detection: Identifying abnormal instances in the data that deviate from the usual patterns.
    The algorithm learns the normal behaviour from the unlabeled data and detects deviations as anomalies.

Abstract of semi-supervised learning

Semi-supervised learning is a type of machine learning that combines both labelled and unlabeled data for training. It leverages a small amount of labelled data with a bigger amount of unlabeled data to improve its performance.

Abstract of reinforcement learning

A reinforcement learning algorithm is a type of machine learning algorithm that learns by interacting with its environment. The algorithm receives rewards for performing tasks correctly and penalties for performing tasks incorrectly.
An example of a reinforcement learning use case is a self-driving car.

To learn more about the types of machine learning, check out this helpful article by Javatpoint.

Machine Learning vs Rule Based System

Machine learning has various applications across different domains, this applies to rule-based systems as well.

A rule-based system is an AI system that uses predefined rules to make decisions. It matches conditions in the rules to available data and executes actions, the rules are created by human experts in the domain.
Let's take loan default prediction as a use case, in other to create a system that can predict if a customer will default, you create a set of rules as follows:

Rule 1: If the borrower's credit score is below a certain amount and their debt-to-income ratio is high, classify the loan as a high-risk default.

Rule 2: If the borrower has a history of late payments or defaults on previous loans, classify the loan as a moderate-risk default.

Rule 3: If the borrower's employment history is unstable and they have a high number of dependents, classify the loan as a moderate-risk default.

Rule 4: If the loan amount is significantly high relative to the borrower's income and their loan-to-value ratio is high, classify the loan as a high-risk default.

Rule 5: If the borrower has a stable employment history, a good credit score, and a low debt-to-income ratio, classify the loan as a low-risk default.

In this use case, the rule-based system uses a set of predefined rules based on factors associated with loan defaults. By evaluating these rules against the borrower's details, the system can predict the likelihood of loan default. The prediction can be used to make decisions regarding loan approval.

Relationship Between Machine Learning and Artificial Intelligence(AI)

Machine learning and AI focus on making intelligent systems and they are correlated with each other, most times people use them as synonyms for each other, yet they are two different terms.

What is Artificial intelligence?

Artificial intelligence is the simulation of human intelligence in machines that are programmed to think and act like humans.
To differentiate both of them: Understand that Machine learning is the subset of AI, An intelligent system uses AI to think like a human and perform tasks on its own. Machine learning is how an intelligent system develops its intelligence.

How do AI and Machine learning work together?

To understand the relationship between AI and Machine learning, you need to understand how both of them work together.

  1. An AI system is built using machine learning and other techniques.

  2. Machine learning models are created by studying patterns in the data.

  3. The AI system makes intelligent decisions using the predictions of the machine learning model.

To understand this better, consider a loan default prediction system as an AI use case, The ability of this system to predict if a customer will default on a loan relies on the power of a machine learning model.

Applications of Machine Learning

Machine learning is used in almost every aspect of our daily lives, you might be using machine learning without knowing, things like Siri, Google Maps, Self-driving cars etc, uses the power of machine learning to make life easier.

Below are five applications of Machine learning.

1. Banking and Finance: Machine learning can be used in the banking industry for fraud detection, machine learning can also be used for credit scoring.

2. Product Recommendation: Social media and e-commerce platforms utilize machine learning for product recommendations to their users.
Whenever you view products on this platform, you might start getting an advertisement for the same product while surfing the internet on the same browser.
Similarly when you use Netflix or youtube to watch movies, series, entertainments e.t.c, you find some recommendations for those kinds of videos.

3. Healthcare: In medical science, machine learning is used for disease diagnoses and detection.
For example, machine learning models have been able to accurately detect cancer from medical images.

4. Language translation: Machine learning techniques are used in computer systems to translate between different languages, this feature is used on numerous platforms, including online dictionaries and language-learning apps.

5. Agriculture: Machine Learning plays an important role in enhancing the efficiency and productivity of agriculture.
Machine learning is used by farmers to handle plants and animals individually, from weed detection to crop quality prediction and even disease detection on crops and livestock.

Conclusion

In this article, I have presented to you the fundamental knowledge you need to have about machine learning, I hope this article was helpful enough for you to find machine learning interesting.

Thanks for reading this article up to this point, do well to share with your friends who are also curious about machine learning. You can reach me on linkedin I also share great content like this there.

Top comments (0)