# Machine Learning – Supervised, Unsupervised and Reinforcement

**Machine Learning** is a technology that enables computers to learn from given data and make predictions or decisions without being explicitly programmed. The predictions or decisions involves training the machine algorithms on large datasets to recognize patterns and improve over time.

Types of Machine Learning:

- Supervised,
- Unsupervised, and
- Reinforcement Learning

## Supervised Learning

Supervised learning involves training a model on a labeled dataset, where each training example is paired with an output label. The model learns to map the input to the output, making it possible to predict the output for new, unseen data.

### Types of Supervised Learning:

**Classification:** Used when the output variable is a category.

- Logistic Regression
- Decision Tree
- Random Forest
- Support Vector Machine (SVM)
- K-Nearest Neighbors (KNN)
- Naive Bayes
- Neural Networks

**Regression:** Used when the output variable is a real or continuous value.

- Linear Regression
- Polynomial Regression
- Ridge Regression
- Lasso Regression
- Elastic Net
- Support Vector Regression (SVR)
- Neural Networks

**Unsupervised Learning**

### Unsupervised learning is used when the dataset does not have labeled responses. The goal is to infer the natural structure present within a set of data points.

Types of Unsupervised Learning

Clustering: Grouping a set of objects in such a way that objects in the same group are more similar to each other than to those in other groups.

- K-Means Clustering
- Hierarchical Clustering
- DBSCAN (Density-Based Spatial Clustering of Applications with Noise)
- Gaussian Mixture Models (GMM)

Dimensional Reduction: Reducing the number of random variables under consideration.

- Principal Component Analysis (PCA)

- t-Distributed Stochastic Neighbor Embedding (t-SNE)

- Linear Discriminant Analysis (LDA)
- Autoencoders

Reinforcement Learning

Reinforcement learning involves training an agent to make a sequence of decisions by rewarding it for good decisions and penalizing it for bad ones. The agent learns to achieve its goal by interacting with the environment.

### Types of Reinforcement Learning:

Value-Based Methods: Learning the value of actions in states.

- Q-Learning

- SARSA (State-Action-Reward-State-Action)

Policy-Based Methods: Learning a policy that maps states to actions.

- REINFORCE Algorithm
- Proximal Policy Optimization (PPO)

Model-Based Methods: Learning a model of the environment to simulate future states.

- Dyna-Q