Skip to content

Repository files navigation

This repository contains the code associated with the manuscript:

"Nonlinearity of the post-spinel transition and its expression in slabs and plumes worldwide"

If you use the code and/or database here, please cite this article: Dong, J. et al. Nonlinearity of the post-spinel transition and its expression in slabs and plumes worldwide. Nat Commun 16, 1039 (2025). https://doi.org/10.1038/s41467-025-56231-z

Manuscript Authors

  • Junjie Dong
  • Rebecca A. Fischer
  • Lars P. Stixrude
  • Matthew C. Brennan
  • Kierstin Daviau
  • Terry-Ann Suer
  • Katlyn M. Turner
  • Yue Meng
  • Vitali B. Prakapenka

Code Author

  • Junjie Dong

Summary

This repository consists of two main parts:

  1. Model Selection with Supervised Learning
  2. Phase Diagram Construction

The code analyzes phase equilibria observations and computes a globally optimized phase diagram through multi-class logit regression and supervised learning. The code can be used generally, but the construction of phase relations in Mg2SiO4 at mantle transition zone conditions is used as a benchmark case to ensure reproducibility and ease of use, and the data on phase equilibria observations of Mg2SiO4 are provided.

Usage

Follow the instructions below or in the Python scripts to reproduce the analyses discussed in the manuscript.

Prerequisites

The primary packages used in this code are:

  • matplotlib=3.5.0
  • numpy=1.19.5
  • pandas=1.3.5
  • python=3.9.20
  • scikit-learn=0.23.2
  • scipy=1.10.0

For full package compatibility, you can use the provided conda environment file or requirements file.

Getting Started

  1. Set up the conda environment:

    conda env create -f environment.yml
    conda activate mlpd
    
  2. Alternatively, you can install dependencies using pip:

    pip install -r requirements.txt
    
  3. To tune the hyperparameters for the model, run 'logit-reg-model-selection.py':

    python logit-reg-model-selection.py
    
  4. You can find the optimized degree and other hyperparameters in the 'log.txt' file. After updating the optimized degree and other hyperparameters, run 'logit-reg-fit.py':

    python logit-reg-fit.py

About

Code for globally optimized phase diagram construction through multi-class logit regression and supervised learning, with a benchmark case for the Mg₂SiO₄ phase equilibria. If you use the code and/or database here, please cite this article: Dong, J. et al. Nonlinearity of the post-spinel transition and its expression in slabs and plumes worldwide.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages