Skip to content

elakaddo/XOR-with-Neural-Network

Repository files navigation

🤖 Neural Network to Solve XOR Non-Linearity Problem ⚡

📌 Requirements

  • ☕ Java : The whole code is written in Java ( NO LIBRARY IS NEEDED, YOU CAN COMPILE SIMPLY USING javac ... EXECUTE with java ...)
  • 🧠 Basic knowledge of neural networks vs perceptrons
  • 🎯 What this project does?

This project implements a simple neural network 🏗️ from scratch in Java to solve the XOR problem ❌🔄⭕. Since XOR is non-linearly separable, a single-layer perceptron cannot solve it ❌. Here, we use a multi-layer neural network 🏆 with backpropagation to make it work! 💡

⚙️ How it works? (It's simple)

  • ✅ Feedforward propagation: Computes the output based on given inputs. 🔄
  • ✅ Backpropagation: Adjusts weights to reduce errors. 🎯
  • ✅ Sigmoid activation function: Helps model non-linearity. 📈
  • ✅ Training phase: The network learns by adjusting weights over time. ⏳

📈 Results & Learning Curve

After training, the network should produce accurate results close to 0 and 1! 🎯 You can visualize the learning process using a graph 📊 that shows the error decreasing over time.

🙌 Hopes & Goals

  • 💡 I truly hope this first template helps someone out there who is trying to understand how a neural network actually works! 🚀

  • 👨‍💻 Feel free to modify, experiment, and improve! 🛠️

  • 🎉 Happy coding! 🧑‍💻🔥

About

This is a very small project on Java to understand how a Neural Network work actually.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages