A comprehensive implementation and comparison of artificial neural networks for predicting river flow using Multi-Layer Perceptrons (MLPs) with various optimization techniques.
This project demonstrates the application of artificial neural networks to environmental data analysis, specifically focusing on river flow prediction. The implementation includes multiple neural network architectures, training algorithms, and comprehensive performance analysis.
- Custom MLP Implementation: Built from scratch with sigmoid activation functions
- Multiple Training Algorithms: Backpropagation, momentum, bold driver, and learning rate annealing
- Comprehensive Data Processing: Interpolation, feature engineering, and multiple standardization methods
- Advanced Visualization: Interactive plots, correlation matrices, and performance comparisons
- Statistical Analysis: Bootstrap prediction intervals and model validation
- Professional Reporting: Automated figure generation and results export
The project successfully demonstrates:
- High Prediction Accuracy: Best model achieved RΒ² > 0.85 on test data
- Algorithm Comparison: Systematic evaluation of 6+ different training configurations
- Feature Analysis: Correlation analysis and feature importance evaluation
- Robust Validation: Cross-validation and prediction interval estimation
# Clone the repository
git clone https://github.com/dominichubble/neural-networks-river-prediction.git
cd neural-networks-river-prediction
# Install dependencies
pip install -r requirements.txt
# Launch Jupyter and open the main analysis notebook
jupyter notebook AI_ANN_Coursework_Analysis.ipynb
# Run the complete analysis
python main.py
βββ π AI_ANN_Coursework_Analysis.ipynb # Main interactive analysis notebook
βββ π main.py # Command-line interface
βββ π data/ # Processed datasets and results
βββ π§ mlp/ # Neural network implementation
β βββ mlp.py # Core MLP functions
β βββ network_training.py # Training algorithms
β βββ network_initialization.py # Weight initialization
βββ π§ utils/ # Utility modules
β βββ data_processor.py # Data preprocessing
β βββ experiment_manager.py # Experiment orchestration
β βββ report_visualizer.py # Visualization functions
βββ π§ͺ evaluation/ # Model evaluation tools
βββ π plots/ # Generated visualizations
βββ π requirements.txt # Python dependencies
βββ π README.md # This file
- Input Layer: Variable size based on feature engineering
- Hidden Layers: Configurable (single/multiple layers)
- Output Layer: Single node for regression
- Activation: Sigmoid function with custom derivative
- Standard Backpropagation: Basic gradient descent
- Momentum: Accelerated convergence with momentum term
- Bold Driver: Adaptive learning rate adjustment
- Learning Rate Annealing: Exponential, linear, and cosine decay
- Data Loading: Excel file parsing with pandas
- Interpolation: Missing value handling
- Feature Engineering: Time-based and statistical features
- Standardization: Multiple methods (robust, z-score, min-max)
- Train/Validation/Test Split: Temporal splitting for time series
The models are evaluated using:
- Mean Squared Error (MSE)
- Root Mean Squared Error (RMSE)
- Mean Absolute Error (MAE)
- R-squared (RΒ²)
- Training Time and Efficiency
The project generates comprehensive visualizations including:
- Data distribution and correlation analysis
- Learning curves and training progress
- Model performance comparisons
- Prediction vs. actual scatter plots
- Feature importance analysis
- Bootstrap prediction intervals
- Robust standardization performed best for this dataset
- Momentum-based training showed superior convergence
- Feature engineering significantly improved prediction accuracy
- Model ensemble potential identified for future work
- Core:
numpy
,pandas
,matplotlib
- Analysis:
scipy
,seaborn
- UI:
tqdm
,jupyter
- Data:
openpyxl
This project was developed as part of an AI/Neural Networks coursework and serves as a professional portfolio demonstration of machine learning expertise, software engineering skills, and data science capabilities.
This project is licensed under the MIT License - see the LICENSE file for details.
Dominic Hubble
- GitHub: @dominichubble
- LinkedIn: Connect with me
- Email: [email protected]
This project demonstrates:
- Machine Learning Expertise: Custom neural network implementation from scratch
- Software Engineering Skills: Clean, modular code with comprehensive documentation
- Data Science Workflow: Complete pipeline from raw data to actionable insights
- Technical Communication: Ability to explain complex concepts clearly
- Professional Standards: Industry best practices and attention to detail
This project demonstrates proficiency in:
- β Custom neural network implementation from mathematical foundations
- β Multiple optimization algorithm comparisons and analysis
- β Professional data science workflow with comprehensive documentation
- β Software engineering best practices with modular, maintainable code
- β Technical communication through clear explanations and visualizations
- High Accuracy: Achieved RΒ² > 0.85 on environmental prediction task
- Algorithm Mastery: Implemented 6+ different training optimization techniques
- Professional Quality: Industry-standard code organization and documentation
- Complete Pipeline: End-to-end solution from raw data to deployment-ready model
This repository serves as a professional portfolio demonstration of machine learning and software engineering capabilities.