/AI-Color-Predictor

Simple neural network with only one layer that learns to classify 2 colors

Primary LanguagePythonMIT LicenseMIT

AI-Color-Predictor

AI Color Predictor - By. Ibrahim Said Elsharawy (www.devhima.tk)

This project is a single layer neural network consists of 4 inputs 4 neurons (first is bias=1 & others is RGB color values) and one output 1 neuron

This neural net trains itself on 4 samples of (RGB) red & blue colors using signum & signum_derivative & dirac_delta functions to classify your inputed color to blue +1 or red -1

Here is the mathematical representation of the idea:

  • Trainning data samples & Neural Network:

math1

  • Calculation of the output Y with signum function:

math2

  • The weight adaptation steps:

math2

Screenshot of some tests:

screen1

screen2