A collection of simple machine learning examples and logic gates, showcasing how to implement basic neural computations in the C language.
This project explores neural operations, gradient descent, and logic gate training (AND, OR, NAND, XOR). Written in C, it demonstrates fundamental ML principles at a low-level.
- nn.c / nn.h
Demonstrates basic matrix operations (allocation, filling, summation). - xor.c
Implements a XOR network using multiple gates (OR, NAND, AND) combined. - gates.c
Trains standalone logic gates (NAND, AND, OR) using gradient descent. - twice.c
Learns a simple linear function (y=2x). - build.sh
Shell script compiling executables (clang). - .gitignore
Ignored files and directories.
Clone this repo:
git clone https://github.com/your-username/machine-learning-with-C.git
cd machine-learning-with-Cmachine-learning-with-C
├── README.md # Project documentation
│ └── Updated with new features and usage examples
│ └── Oct 29, 2024: Update README.md
├── build.sh # Script to compile the project
│ └── Oct 29, 2024: Xor gate finished with full operationality
├── gates/ # Directory for gate implementations
│ └── Oct 17, 2024: Made OR, AND, NAND gates workable with single neuron
├── gates.c # Core logic for OR, AND, NAND gates
│ └── Oct 17, 2024: Made OR, AND, NAND gates workable with single neuron
├── twice/ # Directory for twin neuron and OR-gate functions
│ └── Oct 16, 2024: Added OR-gate and twin neuron functionality with minor fixes
├── twice.c # Logic for twin neurons and OR-gate functions
│ └── Oct 16, 2024: Added OR-gate and twin neuron functionality with minor fixes
├── xor/ # Directory for XOR gate implementation
│ └── Oct 29, 2024: XOR gate finished with full operationality
├── xor.c # XOR gate logic
│ └── Oct 29, 2024: XOR gate finished with full operationality
Implement more complex neural networks
Expand gate compatibility testing for multi-layered logic gates
Add support for additional machine learning concepts, such as XOR gate and simple backpropagation
Contributions are welcome! Please open an issue or submit a pull request for any improvements or feature additions.
All rights reserved. Any usage, distribution, or modification of this project, in whole or in part, is prohibited without explicit permission from the original author.