Machine Learning Fundamentals
What is Machine Learning
Machine learning is a branch of artificial intelligence that enables computers to learn from data without being explicitly programmed.
Types of Learning
Supervised Learning
Given labeled training data, learn the mapping relationship from input to output.
Common Algorithms:
| Algorithm | Use Case | Characteristics |
|---|---|---|
| Linear Regression | Predicting continuous values | Simple, interpretable |
| Logistic Regression | Binary classification | Outputs probability |
| Decision Tree | Classification/Regression | Easy to understand |
| Support Vector Machine | Classification | Effective in high dimensions |
| Neural Network | Complex pattern recognition | Strong expressive power |
Unsupervised Learning
Process unlabeled data to discover intrinsic structures within the data.
Common Algorithms:
- Clustering: K-Means, DBSCAN, Hierarchical Clustering
- Dimensionality Reduction: PCA, t-SNE, UMAP
- Association Rules: Apriori, FP-Growth
Reinforcement Learning
Learn optimal policies through interaction with the environment to maximize cumulative rewards.
Core Concepts:
Agent → Action → Environment
↓
Reward
↓
State (new)
Key Terminology
Feature: Attributes or variables used to describe data.
Label: The target value to predict in supervised learning.
Overfitting: The model performs well on training data but poorly on new data.
Underfitting: The model fails to capture the basic patterns in the data.
Cross Validation: A statistical method for evaluating model performance.
Model Evaluation Metrics
Classification Problems
Accuracy = (TP + TN) / (TP + TN + FP + FN)
Precision = TP / (TP + FP)
Recall = TP / (TP + FN)
F1 Score = 2 × (Precision × Recall) / (Precision + Recall)
Regression Problems
MSE (Mean Squared Error) = Σ(y - ŷ)² / n
RMSE (Root Mean Squared Error) = √MSE
MAE (Mean Absolute Error) = Σ|y - ŷ| / n
R² (Coefficient of Determination) = 1 - SS_res / SS_tot
Learning Recommendations
- Master mathematical foundations first (linear algebra, probability theory, calculus)
- Understand algorithm principles, don’t just use libraries
- Do more practical projects to accumulate hands-on experience
- Read classic papers and track cutting-edge developments