This project evaluates the performance of a single-layer Multi-Class Perceptron (MCP) and a Multi-Layer Perceptron (MLP) for classifying penguin species. The goal is to understand the effectiveness of these perceptron models on the Palmer Penguins dataset and compare their performance against the previous classification project using K-Nearest Neighbors (KNN) and Naive Bayes algorithms on the same dataset. This comparison aims to provide insights into the strengths and weaknesses of different classification approaches for this specific problem.
This notebook covers the following key areas:
- π Data Handling: Loading, cleaning, and preprocessing the Palmer Penguins dataset.
- π§ Model Implementation: Building and implementing MCP and MLP models from scratch using NumPy.
- π¬ Experimentation: Conducting experiments to evaluate model performance by varying:
- π Number of training epochs
- βοΈ Learning rates
- π Training and testing data splits
- Cross-validation techniques
- π― Evaluation: Assessing model accuracy based on experimental results and error analysis.
The project utilises the Palmer Penguins dataset, which contains physical measurements for three different penguin species (Adelie, Gentoo, and Chinstrap) collected from three islands in the Palmer Archipelago, Antarctica.
- π Python: The core programming language.
- π’ NumPy: For numerical computations and implementing the models.
- π Matplotlib: For data visualisation and plotting error curves.
- πΌ pandas: For data loading, manipulation, and analysis.
- π€ scikit-learn: For data splitting (
train_test_split) and cross-validation (KFold). - π¦ palmerpenguins: To easily load the dataset.
- Multi-Class Perceptron (MCP): A fundamental single-layer neural network adapted for classification with more than two classes.
- Multi-Layer Perceptron (MLP): A more complex neural network with an input layer, one hidden layer, and an output layer, allowing for the learning of more intricate patterns.
This project utilises the palmerpenguins dataset, generously provided by Dr. Kristen Gorman and the Palmer Station, Antarctica LTER. π
To run this notebook, you need to have Python and the required libraries installed. You can install the libraries using pip: