DEV Community

Tanveer Shahriar Arnob
Tanveer Shahriar Arnob

Posted on • Updated on

Machine Learning Basic

Machine Learning
Machine Learning is the field of study that gives computers the ability to learn and adapt without following explicit instructions, by using algorithms and statistical models.

The two main types of machine learning are

  1. Supervised Learning.
  2. Unsupervised Learning.

(1) Supervised Learning
In supervised learning, we provide a dataset where we have the result for certain inputs. Then the computer analyze and train itself to predict the result for any given inputs.

The two major types of supervised learning are

a. Regression
b. Classification

(a) Regression
A regression is a statistical technique that relates a dependent variable to one or more independent (explanatory) variables. A regression model is able to show whether changes observed in the dependent variable are associated with changes in one or more of the explanatory variables.

Basically, from the dataset, the computer tries to draw a graph which helps to predict the result.

Predicting house prices depending on the location and size is the example of regression.

(b) Classification
Classification refers to a predictive modeling problem where a class label is predicted for a given example of input data.

Basically, from the dataset, the computer tries to find some class and differentiate them. Then it tries to predict the class from the given inputs.

Predicting if a email is spam or not is the example of classification.

Difference Between Regression and Classification
In regression, the model has to predict result from infinitely many possible output numbers. On the other hand, classification has to the category which has a small set of possible outputs.

(2) Unsupervised Learning
In unsupervised learning, the dataset only has some values without any result. Then the model tries to group them or find some pattern. Based on the pattern the model tries to give result for any given inputs.

Anomaly detection, which is used to detect unusual events is done by unsupervised learning.

Difference Between Supervised and Unsupervised Learning
In supervised learning, the data comes with both inputs x and input labels y, and the algorithm tries to find a graph from where it can predict result. On the other hand, in unsupervised learning, the data comes only with inputs x but not output labels y, and the algorithm has to find some structure or some pattern or something interesting in the data.

Top comments (0)