A collection of notebooks covering fundamental machine learning algorithms and image processing techniques — built as a learning portfolio.
| Notebook | Topic | Key Concepts |
|---|---|---|
01_linear_regression.ipynb |
Linear Regression | From-scratch implementation, gradient descent, cost function |
02_classification_algorithms.ipynb |
Classification | Logistic Regression, KNN, SVM, Naive Bayes |
03_trees_and_ensembles.ipynb |
Tree-based Models | Decision Trees, Random Forest, Gradient Boosting |
04_clustering.ipynb |
Unsupervised Learning | K-Means, Hierarchical Clustering, DBSCAN |
05_pca_dimensionality_reduction.ipynb |
Dimensionality Reduction | PCA, t-SNE, explained variance |
| Notebook | Topic | Key Concepts |
|---|---|---|
06_image_basics.ipynb |
Image Fundamentals | Pixel arrays, color spaces, transformations |
07_filters_edge_detection.ipynb |
Filtering | Convolution, Gaussian blur, Sobel, edge detection |
08_image_segmentation.ipynb |
Segmentation | Thresholding, K-Means segmentation, morphological ops |
| File | Algorithm |
|---|---|
MergeSort.java |
Merge Sort implementation |
QuickSort.java |
Quick Sort implementation |
FrostBite.java |
OOP practice (Codemon character class) |
Every notebook follows the same structure:
- Introduction — what the algorithm does and why it matters
- Data Loading — real datasets from sklearn
- EDA — visualizations to understand the data
- Implementation — the algorithm (sometimes from scratch)
- Evaluation — metrics, confusion matrices, comparisons
- What I Learned — key takeaways
git clone https://github.com/naveed1011/algorithms_and_tasks.git
cd algorithms_and_tasks
pip install numpy pandas matplotlib seaborn scikit-learn scipy jupyter
jupyter notebook- No free lunch theorem — no single algorithm works best for all problems
- Feature scaling matters — especially for distance-based algorithms (KNN, SVM)
- Always cross-validate — single train/test splits can be misleading
- Ensemble methods usually win — Random Forest and Gradient Boosting are strong baselines
- Interpretability vs performance — decision trees are interpretable, ensemble methods perform better
- Images are just arrays — once you see them as numbers, everything makes sense
- Filters are convolution — sliding a small matrix over the image
- Noise reduction before edge detection — always smooth first
- Segmentation has many approaches — threshold, clustering, region growing
- Morphological operations are useful — clean up binary masks
| Dataset | Source | Task |
|---|---|---|
| California Housing | sklearn | Regression |
| Breast Cancer | sklearn | Binary Classification |
| Wine | sklearn | Multi-class Classification |
| Iris | sklearn | Clustering |
| Digits | sklearn | Dimensionality Reduction |
Naveed Ahmad
Learning ML and Image Processing, one notebook at a time.