This repository contains the implementation for Assignment 1 of the Neural Networks: Theory and Implementation (NNTI) course. The assignment covers key concepts of data generation, visualization, and classification using Python libraries such as NumPy
, Matplotlib
, and scikit-learn
.
-
Data Generation:
- Creating linearly separable 2D clusters.
- Generating an XOR dataset with logical XOR operation.
-
Visualization:
- Visualizing clusters and XOR datasets.
- Plotting decision boundaries for classification models.
-
Classification:
- Using
sklearn.svm.LinearSVC
to classify datasets. - Exploring the impact of hyperparameters and noise on decision boundaries.
- Using
-
Analysis:
- Observing decision boundary differences between linearly separable and XOR datasets.
- Evaluating the influence of outliers on model performance.
assignment1_1_1.py
: Functions for generating 2D clusters and shuffling data.assignment1_1_2.py
: Functions for creating an XOR dataset.assignment1_1_3.py
: Functions to visualize datasets using scatter plots.assignment1_2_1.py
: Implementation of a linear SVM model usingLinearSVC
.assignment1_2_2.py
: Functions to plot decision boundaries for classification models.assignment1_2_3.py
: Functions for hyperparameter tuning usingGridSearchCV
andRandomizedSearchCV
.main.py
: The main script that combines and executes the above functionalities.
The following Python libraries are required:
NumPy
Matplotlib
scikit-learn
You can install them using:
pip install numpy matplotlib scikit-learn