Machine Learning Methods, Models and Algorithms - tech9tel/ai GitHub Wiki
๐ง Method โ Model โ Algorithm
-
Method
The broad approach to learning.
Example: Supervised Learning -
Model
The structure or framework built using the method.
Example: Decision Tree -
Algorithm
The specific mathematical procedure or technique used to train or construct the model.
Example: ID3, CART
๐ AI/ML Methods โ Models โ Algorithms Mapping
๐ Method | ๐ง Model | โ๏ธ Algorithm |
---|---|---|
Supervised Learning | Linear Regression | Ordinary Least Squares |
Logistic Regression | Maximum Likelihood Estimation | |
Decision Tree | CART / ID3 / C4.5 | |
Random Forest | Ensemble of Decision Trees | |
Support Vector Machine (SVM) | Kernel Trick + Optimization | |
K-Nearest Neighbors (KNN) | Distance-Based Search | |
Naive Bayes Classifier | Bayesโ Theorem | |
Neural Network | Backpropagation | |
CNN (Convolutional NN) | Convolution + Pooling + Dense | |
RNN (Recurrent NN) | Backpropagation Through Time (BPTT) | |
LSTM | Gated RNNs | |
Unsupervised Learning | K-Means Clustering | Lloydโs Algorithm |
Hierarchical Clustering | Agglomerative / Divisive | |
PCA (Dimensionality Reduction) | Eigen Decomposition | |
DBSCAN | Density-Based Clustering | |
Autoencoder | Encoder-Decoder | |
GAN (Generative Adversarial) | Generator + Discriminator Game | |
Reinforcement Learning | Q-Learning | Value Iteration |
DQN (Deep Q-Network) | Q-Learning + Neural Networks | |
PPO | Policy Optimization | |
Self-Supervised Learning | BERT | Masked Language Modeling |
SimCLR | Contrastive Loss | |
Generative / Deep Learning | GPT | Transformer Decoder + Language Loss |
๐ฏ Algorithm vs Method
๐ง Algorithm
๐ก Definition:
A step-by-step, rule-based procedure to solve a specific problem or complete a task.
๐ Example:
๐งฎMerge Sort
โ An algorithm that divides the list, sorts parts, and merges them.
๐ Key Highlights:
- ๐งพ Clear sequence of instructions
- โ๏ธ Designed to transform input into desired output
- ๐ Repeatable and predictable
๐ ๏ธ Method
๐ก Definition:
A general technique or approach used to solve a class of problems, often involving one or more algorithms.
๐ Example:
๐Gradient Descent
โ A method for minimizing loss functions in ML using different algorithm variants like SGD or Batch GD.
๐ Key Highlights:
- ๐งญ Broader in scope than algorithms
- ๐ง Can include multiple algorithms
- ๐งช Often used in practical applications and model training
๐ Key Differences
Aspect | ๐งฎ Algorithm | ๐ ๏ธ Method |
---|---|---|
๐ Definition | Specific step-by-step process | General approach/technique |
๐ Scope | Narrow, problem-specific | Broad, task-oriented |
๐งฑ Examples | Merge Sort, K-Means, A* Search | Gradient Descent, Supervised Learning |
โ๏ธ Relationship | Can be part of a method | May use multiple algorithms |
๐ How They Work Together in ML
- Method: Supervised Learning ๐งโ๐ซ
- Algorithm: Decision Tree, SVM, or Linear Regression ๐ณ๐
๐งต In Summary:
- ๐ฒ Algorithm = Exact steps ๐งฎ
- ๐งฐ Method = General strategy, may use algorithms ๐ ๏ธ
๐ Think of a method as a toolbox ๐งฐ, and each algorithm is a tool ๐งฒ you pick based on the task!
๐ค Algorithm vs Model
๐ Algorithm
- A step-by-step procedure or set of rules used to solve a problem or perform a task.
- In AI/ML, an algorithm is used to train a model.
- Think of it like a recipe.
๐งช Example: Linear Regression algorithm tells you how to find the best-fitting line.
๐ง Model
- The output or result of running an algorithm on data.
- Itโs the trained representation that can make predictions or decisions.
- Think of it like the dish made using the recipe.
๐ฏ Example: The linear equation
y = 3x + 2
is a model learned by applying the linear regression algorithm to your data.
โก Analogy Table
Concept | Analogy |
---|---|
Algorithm | ๐ณ Cooking recipe |
Model | ๐ฝ๏ธ Final dish (after cooking) |
Method โ Model โ Algorithm |