Core ML Algorithms - telivaina/ai GitHub Wiki

πŸ€– Core Machine Learning Algorithms

Machine learning algorithms are the backbone of AI models, helping systems to make predictions, classifications, and decisions. Below are some of the most popular machine learning algorithms, along with their core use cases and the models or architectures that often utilize them:

Understanding AI Algorithms, Architectures, and Models


1️⃣ Linear Regression – Predict Continuous Values

Linear Regression is a supervised learning algorithm used for predicting a continuous output based on one or more input features. It assumes a linear relationship between the input variables (features) and the output.

  • Use Case: Predicting house prices based on features like size, location, etc.

πŸ“š Example: Predicting a person's weight based on their height and age.

Popular Models/Architectures:

  • Linear Models in Scikit-learn

2️⃣ Logistic Regression – Binary Classification Tasks

Logistic Regression is used for binary classification tasks, where the goal is to classify input data into two classes (e.g., spam vs. not spam, positive vs. negative sentiment).

  • Use Case: Determining if a customer will buy a product or not, based on their demographic features.

πŸ“š Example: Email spam classification (spam vs. non-spam).

Popular Models/Architectures:

  • Logistic Regression in Scikit-learn
  • Deep Learning models (with logistic activation functions in the last layer)

3️⃣ Decision Trees – Visualize Decisions

Decision Trees are supervised learning models that split the data into subsets based on the most significant feature, making decisions based on rules. They are easy to interpret and visualize.

  • Use Case: Classifying loan approval based on applicant features (income, credit score, etc.).

πŸ“š Example: Predicting whether a person has a disease or not based on medical data.

Popular Models/Architectures:

  • CART (Classification and Regression Trees) in Scikit-learn
  • XGBoost, LightGBM, CatBoost (Ensemble methods using decision trees)

4️⃣ k-Nearest Neighbors (k-NN) – Classification Based on Proximity

k-Nearest Neighbors (k-NN) is a non-parametric supervised learning algorithm that classifies data points based on the labels of their nearest neighbors. It’s often used for classification problems.

  • Use Case: Classifying a new email as spam or not by checking the emails most similar to it.

πŸ“š Example: Classifying types of fruits based on size, color, and weight.

Popular Models/Architectures:

  • k-NN Algorithm in Scikit-learn

5️⃣ Support Vector Machines (SVM) – Classification and Regression Tasks

Support Vector Machines (SVM) are powerful supervised learning algorithms used for classification and regression. They work by finding the hyperplane that best separates data into classes with the maximum margin.

  • Use Case: Classifying handwritten digits in image recognition tasks.

πŸ“š Example: Classifying animals as cats or dogs based on features.

Popular Models/Architectures:

  • Support Vector Classifier (SVC) in Scikit-learn
  • Kernel SVMs in image recognition and NLP tasks

6️⃣ K-Means / Clustering – Group Similar Items

K-Means is an unsupervised learning algorithm used for clustering, which divides data into K groups based on similarities between data points.

  • Use Case: Customer segmentation based on purchasing behavior.

πŸ“š Example: Grouping customers into different segments for targeted marketing.

Popular Models/Architectures:

  • K-Means Algorithm in Scikit-learn
  • DBSCAN (Density-Based Spatial Clustering of Applications with Noise)

7️⃣ Q-Learning / SARSA – Reinforcement Learning Algorithms

Q-Learning and SARSA are reinforcement learning algorithms used for decision making in environments where the agent learns by interacting with the environment and receiving rewards or penalties based on actions.

  • Use Case: Training an agent to play a game (like chess or Go) or to navigate in an environment.

πŸ“š Example: Teaching a robot to navigate a maze by rewarding successful steps.

Popular Models/Architectures:

  • Deep Q-Networks (DQN) – Deep Reinforcement Learning (combines Q-Learning with Deep Learning)
  • Proximal Policy Optimization (PPO), Actor-Critic Methods

πŸ“š Summary of Popular Machine Learning Algorithms

Algorithm Type Use Case Example Popular Models/Architectures
Linear Regression Supervised (Regression) Predicting continuous values (e.g., house prices) Linear Models in Scikit-learn
Logistic Regression Supervised (Classification) Binary classification (e.g., spam vs. not spam) Logistic Regression in Scikit-learn
Decision Trees Supervised (Classification) Visual decision-making (e.g., loan approval) CART in Scikit-learn, XGBoost
k-Nearest Neighbors (k-NN) Supervised (Classification) Classifying based on proximity (e.g., fruit type) k-NN Algorithm in Scikit-learn
Support Vector Machines (SVM) Supervised (Classification & Regression) Image classification (e.g., cats vs. dogs) SVC in Scikit-learn
K-Means Unsupervised (Clustering) Grouping similar items (e.g., customer segments) K-Means in Scikit-learn, DBSCAN
Q-Learning / SARSA Reinforcement Learning Learning by interaction (e.g., game agent) Deep Q-Networks, PPO, Actor-Critic

πŸ“š Conclusion

These machine learning algorithms form the foundation for numerous AI applications, each suited to specific types of data and tasks. Understanding how to apply them effectively, along with the right models and architectures, is key to building powerful solutions to real-world problems.


πŸ”— Back to AI Topics Index