Machine Learning — chapter 1 (introduction)

Rahul's Blog
4 min readJul 13, 2019

--

What is Machine Learning

Arthur Samuel (1959): — It is a field of study that gives a computer the ability to learn without explicitly programmed.

Tom Mitchell (1998): — A computer program is said to learn from experience E with respect to some task T and some performance measure P, if its performance on T, as measured by P, improves with experience E.

Machine learning is classified as follow:

1. Supervised Learning:

  • most frequently used.
  • Training data includes both inputs (explanatory variables) i.e. X and labels(Targets) i.e. Y.
  • Example: addition of two numbers a=5, b=6 results =11, inputs (X) are 5, 6 and Target (Y) is 11

we train the model with lots of training data (inputs & targets), then we use the trained model to predict the target(Y) for any given input (X).

NOTE: we don’t get exact 6 as answer due to irreducible errors (that we’ll cover in later sections).

following are the two types of supervised machine learning:

  1. Regression: here we predict the continuous-target (Y) i.e. numeric value.E.g.:
  • What is the price of a house in a city?
  • What is the value of the stock price?
  1. Classification: here we predict the categorical target (Y) i.e. Y (Target) has specific classes E.g.:
  • this mail is spam or not?
  • is this picture a cat or not?
  • will the stock price go down or up?

we’ll cover them further in-depth detail in upcoming chapters.

2. Unsupervised Learning

  • Training data does not include Target(Y)i.e. so we don’t tell the system where to go, the system has to understand itself from the data we give.

The following are the two types of unsupervised machine learning.

  1. Clustering:

since here we are not given the target variable (Y) therefore here we find the pattern in data and group similar things together. it is a little bit similar to multiclass classification but here we don’t provide the labels. Examples:

  • given news articles, cluster them into different types of the news based on the features of news.
  • given a set of tweets, cluster them based on the content of the tweet.

unsupervised machine learning we’ll cover in-depth detail in upcoming chapters.

2. Dimensionality Reduction

Dimensionality is the number of variables, characteristics or features present in the dataset. These dimensions are represented as columns, and the goal is to reduce the number of them.

In most cases, those columns are correlated and, therefore, there is some information that is redundant which increases the dataset’s noise. This redundant information impacts negatively in the Machine Learning model’s training and performance and that is why using dimensionality reduction methods becomes of paramount importance. It is a very useful way to reduce the model’s complexity and avoid overfitting.

There are two main categories of dimensionality reduction:

  • Feature Selection → we select a subset of features of the original dataset.
  • Feature Extraction → we derive information from the original set to build a new feature subspace.

3. Reinforcement Learning

Reinforcement learning is often used for robotics, gaming, and navigation.

it has three primary components:

  1. the agent (the learner or decision-maker)
  2. environment (everything the agent interacts with)
  3. actions (what agent can do)

the objective is for the agent to choose actions that maximize the expected reward over a given amount of time.

Reinforcement learning differs from the supervised learning in a way that in supervised learning the training data has the answer key with it so the model is trained with the correct answer itself whereas in reinforcement learning, there is no answer but the reinforcement agent decides what to do to perform the given task. In the absence of a training dataset, it is bound to learn from its experience.

Example: The problem is as follows: We have an agent and a reward, with many hurdles in between. The agent is supposed to find the best possible path to reach the reward. The following problem explains the problem more easily.

This image shows the robot, diamond, and fire. The goal of the robot is to get the reward that is the diamond and avoid the hurdles that are fire. The robot learns by trying all the possible paths and then choosing the path which gives him the reward with the least hurdles. Each right step will give the robot a reward and each wrong step will subtract the reward of the robot. The total reward will be calculated when it reaches the final reward that is the diamond.

Main points in Reinforcement learning –

  • Input: The input should be an initial state from which the model will start
  • Output: There are much possible output as there are a variety of solution 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.

--

--

Rahul's Blog
Rahul's Blog

Written by Rahul's Blog

Lightning Salesforce Developer

No responses yet