{"id":24634473,"url":"https://github.com/qua77i20/ai2","last_synced_at":"2026-05-15T13:05:03.134Z","repository":{"id":272479629,"uuid":"916753547","full_name":"QUA77I20/AI2","owner":"QUA77I20","description":"A simple single-layer neural network (perceptron) built in Python. Demonstrates backpropagation training from scratch for beginners.","archived":false,"fork":false,"pushed_at":"2025-01-14T18:07:05.000Z","size":8,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-20T07:47:18.437Z","etag":null,"topics":["ai","backpropagation","data-science","deep-learning","machine-learning","neural-network","numpy","perceptron","python"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/QUA77I20.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2025-01-14T17:43:23.000Z","updated_at":"2025-01-14T18:55:12.000Z","dependencies_parsed_at":null,"dependency_job_id":"6a85ad2d-8e2e-4ced-a06d-f50565cdd366","html_url":"https://github.com/QUA77I20/AI2","commit_stats":null,"previous_names":["qua77i20/ai2"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/QUA77I20%2FAI2","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/QUA77I20%2FAI2/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/QUA77I20%2FAI2/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/QUA77I20%2FAI2/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/QUA77I20","download_url":"https://codeload.github.com/QUA77I20/AI2/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/QUA77I20%2FAI2/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":259103301,"owners_count":22805663,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ai","backpropagation","data-science","deep-learning","machine-learning","neural-network","numpy","perceptron","python"],"created_at":"2025-01-25T09:12:50.117Z","updated_at":"2025-10-10T10:36:08.740Z","avatar_url":"https://github.com/QUA77I20.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Neural Network Training Project\n\nThis repository contains a basic implementation of a single-layer neural network (perceptron) using **Python** and **NumPy**. The project showcases how to train a neural network using the **backpropagation method**.\n\n## 🧩 **Project Structure**\n```\n📁 AI2\n├── src\n│   └── AI2.py             # Main code file with the neural network implementation\n├── README.md              # Documentation file (this file)\n├── requirements.txt       # Dependencies\n└── .gitignore             # Git ignore file\n```\n\n## 🚀 **How to Run the Project**\n1. Clone this repository:\n   ```bash\n   git clone https://github.com/QUA77I20/AI2.git\n   ```\n\n2. Navigate to the project folder:\n   ```bash\n   cd AI2\n   ```\n\n3. Run the Python script:\n   ```bash\n   python src/AI2.py\n   ```\n\n## ⚙️ **Functions and Methods**\n### `sigmoid(x)`\nThe sigmoid function is used to map any real value to the range (0, 1).\n\n### Training Process\n- The network is trained using a simple dataset of binary inputs and outputs.\n- The **backpropagation method** is used to adjust the synaptic weights based on the error between the expected and actual outputs.\n\n## 📈 **Training Example**\nInitial random weights:\n```\n[ 0.5, -0.3, 0.8 ]\n```\n\nAfter training:\n```\n[ 1.2, -0.6, 0.9 ]\n```\n\n## 🧪 **Testing**\nThe network is tested with new inputs to predict the output.\n\nExample test input:\n```\nNew input: [1, 1, 0]\nPredicted output: 0.89\n```\n\n## 📂 **Future Improvements**\n- Implement multi-layer perceptron (MLP).\n- Add error visualization (e.g., matplotlib graphs).\n- Optimize the backpropagation algorithm.\n\n## 📄 **License**\nThis project is open-source and available under the MIT License.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fqua77i20%2Fai2","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fqua77i20%2Fai2","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fqua77i20%2Fai2/lists"}