12. BgoFace: Graphical User Interface for Bgolearn#

Note

BgoFace is the graphical user interface (GUI) component of the Bgolearn platform, designed to provide users with an intuitive and efficient way to interact with Bgolearn for material design and optimization.

12.1. Overview#

BgoFace serves as the user interface for Bgolearn, making the platform more accessible and user-friendly. Through BgoFace, users can easily create optimization tasks, monitor real-time progress, and visualize results using built-in tools. The design focuses on clarity and interactivity, allowing users to focus on optimization tasks without worrying about technical complexities.

Why BgoFace?

BgoFace bridges the gap between experimental and computational domains by:

  • Simplifying complex workflows - No coding required

  • Providing intuitive controls - Visual interface for all operations

  • Integrating experimental constraints - Real-world limitations built-in

  • Enabling seamless access to active learning algorithms

  • Empowering materials exploration without deep ML expertise

12.2. Key Features#

12.2.1. πŸŽ›οΈ Dashboard#

Overview Panel: Provides a snapshot of ongoing optimization tasks, including:

  • Task status and progress indicators

  • Key performance metrics

  • Visual summaries of results

  • Real-time updates

12.2.2. πŸ“Š Optimization Management#

Task Monitoring:

  • Real-time tracking of optimization progress

  • Intermediate results display

  • Model performance metrics

  • Automated notifications and alerts

Result Analysis:

  • Comprehensive tools for analyzing optimization results

  • Both numerical and graphical interpretations

  • Export capabilities for further analysis

12.2.3. πŸ“ˆ Visualization Tools#

Built-in Plotting Interface:

  • Scatter plots for data exploration

  • Line charts for convergence analysis

  • Bar graphs for feature importance

  • Pareto front visualizations for multi-objective problems

  • 3D surface plots for response landscapes

Data Export Options:

  • PNG/PDF formats for publications

  • CSV/Excel for data analysis

  • Interactive HTML plots

  • High-resolution images for presentations

12.3. Architecture#

BgoFace follows a modular architecture that separates the user interface from the computational backend:

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”    β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”    β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚   User Input    │───▢│   BgoFace GUI   │───▢│  Bgolearn Core  β”‚
β”‚                 β”‚    β”‚                 β”‚    β”‚                 β”‚
β”‚ β€’ Parameters    β”‚    β”‚ β€’ Task Manager  β”‚    β”‚ β€’ Optimization  β”‚
β”‚ β€’ Data Upload   β”‚    β”‚ β€’ Visualizer    β”‚    β”‚ β€’ ML Models     β”‚
β”‚ β€’ Constraints   β”‚    β”‚ β€’ Result Viewer β”‚    β”‚ β€’ Algorithms    β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜    β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜    β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                              β”‚                        β”‚
                              β–Ό                        β–Ό
                       β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”    β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
                       β”‚   File System   β”‚    β”‚   Computation   β”‚
                       β”‚                 β”‚    β”‚                 β”‚
                       β”‚ β€’ Data Storage  β”‚    β”‚ β€’ Model Trainingβ”‚
                       β”‚ β€’ Results Cache β”‚    β”‚ β€’ Predictions   β”‚
                       β”‚ β€’ Export Files  β”‚    β”‚ β€’ Optimization  β”‚
                       β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜    β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

12.4. Installation and Setup#

12.4.2. Option 2: Build from Source#

For developers or users who want to customize BgoFace:

12.4.2.1. Prerequisites#

# Install required packages
pip install PyQt5 pyinstaller Bgolearn

12.4.2.2. Clone and Setup#

# Clone the repository
git clone https://github.com/Bgolearn/BgoFace.git
cd BgoFace

# Install dependencies
pip install -r requirements.txt

# Run from source
python main.py

12.4.2.3. Build Executable#

# Create standalone executable
pyinstaller -F -w --add-data "Images;Images" main.py

# The executable will be in the dist/ folder

PyInstaller Options Explained:

  • -F: Bundle everything into a single file

  • -w: Suppress console window (GUI only)

  • --add-data: Include additional assets like images

12.5. User Interface Guide#

12.5.1. Main Dashboard#

The main dashboard provides an overview of your optimization projects:

# Example: Starting a new optimization project
# 1. Click "New Project" button
# 2. Select optimization type (Single/Multi-objective)
# 3. Upload your dataset
# 4. Configure parameters
# 5. Start optimization

Dashboard Components:

  • Project List: All your optimization projects

  • Quick Actions: Start new optimization, import data

  • Recent Results: Latest optimization outcomes

  • System Status: Memory usage, computation status

12.5.2. Data Management#

Data Upload Interface:

  • Drag-and-drop CSV file upload

  • Data preview and validation

  • Feature selection and target definition

  • Data preprocessing options

Supported Data Formats:

# Example dataset format
Feature1,Feature2,Feature3,Target
2.0,1.2,0.5,250
3.5,0.8,0.7,280
1.8,1.5,0.3,240

12.5.3. Optimization Configuration#

Single-Objective Setup:

  1. Select Target: Choose the property to optimize

  2. Choose Model: Gaussian Process, Random Forest, etc.

  3. Set Parameters: Acquisition function, number of iterations

  4. Define Constraints: Composition limits, processing ranges

  5. Configure Virtual Space: Candidate points for evaluation

Multi-Objective Setup:

  1. Select Multiple Targets: Choose 2-6 objectives

  2. Set Optimization Direction: Maximize/minimize each objective

  3. Choose MOBO Algorithm: EHVI, PI, or UCB

  4. Configure Pareto Analysis: Reference points, weights

12.5.4. Real-Time Monitoring#

Progress Tracking:

  • Optimization iteration counter

  • Current best values

  • Convergence plots

  • Time remaining estimates

Live Visualization:

  • Acquisition function landscape

  • Model predictions vs. actual values

  • Pareto front evolution (multi-objective)

  • Feature importance updates

12.5.5. Results Analysis#

Comprehensive Results View:

  • Summary Statistics: Best values, improvement metrics

  • Detailed Tables: All evaluated points with predictions

  • Interactive Plots: Zoom, pan, and explore results

  • Export Options: Save plots, data, and reports

12.6. Practical Examples#

12.6.1. Example 1: Alloy Composition Optimization#

Scenario: Optimize Al-Cu-Mg alloy for maximum strength

Steps in BgoFace:

  1. Create New Project

    • Project Name: β€œAl-Cu-Mg Strength Optimization”

    • Type: Single-Objective

    • Target: Maximize Strength

  2. Upload Training Data

    Cu,Mg,Si,Strength
    2.0,1.2,0.5,250
    3.5,0.8,0.7,280
    1.8,1.5,0.3,240
    4.2,0.9,0.8,290
    
  3. Configure Optimization

    • Features: Cu, Mg, Si (composition percentages)

    • Target: Strength (MPa)

    • Model: Gaussian Process

    • Acquisition: Expected Improvement

    • Constraints: Cu+Mg+Si < 7%

  4. Define Virtual Space

    • Cu range: 1.5-4.5%

    • Mg range: 0.7-1.6%

    • Si range: 0.2-1.0%

    • Generate 1000 candidate compositions

  5. Run Optimization

    • Monitor progress in real-time

    • View acquisition function landscape

    • Track convergence

  6. Analyze Results

    • Best composition: Cu=3.8%, Mg=1.0%, Si=0.6%

    • Predicted strength: 295 MPa

    • Export recommendation for experimental validation

12.6.2. Example 2: Multi-Objective Heat Treatment#

Scenario: Optimize heat treatment for hardness and toughness

Steps in BgoFace:

  1. Create Multi-Objective Project

    • Objectives: Maximize Hardness, Maximize Toughness

    • Algorithm: EHVI

  2. Upload Process Data

    Temperature,Time,Cooling_Rate,Hardness,Toughness
    450,2,10,180,45
    500,4,20,220,35
    550,6,15,250,25
    
  3. Configure Parameters

    • Features: Temperature (Β°C), Time (hours), Cooling Rate (Β°C/min)

    • Objectives: Hardness (HV), Toughness (J)

    • Constraints: 400Β°C ≀ Temperature ≀ 600Β°C

  4. Run Multi-Objective Optimization

    • Monitor Pareto front evolution

    • View trade-off analysis

    • Track hypervolume improvement

  5. Analyze Pareto Solutions

    • Explore trade-offs between hardness and toughness

    • Select preferred solution based on requirements

    • Export multiple recommendations

12.7. Advanced Features#

12.7.1. Constraint Handling#

Built-in Constraint Types:

  • Composition Constraints: Sum limits, ratio constraints

  • Processing Constraints: Temperature/pressure ranges

  • Custom Constraints: User-defined mathematical expressions

Constraint Definition Interface:

# Example constraint definitions in BgoFace
constraints = {
    "composition_sum": "Cu + Mg + Si <= 7.0",
    "temperature_range": "400 <= Temperature <= 600",
    "cu_mg_ratio": "1.5 <= Cu/Mg <= 4.0"
}

12.7.2. Batch Optimization#

Parallel Experiment Design:

  • Select multiple points for simultaneous evaluation

  • Batch acquisition functions (q-EI, q-UCB)

  • Resource allocation optimization

  • Experimental planning tools

12.7.3. Model Comparison#

Automated Model Selection:

  • Compare multiple surrogate models

  • Cross-validation performance metrics

  • Model uncertainty visualization

  • Automatic best model selection

12.7.4. Export and Reporting#

Comprehensive Export Options:

  • PDF Reports: Complete optimization summary

  • Excel Workbooks: Data tables and charts

  • Python Scripts: Reproduce analysis programmatically

  • Presentation Slides: Ready-to-use figures

12.8. Integration with Bgolearn#

BgoFace seamlessly integrates with the Bgolearn ecosystem:

12.8.1. Code Generation#

Automatic Script Generation:

  • BgoFace generates equivalent Python code

  • Users can reproduce results programmatically

  • Easy transition from GUI to scripting

# Example generated code from BgoFace
from Bgolearn import BGOsampling

# Initialize optimizer
opt = BGOsampling.Bgolearn()

# Configuration from BgoFace
model = opt.fit(
    data_matrix=data_matrix,
    Measured_response=measured_response,
    virtual_samples=virtual_samples,
    Mission='Regression',
    Classifier='GaussianProcess',
    opt_num=1,
    min_search=False,
    CV_test=10,  # 10-fold cross-validation
    Normalize=True
)

12.8.2. Data Synchronization#

Seamless Data Flow:

  • Import data from Bgolearn projects

  • Export results to Bgolearn format

  • Maintain data consistency

  • Version control integration

12.9. Best Practices#

12.9.1. Project Organization#

  1. Use Descriptive Names: Clear project and file names

  2. Document Parameters: Add notes for future reference

  3. Save Intermediate Results: Regular checkpoints

  4. Organize by Material System: Group related projects

12.9.2. Data Quality#

  1. Validate Input Data: Check for outliers and errors

  2. Sufficient Training Data: >10 samples per feature

  3. Representative Sampling: Cover the design space well

  4. Quality Control: Remove experimental errors

12.9.3. Optimization Strategy#

  1. Start Simple: Begin with single-objective problems

  2. Validate Models: Use cross-validation

  3. Check Convergence: Monitor optimization progress

  4. Experimental Validation: Always test recommendations

12.10. Troubleshooting#

12.10.1. Common Issues#

Application Won’t Start:

  • Check system requirements

  • Run as administrator (Windows)

  • Verify antivirus settings

  • Download latest version

Data Import Problems:

  • Check CSV format and encoding

  • Verify column headers

  • Remove special characters

  • Ensure numeric data types

Optimization Failures:

  • Reduce virtual space size

  • Check constraint definitions

  • Verify data quality

  • Try different surrogate models

Performance Issues:

  • Close other applications

  • Reduce dataset size

  • Use simpler models

  • Increase available memory

12.10.2. Getting Help#

Support Resources:

Community:

  • Discussion Forum: Share experiences and tips

  • Example Projects: Download sample datasets

  • Best Practices: Learn from other users

12.11. Future Development#

12.11.1. Planned Features#

Version 2.0 Roadmap:

  • Cloud Integration: Remote computation support

  • Collaborative Features: Multi-user projects

  • Advanced Visualization: 3D interactive plots

  • Machine Learning: Automated hyperparameter tuning

  • Integration: Connect with experimental equipment

Community Contributions:

  • Plugin system for custom algorithms

  • Template library for common materials

  • Shared project repository

  • Educational resources

12.12. Citation and License#

12.12.1. Academic Use#

If you use BgoFace in your research, please cite:

@article{bgoface2025,
  title={BgoFace: A User Interface for Bayesian Global Optimization in Materials Discovery},
  author={Cao, Bin and Li, Tianliang and Liu, Siyuan and Zhang, Tong-Yi and Feng, Lingyan},
  journal={MGE Advances},
  year={2025},
  publisher={Wiley}
}

12.12.2. License#

Academic and Research Use Only

  • βœ… Academic research and education

  • βœ… Non-commercial scientific studies

  • βœ… Open-source contributions

  • ❌ Commercial applications

  • ❌ Proprietary software integration

  • ❌ Revenue-generating activities

Copyright: Β© 2024 Bgolearn Development Team. All rights reserved.

12.13. Acknowledgments#

Development Team:

  • Lead Developer: Bin Cao (Hong Kong University of Science and Technology, Guangzhou)

  • UI Development: Tianliang Li, Siyuan Liu

  • Scientific Guidance: Prof. Tong-Yi Zhang, Prof. Lingyan Feng

Special Thanks:

  • Bgolearn community for feedback and testing

  • Materials science researchers for real-world use cases

  • Open-source community for tools and libraries

12.14. Next Steps#

Ready to start using BgoFace? Here’s what to do next:

  1. Download BgoFace: Get the latest version from GitHub Releases

  2. Watch Tutorial: Follow the video guide

  3. Try Examples: Start with the included sample projects

  4. Join Community: Connect with other users and developers

  5. Explore Advanced Features: Learn about multi-objective optimization and constraints

See also

Related Documentation: