PyOghma_ML API Documentation
PyOghma_ML is an advanced machine learning framework designed specifically for organic photovoltaic (OPV) device analysis and prediction. The framework integrates data processing, neural network training, prediction capabilities, and automated report generation.
🎯 Key Features
- Multi-laboratory data compatibility and standardized processing
- Advanced neural network architectures with ensemble learning
- Automated hyperparameter tuning and optimization
- Comprehensive error analysis and statistical validation
- Publication-ready report generation with LaTeX integration
- Seamless integration with OghmaNano simulation software
from PyOghma_ML import Input, Networks, Output
# Load experimental data
data = Input.experiment('device_data/', 'JV', 'Brabec')
# Initialize and train networks
networks = Networks.initialise('networks/', 'Point')
networks.train_networks()
# Generate comprehensive report
output = Output(networks, data)
output.build_report()
Core Modules
🔬 Input Module
Handles experimental data processing from various laboratory sources. Supports multiple characterization types (JV, TPV, CE, CELIV) and provides standardized data parsing for different laboratory formats.
🧠 Networks Module
Contains neural network architectures and model management systems. Implements Point, Ensemble, and Difference network types with support for residual connections and multi-input architectures.
⚡ Training Module
Manages the complete training pipeline for machine learning models. Features adaptive learning rates, model persistence, and support for both new and continued training from existing models.
🎯 Predicting Module
Provides prediction capabilities using trained models. Handles model loading, feature preprocessing, and batch prediction for experimental data analysis.
📊 Output Module
Generates comprehensive reports and visualizations. Creates LaTeX-based reports with experimental analysis, ML predictions, statistical comparisons, and performance metrics.
📈 Figures Module
Manages matplotlib-based figure generation and customization. Provides utilities for scientific plotting, subplot management, and publication-ready visualizations.
📝 LaTeX Module
Facilitates programmatic LaTeX document creation and compilation. Supports figures, tables, sections, and automatic PDF generation with custom styling and formatting.
🏷️ Labels Module
Handles label management and metadata processing for the OghmaNano framework. Interfaces with C-based token libraries for efficient label processing and unit conversion.
⚙️ Tuning Module
Provides hyperparameter optimization utilities using Keras Tuner. Implements automated search strategies for optimal model configuration and performance enhancement.
Version: 2.0 Author: PyOghma_ML Development Team License: See package documentation
Sub-modules
src.PyOghma_ML.Figures
-
This module provides a utility class for creating and managing matplotlib figures and axes …
src.PyOghma_ML.Input
-
This module provides a framework for handling and processing input data from various laboratories …
src.PyOghma_ML.Labels
-
This module provides functionality for managing and processing labels in the OghmaNano framework …
src.PyOghma_ML.Latex
-
This module provides a class for programmatically generating LaTeX documents …
src.PyOghma_ML.Networks
-
Neural Network Management and Training Framework for PyOghma_ML …
src.PyOghma_ML.Output
-
Comprehensive Report Generation and Visualization System for PyOghma_ML …
src.PyOghma_ML.Predicting
-
This module provides functionality for loading trained neural network models and making predictions …
src.PyOghma_ML.Training
-
This module provides functionality for training machine learning models using TensorFlow/Keras …
src.PyOghma_ML.Tuning
-
This module provides functionality for hyperparameter tuning of machine learning models using Keras Tuner …