https://github.com/bioatmosphere/generative-ecosystem-model
GEM: Generative Ecosystem Model
Science Score: 13.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
○CITATION.cff file
-
✓codemeta.json file
Found codemeta.json file -
○.zenodo.json file
-
○DOI references
-
○Academic publication links
-
○Academic email domains
-
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (12.0%) to scientific vocabulary
Repository
GEM: Generative Ecosystem Model
Statistics
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
- Releases: 0
Metadata Files
README.md
GEM: Generative Ecosystem Model
A research project that combines deep generative modeling and physics-based approaches to understand plant trait relationships and ecosystem dynamics. GEM uses Variational Autoencoders (VAE) to analyze plant functional traits from the TRY database, enabling trait-based ecological modeling and synthetic data generation.
🌱 Overview
GEM (Generative Ecosystem Model) focuses on plant trait analysis using machine learning techniques. The project integrates:
- Plant functional trait data from the global TRY database
- Variational Autoencoders (VAE) for learning trait relationships
- Scaling theory based on metabolic scaling principles
- Interactive tools for trait exploration and generation
🚀 Quick Start
Prerequisites
- Python 3.10+
- uv (recommended) or pip
Installation
Using uv (recommended):
bash
git clone <repository-url>
cd GEM
uv sync
Using pip:
bash
git clone <repository-url>
cd GEM
pip install -r requirements.txt
Basic Usage
```bash
Download trait data from TRY database
uv run python main.py download
Train VAE model on trait data
uv run python main.py train
Apply trained VAE model for analysis
uv run python main.py apply
Interactive exploration interface
uv run python main.py interactive ```
📊 Data Pipeline
TRY Database Integration
The project downloads plant trait data from the TRY database, including:
- Leaf traits: Leaf area, specific leaf area, leaf nitrogen content
- Whole-plant traits: Plant height, wood density, seed mass
- Physiological traits: Photosynthetic capacity, stomatal conductance
Data Processing
- Missing value handling: Removes columns with >50% missing values
- Data cleaning: Filters rows with <70% complete data
- Standardization: StandardScaler normalization
- Train/validation/test split: 64%/16%/20%
🧠 VAE Model Architecture
Model Components
- Encoder: [256, 128, 64] → Latent space (default: 10D)
- Decoder: [64, 128, 256] → Reconstructed traits
- Features: Batch normalization, dropout, beta-VAE support
Training Configuration
- Batch size: 64
- Epochs: 100
- Learning rate: 1e-3
- Optimizer: Adam
- Loss: Reconstruction + KL divergence
🔬 Applications
1. Synthetic Data Generation
Generate realistic plant trait combinations for data augmentation:
```python
Generate new trait combinations
synthetictraits = model.generatesamples(n_samples=1000) ```
2. Latent Space Analysis
Explore trait relationships in reduced dimensions:
```python
Encode existing traits to latent space
latentvectors = model.encode(traitdata) ```
3. Trait Interpolation
Create smooth transitions between species:
```python
Interpolate between two species
interpolated = model.interpolate(speciesa, speciesb, steps=10) ```
4. Interactive Exploration
Real-time trait generation and modification through the interactive interface.
📁 Project Structure
GEM/
├── src/ # Core source code
│ ├── trait_data.py # Data processing and TRY integration
│ ├── vae_model.py # VAE implementation and training
│ ├── apply_vae.py # Model application and analysis
│ ├── interactive_vae.py # Interactive exploration interface
│ └── fetch_trydb.py # Alternative data fetching
├── data/ # Data, models, and results
│ ├── models/ # Trained models and metadata
│ ├── results/ # Visualizations and analysis outputs
│ └── *.csv # Downloaded trait data
├── notebooks/ # Jupyter notebooks
│ └── Trait-based scaling theory.ipynb
├── main.py # Main CLI interface
└── requirements.txt # Dependencies
🛠️ Development
Running Individual Modules
```bash
Direct module execution
uv run python src/traitdata.py # Data processing uv run python src/vaemodel.py # Model training uv run python src/applyvae.py # Model application uv run python src/interactivevae.py # Interactive interface ```
Jupyter Notebook
```bash
Explore scaling theory
jupyter notebook notebooks/Trait-based\ scaling\ theory.ipynb ```
📈 Model Outputs
Generated Files
- Models:
data/models/vae_trait_model.pth - Metadata:
data/models/model_metadata.json - Visualizations:
data/results/training_history.png - Analysis:
data/results/vae_analysis_report.json
Visualization Examples
- Training loss curves
- Latent space projections
- Trait generation comparisons
- Species clustering analysis
🔬 Scientific Background
Metabolic Scaling Theory
The project implements trait-based scaling relationships based on: - Allometric scaling laws - Metabolic rate constraints - Resource allocation principles
Ecological Applications
- Community assembly: Understanding trait filtering
- Ecosystem function: Linking traits to processes
- Climate change: Predicting trait responses
- Conservation: Identifying functional diversity
🤝 Contributing
- Fork the repository
- Create a feature branch
- Make your changes
- Add tests if applicable
- Submit a pull request
📄 License
[Add your license here]
🔗 References
- TRY Database: https://www.try-db.org
- Metabolic Scaling Theory literature in
literature_trait/ - Generative AI applications in
literature_GenAI/
📧 Contact
[Add contact information]
Owner
- Name: Bin Wang
- Login: bioatmosphere
- Kind: user
- Location: Oak Ridge
- Website: https://bwangecology.wordpress.com/
- Twitter: bioatmo_sphere
- Repositories: 4
- Profile: https://github.com/bioatmosphere
Studying biosphere-atmosphere interactions with interwoven theory- and data-driven approaches
GitHub Events
Total
- Push event: 1
Last Year
- Push event: 1