Define machine learning. Explain different types of ML algorithms
Answer:-
Machine Learning (ML) is a branch of artificial intelligence that focuses on developing algorithms and models that enable computers to learn and make decisions or predictions from data without being explicitly programmed.
ML systems improve their performance over time as they are exposed to more data, identifying patterns and relationships to generalize and adapt to new data.
Types of Machine Learning Algorithms:
Machine learning algorithms are generally categorized into the following types:
1. Supervised Learning algorithms:
- In supervised learning, the algorithm learns from a labeled dataset, meaning that each training example is paired with an output label. The goal is to learn a mapping from inputs (features) to outputs (labels or targets).
- Examples of tasks:
- Regression: Predict continuous values (e.g., house prices).
- Classification: Categorize data into classes (e.g., spam detection).
- Common Algorithms:
- Linear Regression
- Logistic Regression
- Decision Trees
- Support Vector Machines (SVM)
- Neural Networks
2. Unsupervised Learning algorithms:
- The algorithm learns patterns and structures in data that is not labeled. The objective is to identify hidden structures, groupings, or features in the data.
- Examples of tasks:
- Clustering: Group similar items together (e.g., customer segmentation).
- Dimensionality Reduction: Simplify data while preserving important information (e.g., PCA).
- Common Algorithms:
- K-Means Clustering
- Hierarchical Clustering
- Principal Component Analysis (PCA)
- Autoencoders
3. Semi-Supervised Learning algorithms:
- A hybrid approach where the algorithm is trained on a dataset containing both labeled and unlabeled data. This is useful when labeled data is scarce but unlabeled data is abundant.
- Applications: Medical image analysis, where labeled data (diagnoses) is expensive to obtain.
- Example Algorithms: Self-training, Co-training, Graph-based methods.
4. Reinforcement Learning algorithms:
- The algorithm interacts with an environment and learns by trial and error, receiving rewards or penalties for actions taken. The goal is to learn a policy that maximizes cumulative rewards over time.
- Examples of tasks:
- Game playing (e.g., AlphaGo)
- Robotics
- Autonomous driving
- Key Concepts:
- Agent, Environment, Actions, Rewards, Policy, Value Function
- Common Algorithms:
- Q-Learning
- Deep Q-Networks (DQN)
- Policy Gradient Methods