{"id":24880694,"url":"https://github.com/aryansk/mnist-deep-learning-exploration","last_synced_at":"2026-04-08T20:50:37.789Z","repository":{"id":273530015,"uuid":"920023355","full_name":"aryansk/MNIST-Deep-Learning-Exploration","owner":"aryansk","description":"This repository contains implementation of various deep learning approaches for the MNIST handwritten digit classification task, using both scikit-learn and Keras frameworks.","archived":false,"fork":false,"pushed_at":"2025-01-31T08:33:18.000Z","size":33,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-27T06:16:15.017Z","etag":null,"topics":["keras","machine-learning","machine-learning-algorithms","mnist-classification","numpy","python","scikit-learn","tensorflow"],"latest_commit_sha":null,"homepage":"","language":"Jupyter Notebook","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/aryansk.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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-21T12:36:12.000Z","updated_at":"2025-01-31T08:33:22.000Z","dependencies_parsed_at":null,"dependency_job_id":"18200846-55ae-49cf-b9f3-b17d48e030fe","html_url":"https://github.com/aryansk/MNIST-Deep-Learning-Exploration","commit_stats":null,"previous_names":["aryansk/mnist-deep-learning-exploration"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aryansk%2FMNIST-Deep-Learning-Exploration","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aryansk%2FMNIST-Deep-Learning-Exploration/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aryansk%2FMNIST-Deep-Learning-Exploration/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aryansk%2FMNIST-Deep-Learning-Exploration/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/aryansk","download_url":"https://codeload.github.com/aryansk/MNIST-Deep-Learning-Exploration/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245791959,"owners_count":20672671,"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":["keras","machine-learning","machine-learning-algorithms","mnist-classification","numpy","python","scikit-learn","tensorflow"],"created_at":"2025-02-01T11:19:12.134Z","updated_at":"2026-04-08T20:50:37.743Z","avatar_url":"https://github.com/aryansk.png","language":"Jupyter Notebook","funding_links":[],"categories":[],"sub_categories":[],"readme":"# MNIST Deep Learning Exploration 🧠\n\n![Python](https://img.shields.io/badge/Python-3.8+-blue.svg)\n![TensorFlow](https://img.shields.io/badge/TensorFlow-2.x-orange.svg)\n![Keras](https://img.shields.io/badge/Keras-2.x-red.svg)\n![scikit-learn](https://img.shields.io/badge/scikit--learn-1.0+-green.svg)\n![License](https://img.shields.io/badge/License-MIT-yellow.svg)\n![Maintenance](https://img.shields.io/badge/Maintenance-Active-brightgreen.svg)\n\nA comprehensive exploration of deep learning approaches for the MNIST handwritten digit classification task, implementing various neural network architectures using scikit-learn and Keras frameworks.\n\n## 📖 Table of Contents\n- [Project Overview](#-project-overview)\n- [Technical Architecture](#-technical-architecture)\n- [Installation \u0026 Setup](#-installation--setup)\n- [Implementation Details](#-implementation-details)\n- [Experiments \u0026 Results](#-experiments--results)\n- [Performance Analysis](#-performance-analysis)\n- [Development](#-development)\n- [Contributing](#-contributing)\n- [License](#-license)\n\n## 🎯 Project Overview\n\n### 🔬 Feed Forward Network (scikit-learn)\n- **Implementation Features**\n  - Custom dataset preprocessing pipeline\n  - Configurable network architecture\n  - Flexible train-test split options\n  - Comprehensive performance metrics\n- **Analysis Capabilities**\n  - Iteration impact assessment\n  - Split ratio optimization\n  - Parameter sensitivity analysis\n  - Training time evaluation\n\n### 🚀 Deep Neural Networks (Keras)\n- **Architecture Exploration**\n  - Variable node configurations (4-2056)\n  - Flexible layer depths (4-16)\n  - Multiple activation functions\n  - Custom layer combinations\n- **Design Optimization**\n  - Hyperparameter tuning\n  - Architecture comparison\n  - Performance benchmarking\n  - Resource utilization analysis\n\n## 🛠 Technical Architecture\n\n### System Components\n```mermaid\ngraph TD\n    A[MNIST Dataset] --\u003e B[Data Preprocessing]\n    B --\u003e C[Feature Engineering]\n    C --\u003e D1[scikit-learn Implementation]\n    C --\u003e D2[Keras Implementation]\n    D1 --\u003e E1[FFN Model]\n    D2 --\u003e E2[DNN Model]\n    E1 --\u003e F[Performance Analysis]\n    E2 --\u003e F\n    F --\u003e G[Results Visualization]\n```\n\n### Dependencies\n```python\n# requirements.txt\nnumpy\u003e=1.20.0\nmatplotlib\u003e=3.4.0\nscikit-learn\u003e=1.0.0\ntensorflow\u003e=2.8.0\nkeras\u003e=2.8.0\npandas\u003e=1.3.0\nseaborn\u003e=0.11.0\n```\n\n## 💻 Installation \u0026 Setup\n\n### System Requirements\n- **Minimum Specifications**\n  - Python 3.8+\n  - 8GB RAM\n  - 4GB GPU memory\n  - 10GB storage\n- **Recommended Specifications**\n  - Python 3.9+\n  - 16GB RAM\n  - 8GB GPU memory\n  - CUDA-compatible GPU\n  - 20GB SSD storage\n\n### Quick Start\n```bash\n# Clone repository\ngit clone https://github.com/yourusername/mnist-deep-learning-exploration.git\n\n# Navigate to project\ncd mnist-deep-learning-exploration\n\n# Create virtual environment\npython -m venv venv\nsource venv/bin/activate  # Linux/Mac\n.\\venv\\Scripts\\activate   # Windows\n\n# Install dependencies\npip install -r requirements.txt\n```\n\n### Configuration\n```python\n# config.py\nCONFIG = {\n    'data': {\n        'train_test_splits': [0.6, 0.75, 0.8, 0.9],\n        'batch_size': 32,\n        'validation_split': 0.1\n    },\n    'model': {\n        'node_counts': [4, 32, 64, 128, 512, 2056],\n        'layer_depths': [4, 5, 6, 8, 16],\n        'activations': ['relu', 'sigmoid', 'tanh']\n    },\n    'training': {\n        'epochs': 50,\n        'early_stopping_patience': 5,\n        'learning_rate': 0.001\n    }\n}\n```\n\n## 🔬 Implementation Details\n\n### Feed Forward Network\n```python\ndef create_ffn_model(input_dim, hidden_layers, nodes_per_layer):\n    \"\"\"\n    Creates a Feed Forward Neural Network using scikit-learn.\n    \n    Args:\n        input_dim (int): Input dimension\n        hidden_layers (int): Number of hidden layers\n        nodes_per_layer (int): Nodes in each hidden layer\n        \n    Returns:\n        MLPClassifier: Configured neural network\n    \"\"\"\n    return MLPClassifier(\n        hidden_layer_sizes=(nodes_per_layer,) * hidden_layers,\n        activation='relu',\n        solver='adam',\n        max_iter=200,\n        random_state=42\n    )\n```\n\n### Deep Neural Network\n```python\ndef create_dnn_model(input_shape, architecture):\n    \"\"\"\n    Creates a Deep Neural Network using Keras.\n    \n    Args:\n        input_shape (tuple): Shape of input data\n        architecture (dict): Model architecture configuration\n        \n    Returns:\n        Model: Compiled Keras model\n    \"\"\"\n    model = Sequential()\n    \n    # Input layer\n    model.add(Dense(architecture['nodes'][0], \n                   input_shape=input_shape,\n                   activation=architecture['activations'][0]))\n    \n    # Hidden layers\n    for nodes, activation in zip(architecture['nodes'][1:],\n                               architecture['activations'][1:]):\n        model.add(Dense(nodes, activation=activation))\n    \n    # Output layer\n    model.add(Dense(10, activation='softmax'))\n    \n    model.compile(optimizer='adam',\n                 loss='categorical_crossentropy',\n                 metrics=['accuracy'])\n    \n    return model\n```\n\n## 📊 Experiments \u0026 Results\n\n### Node Count Analysis\n| Nodes | Accuracy | Training Time (s) | Parameters |\n|-------|----------|-------------------|------------|\n| 4     | 85.2%    | 12.3             | 3,214      |\n| 32    | 92.1%    | 15.7             | 25,962     |\n| 64    | 94.5%    | 18.2             | 51,914     |\n| 128   | 96.2%    | 22.8             | 103,818    |\n| 512   | 97.1%    | 35.6             | 415,242    |\n| 2056  | 97.3%    | 89.4             | 1,661,962  |\n\n### Layer Depth Study\n```python\ndef plot_depth_performance():\n    \"\"\"\n    Visualizes performance across different network depths.\n    \"\"\"\n    plt.figure(figsize=(10, 6))\n    plt.plot(depths, accuracies, marker='o')\n    plt.xlabel('Network Depth')\n    plt.ylabel('Accuracy')\n    plt.title('Performance vs Network Depth')\n    plt.grid(True)\n```\n\n## ⚡ Performance Analysis\n\n### Optimization Techniques\n- Batch normalization\n- Dropout layers\n- Learning rate scheduling\n- Early stopping\n\n### Benchmarks\n| Architecture | Accuracy | Training Time | Memory Usage |\n|--------------|----------|---------------|--------------|\n| Basic FFN    | 92.5%    | 25s          | 450MB       |\n| 4-Layer DNN  | 95.8%    | 45s          | 680MB       |\n| 8-Layer DNN  | 97.2%    | 78s          | 920MB       |\n| 16-Layer DNN | 97.5%    | 156s         | 1.2GB       |\n\n## 👨‍💻 Development\n\n### Project Structure\n```\nmnist-deep-learning/\n├── data/\n│   ├── raw/\n│   └── processed/\n├── models/\n│   ├── ffn/\n│   └── dnn/\n├── src/\n│   ├── preprocessing.py\n│   ├── ffn_model.py\n│   ├── dnn_model.py\n│   └── visualization.py\n├── notebooks/\n│   ├── exploration.ipynb\n│   └── analysis.ipynb\n├── tests/\n│   └── test_models.py\n├── config.py\n├── requirements.txt\n└── README.md\n```\n\n### Testing\n```bash\n# Run all tests\npython -m pytest\n\n# Run specific test file\npython -m pytest tests/test_models.py\n\n# Run with coverage\npython -m pytest --cov=src\n```\n\n## 🤝 Contributing\n\n### Workflow\n1. Fork repository\n2. Create feature branch\n3. Implement changes\n4. Add tests\n5. Submit pull request\n\n### Code Style Guidelines\n- Follow PEP 8\n- Document all functions\n- Write comprehensive tests\n- Maintain clean notebook outputs\n\n## 📄 License\n\nThis project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.\n\n## 🙏 Acknowledgments\n\n- MNIST Dataset creators\n- TensorFlow and Keras teams\n- scikit-learn community\n- CSET-335 course staff\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faryansk%2Fmnist-deep-learning-exploration","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Faryansk%2Fmnist-deep-learning-exploration","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faryansk%2Fmnist-deep-learning-exploration/lists"}