Machine Learning Fundamentals
What is Machine Learning?
Machine Learning (ML) is a subfield of artificial intelligence that focuses on building systems that can learn from data, identify patterns, and make decisions with minimal human intervention.
Read a quick definition
“A computer program is said to learn from experience E with respect to some class of tasks T and performance measure P if its performance at tasks in T, as measured by P, improves with experience E.” – Tom Mitchell
Types of Learning
- Supervised Learning: Learning from labeled data.
- Unsupervised Learning: Finding hidden structures in unlabeled data.
- Reinforcement Learning: Learning optimal actions through trial-and-error interaction with an environment.
Typical ML Pipeline
# 1. Gather data
data = load_data('dataset.csv')
# 2. Clean & preprocess
data = preprocess(data)
# 3. Split
train, test = train_test_split(data, test_size=0.2)
# 4. Choose model
model = RandomForestClassifier()
# 5. Train
model.fit(train.X, train.y)
# 6. Evaluate
pred = model.predict(test.X)
print(classification_report(test.y, pred))
Key Algorithms
- Linear Regression
- Predict continuous values.
- Logistic Regression
- Binary classification.
- Decision Trees
- Simple, interpretable models for classification/regression.
- Support Vector Machines
- Effective in high-dimensional spaces.
- Neural Networks
- Powerful models for complex patterns.
Model Evaluation
Choosing the right metric depends on the problem type.
| Task | Metric |
|---|---|
| Regression | RMSE, MAE, R² |
| Binary Classification | Accuracy, Precision, Recall, F1‑Score, ROC‑AUC |
| Multi‑class Classification | Accuracy, Macro‑F1, Confusion Matrix |
| Clustering | Silhouette Score, Adjusted Rand Index |
Explore more topics in the AI & Machine Learning hub or return to the community homepage.