A Note on Machine Learning

Can Gulmez
8 min readNov 25, 2021

Hi everybody. In today, I want to talk about machine learning. As you know, Machine Learning or Artificial Intelligence is so popular research field of technology in resently. In this post these questions that I try to answer is What is Machine Learning, What is types of machine learning and How machine learning works. Machine learning (ML) is a branch of AI and computer science that focuses on use of data and algorithms to mimic the way that humans learn, gradually improving its accuracy.

Well, What is the difference between AI (Artificial Intelligence), ML (Machine Learning) and DL (Deep Learning) ? I can describe that with an analogy. As you see above, if you think of artificial intelligence as a skull that machine learning would be the brain of that skull and deep learning would be anywhere of brain. So these terms are not so much different from each other.

There are basically three types of machine learning. These are Supervised, Unsupervised and Reinforcement Learning.

Supervised Learning

It is defined by its use of labelled datasets to train algorithms that to clasify data or predict outcomes accurately. As input data is fed into the model and it adjusts its weights until the model has been fitted appropriately.

Supervised learning uses a traing set to teach models to yield the desired outputs. This training dataset includes inputs and correct outputs which allows the model to learn overtime.

We can divide supervised learning into two according to its problems. These are:

  • Classification uses algorithms to acurately assign test data into specific categories. It recognizes specific entities within dataset and attempts to draw some conclusions on how those entities should be defined and labeled. Most used algorithms are Logistic Regression, SVM, K-NN, Navie Bayes, Random Forest, Decision Tree or XGBoost etc.
  • Regression is used to undertand relationship between dependent and independent values. Commanly used algorithms of regression problems are Linear Regression, Polynomal Regression, SVM, Decision Tree, Random Forest etc.

If you need algorithms of classification and regression problems that I’am putting it on here:

Well, Where is supervised learning used for? I’am putting some examples of supervised learning in here.

  • Spam Detection
  • Image and object recognition
  • Speech recognition
  • House prediction
  • Binary Classification etc.

And lastly, Here are advantage and disadvangate of supervised learning. The first three items are advantage of supervised learning and the last three items are disadvantage of supervised learning.

  • Supervised Learning allows you to collect data or produce a output from the previous experience.
  • Help you to optimize performance criteria using experience
  • Help you to solve various types of real-world problems.
  • You need to select lots of good examples.
  • Classifying big data can be real challenge
  • Training for supervised learning algorithmns can take long time.

Unsupervised Learning

Unsupervised learning uses algorithms to analyze and cluster unlabeled datasets. These algorithms discover hidden patterns and data groupings without the need of human intenvention.

Generally it’s used for expolarity data analysis, customer segmentation, recommender systems, big data visualization, feature elicitation etc.

Roughly, there are three types of unsupervised learning approach. These are

  • Clustering

Clustering is a data mining techinuqe which groups unlabeled data based on similarities and differences. Clustering algorithms are used to process raw, unclassified data objects into groups represented by structures and patterns in the information. Clustering algorithms can be separate into a few categories.

Exclusive and Overlapping Clustering is a form of grouping that stipulate a data point can exist only in one cluster. This can be also reffered to as “hard” clustering. The K-Means clustering is a good examples

Hierarchical Clustering also known as “hierarchical cluster analysis”, is an algorithm that groups similar objects into groups called clusters. The endpoint is a set of clusters, where each cluster is distinct from each other cluster, and the objects within each cluster are broadly similar to each other.

Probabilistic Clustering is an unsupervised technique that helps us solve density estimation or “soft” clustering problems. In probabilistic clustering, data points are clustered based on the likelihood that they belong to a particular distribution. The Gaussian Mixture Model (GMM) is the one of the most commonly used probabilistic clustering methods.

In addition, I’m adding an example algorithms of K-Means and Hierarchical Clustering.

  • Association Rule Mining

Association Rule Mining, as the name suggests, association rules are simple If/Then statements that help discover relationships between seemingly independent relational databases or other data repositories.

Most machine learning algorithms work with numeric datasets and hence tend to be mathematical. However, association rule mining is suitable for non-numeric, categorical data and requires just a little bit more than simple counting.

The most common used algorithm of association rule mining is “Apriori” algorithm. I’am putting an example based on how to use apriori algorithm in here.

  • Dimensional Reduction

While more data generally yields more accurate results, it can also impact the performance of machine learning algorithms (e.g. overfitting) and it can also make it difficult to visualize datasets. Dimensionality reduction is a technique used when the number of features, or dimensions, in a given dataset is too high. It reduces the number of data inputs to a manageable size while also preserving the integrity of the dataset as much as possible. It is commonly used in the preprocessing data stage, and there are a few different dimensionality reduction methods. These are PCA and LDA methods. The same way, I’m putting it on here.

And lastly, I will mantion disadvantage of unsupervised learning.

  • Computational complexity due to a high volume of training data
  • Longer training times
  • Higher risk of inaccurate results
  • Human intervention to validate output variables
  • Lack of transparency into the basis on which data was clustered

Reinforcement Learning

Reinforcement learning, known as Q-Learning is about taking suitable action to maximize reward in particular situation. It is employed by various software and machines to find the best possible path or behavior it should take in a specific situation.

Main points in Reinforcement learning

  • Input: The input should be an initial state from which the model will start
  • Output: There are many possible outputs as there are a variety of solutions to a particular problem
  • Training: The training is based upon the input, The model will return a state and the user will decide to reward or punish the model based on its output.
  • The model keeps continues to learn.
  • The best solution is decided based on the maximum reward.

Examples of Reinforcement Learning

  • Robotics

Robots with pre-programmed behavior are useful in structured environments, such as the assembly line of an automobile manufacturing plant, where the task is repetitive in nature. In the real world, where the response of the environment to the behavior of the robot is uncertain, pre-programming accurate actions is nearly impossible. In such scenarios, RL provides an efficient way to build general-purpose robots. It has been successfully applied to robotic path planning, where a robot must find a short, smooth, and navigable path between two locations, void of collisions and compatible with the dynamics of the robot.

  • AlphaGo

One of the most complex strategic games is a 3,000-year-old Chinese board game called Go. Its complexity stems from the fact that there are 10²⁷⁰ possible board combinations, several orders of magnitude more than the game of chess. In 2016, an RL-based Go agent called AlphaGo defeated the greatest human Go player. Much like a human player, it learned by experience, playing thousands of games with professional players. The latest RL-based Go agent has the capability to learn by playing against itself, an advantage that the human player doesn’t have.

  • Autonomous Driving

An autonomous driving system must perform multiple perception and planning tasks in an uncertain environment. Some specific tasks where RL finds application include vehicle path planning and motion prediction. Vehicle path planning requires several low and high-level policies to make decisions over varying temporal and spatial scales. Motion prediction is the task of predicting the movement of pedestrians and other vehicles, to understand how the situation might develop based on the current state of the environment.

Challenges of Reinforcement Learning

  • RL agent needs extensive experience
  • Delayed rewards
  • Lack of interpretability

And I’m putting an examples codes of Reinforcement Learning in here.

Note: As you notice I did not mention about (DL) Deep Learning. Because of this that Deep Learning is a complex techology and I decided that I write a different post for deep learning.

--

--