Fundamental of machine learning
Tags: machinelearning, ai
Published: 2023-05-25 12:04:42

## Requirement of learning machine learning
1.High school level Calculus
2.Knowledge about graphs

## Machine learning
It is a field of study that grants computers the ability to learn on their own without requiring explicit programming. The more the program is run, the better it becomes.
## How does machine learning works
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/kvpxinhescd5rl0j8at4.png)
In machine learning, we take a training dataset and aim to apply a function that can predict the output value as closely as possible to the real output.
## Type of Machine learning
1.Supervised learning 
2.Unsupervised learning 
3.Recommended system
4.Reinforcement learning
## Supervised learning
In this type of machine learning algorithm, the model is trained with labeled data, and the predicted labels are compared with the given output.
For Example :

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/qkq64w35yh129yiam6q2.png)

To predict the y-values for this graph, we can plot different curves or a straight line.


![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/hgc7ommyvpu1kmh5g8qq.png)

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/znvptlmsf4a3pld164a4.png)

As the points on the curve are further away from the given data point compared to the points on the straight line, we can conclude that the graph with the curve is not as efficient as the straight line for the given plotted graph. The straight line represents a linear function, f(x) = mx + c, where m is the slope and c is the intercept. Therefore, a linear function can be used to predict the outputs. **This type of supervised learning is known as regression, as it involves predicting a numerical value from multiple possible outputs**.
## Classification
Classification is a type of supervised learning where we assign labels to data points, grouping objects into different categories. For example, we can classify emails as "spam" or "not spam," or classify images as "cat" or "dog."

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/z3lpmzpzvfw79392dsma.png)
from above the graph, we can predict whether a person has a malignant or non-malignant cancer tumor based on the input of their tumor size. We can also use different regions of the graph for prediction. For example, if the tumor size falls within a certain range on the graph, we can classify it as malignant, while if it falls within another range, we can classify it as non-malignant.
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/k8r92u65vxr6bfjqs6sh.png)

In this graph, we can observe that there are two regions: one region corresponds to malignant tumors and the other region corresponds to benign tumors.
## Unsupervised learning
Unsupervised learning is a type of machine learning used to discover common patterns among different data without labeling them. For example, it can be used to identify clusters or groupings within a dataset without prior knowledge of their labels.
![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/31fe791a9te2yw0gufqa.png)
Here, we only know that the data points have something in common. The most common algorithm used for unsupervised learning is the **clustering algorithm**, which clusters data into groups that share similar patterns.

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/p61uucki0uom675vhja4.png)


**Few important algorithm**:
**Anomaly detection**: This algorithm is used to identify and flag unusual or abnormal data points that deviate significantly from the expected patterns or behavior within a dataset.
**Dimensionality reduction**: This algorithm is employed to reduce the dimensionality of a dataset while aiming to retain as much relevant information as possible. Its goal is to compress the data into a lower-dimensional space, making it more manageable and potentially improving computational efficiency and reducing noise or redundancy in the data.
**Footer : Hey, this is Pratik! I completed a machine learning course on Coursera, and I'm excited to share some of the concepts and examples I've learned in this article. Let's dive into the world of machine learning together.If there is mistake in the article you write it in the comment**