$cat ~/articles/ml/tutorial/introduction-to-ml.md
Introduction to Machine Learning
A gentle introduction to machine learning concepts, covering supervised learning, neural networks, and practical applications.
K
Kartik Gupta
Author
April 12, 2026
Published
1 min read
Read time
Types of Learning
Supervised Learning
The algorithm learns from labeled examples.
pythonfrom sklearn.ensemble import RandomForestClassifier model = RandomForestClassifier() model.fit(X_train, y_train) predictions = model.predict(X_test)
Unsupervised Learning
The algorithm finds patterns in unlabeled data.
pythonfrom sklearn.cluster import KMeans kmeans = KMeans(n_clusters=3) kmeans.fit(X) labels = kmeans.labels_
Neural Networks
At their core, neural networks are function approximators:
Input → Hidden Layers → Output
Each "neuron" applies a weighted sum followed by an activation function.
Practical Tools
- scikit-learn: Great for traditional ML
- PyTorch: Flexible deep learning
- Hugging Face: Pre-trained models and fine-tuning
Getting Started
- Pick a problem you care about
- Find a dataset
- Start simple (linear regression, then gradient descent)
- Iterate
The best ML projects come from understanding the domain, not just the algorithms.