This repository contains Jupyter Notebooks implementing various foundational machine learning algorithms. Each notebook is designed to be beginner-friendly, with detailed explanations and examples, making it suitable for both learning and experimentation.
- Description: Implements the KNN algorithm, a non-parametric method used for classification and regression.
- Features:
- Custom implementation using
numpy. - Data visualization with
matplotlib. - Designed to work with CSV datasets.
- Custom implementation using
- Notebook:
KNN Algorithm.ipynb - More Info: KNN README
- Description: Implements Linear Regression for predicting a target variable based on input features.
- Features:
- Simple and customizable framework.
- Data visualization with
matplotlib. - Works with CSV datasets for easy reproducibility.
- Notebook:
Linear Regression Algorithm.ipynb - More Info: Linear Regression README
- Description: Implements Logistic Regression for binary classification tasks.
- Features:
- Progress tracking using
tqdm. - Visualization of results with
matplotlib. - Utilizes
numpyfor computations.
- Progress tracking using
- Notebook:
Logistic Regression Algorithm.ipynb - More Info: Logistic Regression README
- Category: Computer Vision - Image Classification
- Description: Implements a Convolutional Neural Network (CNN) to classify images from the CIFAR-10 dataset into 10 categories (e.g., planes, cars, birds, etc.).
- Features:
- Two convolutional layers with ReLU activations and max-pooling.
- Fully connected layers for classification.
- Integrates GPU support for faster training.
- Visualizes training and validation metrics.
- Notebook:
cs480_winter23_asst3_cnn_cifar10.ipynb
- Category: Natural Language Processing (NLP) - Sequence Generation
- Description: Implements a character-level RNN to generate sequences, such as names, based on a given category (e.g., language of origin). The model predicts the next character iteratively.
- Features:
- Generates realistic names from different languages.
- Pre-trained on datasets of names categorized by language.
- Implements dropout to add variety in generation.
- Notebook:
Generation.ipynb
- Category: Natural Language Processing (NLP) - Machine Translation
- Description: Implements a Sequence-to-Sequence (Seq2Seq) model with an attention mechanism to translate text from French to English.
- Features:
- Encoder-Decoder architecture with attention.
- Handles paired datasets for machine translation tasks.
- Demonstrates translation with variable-length sequences.
- Notebook:
Translation.ipynb
- Category: Natural Language Processing (NLP) - Text Classification
- Description: Uses a character-level RNN to classify words into categories (e.g., predicting the language of origin for a given name).
- Features:
- Processes variable-length input sequences.
- Predicts the language of origin based on the spelling of names.
- Includes training and evaluation on categorized datasets.
- Notebook:
Classification.ipynb
- Category: Generative Modeling
- Description: Implements a Variational Autoencoder (VAE) for generating new samples based on input data by learning a latent representation.
- Features:
- Encodes data into a latent space and decodes it to reconstruct data with added variability.
- Includes reparameterization trick for gradient-based optimization.
- Trained on the MNIST dataset for image generation.
- Notebook:
VAE_Complete.ipynb
- Category: Generative Modeling
- Description: Implements a Generative Adversarial Network (GAN) consisting of a generator and discriminator that compete to produce realistic images.
- Features:
- Generator network creates synthetic images.
- Discriminator network evaluates the authenticity of images.
- Trained on the MNIST dataset to generate realistic handwritten digits.
- Notebook:
GAN Complete.ipynb
- Python 3.7+
- Libraries:
numpymatplotlibtqdm(for Logistic Regression)torchtorchvision
- Install dependencies:
pip install numpy matplotlib tqdm torch torchvision`- Clone this repository:
git clone https://github.com/SV592/ML.git cd ML