Skip to content

I created, trained, and validated a single neuron classifier to a high accuracy, in order to use it as a binary classifier in the given problem. After building it from scratch in Python, I recreated the same model in PyTorch.

Notifications You must be signed in to change notification settings

Rosie-Wang/X-PatternDetector

Repository files navigation

X-Pattern Detector with Single Neuron Classifiers

There are 2 notebooks in this repository:

  1. One notebook contains my code for the Single Neuron Classifier coded from scratch in Python (uses NumPy, matplotlib).
  2. The second notebook contains the same Single Neuron Classifier coded in PyTorch.

All neccessary functions have been defined in the same notebook, so only one has to be run to test the code.

----- About the project -----

Objective: Train a single artificial neuron to a high accuracy, in order to be used as a binary classifier in the problem.

Problem to Solve: Given a 3x3 array of binary data (i.e. only 1's and 0's), determine when the 3x3 pattern is an 'X' pattern. This 'X' patter is defined as 1's along the 2 diagonals and 0s elsewhere.

Visualize the Data: matplotlib and a provided dispKernal function was used to visualize the training and validation losses and accuracies, and trained weights, respectively.

Choose your own parameters:

  • Activation Functions: ReLU, Sigmoid, Linear

  • Number of Epochs

  • Learning Rate

  • Random Seed

----- Results -----

  • 100% training accuracy obtainable

  • 100% validation accuracy obtainable

About

I created, trained, and validated a single neuron classifier to a high accuracy, in order to use it as a binary classifier in the given problem. After building it from scratch in Python, I recreated the same model in PyTorch.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published