| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Name | Name | Last commit date | ||
|---|---|---|---|---|
This repository is a comprehensive guide to Machine Learning, designed to bridge theoretical concepts with practical, hands-on implementations. It serves as a learning lab for anyone—from beginners to practitioners—looking to deepen their understanding of core ML foundations and algorithms.
Machine Learning (ML) is a subset of Artificial Intelligence that allows systems to learn from experience (data) and improve their performance on a task without being explicitly programmed with rules. Instead of following hardcoded instructions, the system identifies patterns in data and uses those patterns to make predictions or decisions.
Think of a baby learning to recognize animals. At first, the baby is shown pictures of cats and dogs. Over time, the baby begins to notice patterns — cats have pointy ears, dogs often have longer snouts. Eventually, the baby can identify a new picture as a "dog" or "cat" based on what they’ve seen before — even without being told the rules. Machine Learning works in a similar way: it learns from examples instead of being told exactly what to do.
A machine learning model learns to recommend movies based on a user's viewing history and preferences — just like how a friend might suggest a movie based on what you’ve enjoyed before.
This is by far the most widely used type of ML in real-world applications.
Concept: Predicts a continuous value (e.g., student test score) based on one or more input features.
Essential Math:
It minimizes the Mean Squared Error (MSE) between predicted and actual values.
Use Case: Predicting prices, trends, or scores.
Concept: Used for binary classification (e.g., pass/fail, spam/ham).
Essential Math:
Where the sigmoid function is:
Use Case: Disease prediction, marketing response, fraud detection.
Concept: A flowchart-like structure where each internal node splits the data based on a feature.
Essential Math:
Gini Impurity:
Entropy (for Information Gain):
Use Case: Customer segmentation, credit risk modeling.
Concept: An ensemble of decision trees trained on random subsets of data and features.
Essential Math:
For Regression:
For Classification:
Use Case: Robust classification and regression tasks, e.g., loan approval, stock prediction.
Concept: Classifies a sample based on the majority vote (classification) or average (regression) of its k closest neighbors.
Essential Math:
Other distance metrics can be used, such as Manhattan, Cosine, or Minkowski, depending on the data.
Use Case: Recommender systems, image classification, anomaly detection.
Machine learning problems and evaluation metrics depend heavily on the type of data being used.
Understanding data types helps determine:
flowchart TD
A[Data Types] --> B[Numerical]
A --> C[Categorical]
A --> D[Binary]
A --> E[Time Series]
A --> F[Text]
A --> G[Image]
A --> H[Tabular]
B --> B1[Discrete]
B --> B2[Continuous]
C --> C1[Nominal]
C --> C2[Ordinal]
Numerical data represents quantitative values and can be measured.
Examples:
Discrete
Integer values (counts)
Continuous
Real values (measurements)
Used in:
graph TD
A[Numerical Data] --> B[Discrete]
A --> C[Continuous]
B --> B1[Counts]
B --> B2[Integer values]
C --> C1[Measurements]
C --> C2[Real numbers]
Categorical data represents labels or categories.
Examples:
Nominal (No order)
No ranking exists.
Ordinal (Has order)
Ranking exists, but distances are not meaningful.
Used in:
graph TD
A[Categorical Data] --> B[Nominal]
A --> C[Ordinal]
B --> B1[No order]
B --> B2[Labels]
C --> C1[Ordered categories]
C --> C2[Ranking exists]
Binary data is a special case of categorical data with two values.
Examples:
Used in:
graph TD
A[Binary Data] --> B[Yes / No]
A --> C[True / False]
A --> D[0 / 1]
A --> E[Spam / Not Spam]
Data indexed by time order.
Examples:
Characteristics:
Used in:
graph TD
A[Time Series Data] --> B[Ordered by Time]
A --> C[Temporal Dependency]
A --> D[Trend]
A --> E[Seasonality]
Unstructured textual information.
Examples:
Requires preprocessing:
Used in:
graph TD
A[Text Data] --> B[Unstructured]
A --> C[Requires Processing]
C --> D[Tokenization]
C --> E[Embedding]
C --> F[Vectorization]
Visual pixel-based data.
Examples:
Used in:
graph TD
A[Image Data] --> B[Pixels]
A --> C[Channels]
C --> D[RGB]
C --> E[Grayscale]
A --> F[Computer Vision Tasks]
Most common structured format (rows and columns).
Example:
| Age | Salary | Country | Bought |
|---|---|---|---|
| 25 | 3000 | Brazil | Yes |
| 40 | 8000 | USA | No |
Used in:
graph TD
A[Tabular Data] --> B[Rows]
A --> C[Columns]
A --> D[Features]
A --> E[Target]
| Data Type | Typical Task |
|---|---|
| Numerical | Regression |
| Categorical | Classification |
| Binary | Binary Classification |
| Time Series | Forecasting |
| Text | NLP |
| Image | Computer Vision |
| Tabular | General ML |
The data type determines the evaluation metric:
| Data Type | Task | Metrics |
|---|---|---|
| Categorical | Classification | Accuracy, F1 |
| Binary | Classification | Precision, Recall |
| Numerical | Regression | MAE, MSE |
| Ranking | Retrieval | Precision@K |
| Time Series | Forecasting | MAE, RMSE |
Classification
A supervised learning task where the model learns to categorize data into predefined classes or labels.
Example: Predicting if an email is spam or not spam.
Regression
A supervised learning task where the goal is to predict a continuous value.
Example: Predicting the price of a house based on size, location, etc.
Clustering
An unsupervised learning method where the algorithm groups data into clusters based on similarity—without predefined labels.
Example: Segmenting customers into groups based on their behavior or purchases.
Anomaly Detection
Identifying data points that are unusual or deviate significantly from the majority.
Example: Detecting fraudulent credit card transactions.
Sequence Mining
Analyzing and identifying patterns in ordered data (sequences), especially over time.
Example: Finding common sequences in customer purchases or website navigation.
Dimension Reduction
Reducing the number of features (dimensions) in a dataset while keeping important information—used to simplify models and visualize high-dimensional data.
Example: Using PCA (Principal Component Analysis) to reduce image data with thousands of pixels into just a few features.
Recommendation System
A system that suggests items (movies, products, etc.) to users based on their preferences or behaviors.
Example: Netflix recommending movies or shows based on your watch history.
Problem Definition
Clearly define the objective of the machine learning task.
Example: Predict customer churn or classify product reviews as positive or negative.
Data Collection
Gather relevant and sufficient raw data from various sources like databases, APIs, sensors, or manual input.
Example: Collecting user behavior logs or survey results.
Data Preparation
Clean, transform, and structure the data for training. This includes handling missing values, encoding categories, and normalizing values.
Example: Converting text into numeric form or removing outliers.
Model Development and Evaluation
Choose a model type, train it using prepared data, and evaluate its accuracy, precision, recall, or other relevant metrics.
Example: Training a decision tree and evaluating it using cross-validation.
Model Deployment
Integrate the trained model into a production environment where it can receive real input and make predictions.
Example: Deploying a fraud detection model via an API to monitor real-time transactions.
machine-learning/
│
├── README.md # High-level introduction to Machine Learning
│
evaluations/
│
├── README.md
│
├── 01.metrics/
│ ├── 01.classification/
│ │ ├── confusion_matrix.md
│ │ ├── accuracy.md
│ │ ├── precision.md
│ │ ├── recall.md
│ │ ├── f1_score.md
│ │ ├── roc_auc.md
│ │ └── log_loss.md
│ │
│ ├── 02.regression/
│ │ ├── mae.md
│ │ ├── mse.md
│ │ ├── rmse.md
│ │ ├── r2_score.md
│ │ └── mape.md
│ │
│ └── 03.ranking/
│ ├── precision_at_k.md
│ ├── recall_at_k.md
│ └── ndcg.md
│
├── 02.validation/
│ ├── train_test_split.md
│ ├── cross_validation.md
│ ├── k_fold.md
│ ├── stratified_k_fold.md
│ ├── leave_one_out.md
│ ├── time_series_split.md
│ ├── bootstrap.md
│
├── supervised/
│ ├── README.md # Core concepts: labeled data, overfitting, etc.
│ ├── 01.linear_regression.md
│ ├── 02.logistic_regression.md
│ ├── 03.k_nearest_neighbors.md
│ ├── 04.naive_bayes.md
│ ├── 05.svm.md
│ ├── 06.decision_trees.md
│ ├── 07.random_forest.md
│ ├── 08.gradient_boosting.md
│ ├── 09.neural_networks.md
│ ├── algorithms/
│ └── notebooks/
│
├── unsupervised/
│ ├── README.md # Key ideas: clustering, dimensionality reduction, etc.
│ ├── 01.k_means.md
│ ├── 02.dbscan.md
│ ├── 03.hierarchical_clustering.md
│ ├── 04.pca.md
│ ├── 05.tsne.md
│ ├── algorithms/
│ └── notebooks/
│
├── reinforcement_learning/
│ ├── README.md # Basics of agents, environments, rewards, etc.
│ ├── 01.q_learning.md
│ ├── 02.sarsa.md
│ ├── 03.deep_q_network.md
│ ├── 04.policy_gradient.md
│ ├── algorithms/
│ └── notebooks/
│
├── semi_supervised_learning/
│ ├── README.md # Hybrid between supervised and unsupervised
│ ├── 01.self_training.md
│ ├── 02.label_propagation.md
│ ├── algorithms/
│ └── notebooks/
│
└── shared_resources/
├── datasets/ # Sample datasets used across topics
├── utils/ # Reusable utility functions
└── references.md # Useful academic references and links
| Back | FazBrowse Home | New Git URL |