Skip to main content

mineralML

PyPI Build Status Documentation Status codecov Open in Streamlit Open In Colab Python 3.8 License: GPL v3 DOI

We present mineralML (mineral classification using Machine Learning) for probabilistic classification of common igneous minerals. mineralML provides functions for calculating stoichiometries and crystallographic sites based on this classification, along with functions for handling mapped EDS data. Utilizing this package allows for the identification of misclassified mineral phases and poor-quality data. We streamline data processing and cleaning to allow for the rapid transition to usable data, improving the utility of data curated in these databases and furthering computing and modeling capabilities.

Documentation

Read the documentation for a run-through of the mineralML code.

Citation

If you use mineralML in your work, please cite this preprint. This package represents a significant time investment. Proper citation helps support continued development and academic recognition.

Shi, S., Wieser, P., Gordon, C., Toth, N., Antoshechkina, P.M., Gleeson, M., Lehnert, K., (2026) mineralML: Leveraging Machine Learning for Probabilistic Mineral Classification in Geochemical Databases", Earth ArXiv. doi:10.31223/X53J2M
@article{Shietal2026,
  doi       = {10.31223/X53J2M},
  url       = {https://doi.org/10.31223/X53J2M},
  year      = {2026},
  author    = {Shi, Sarah C and Wieser, Penny E and Gordon, Charlotte and Toth, Norbert and Antoshechkina, Paula M and Gleeson, Matthew LM and Lehnert, Kerstin},
  title     = {mineralML: Leveraging Machine Learning for Probabilistic Mineral Classification},
  journal   = {Earth ArXiv},
}

Run on the Cloud

Web app (no Python needed)

Open the mineralML web app at mineralml.streamlit.app. Upload a CSV or Excel file of oxide wt% (or type analyses in manually), get mineral classifications with prediction scores, and download an Excel workbook with one sheet per mineral plus stoichiometry sheets. The app sleeps after 12 hours without visitors; if you see a wake-up button, click it and wait ~30 seconds.

To run the app locally, see webapp/README.md.

Google Colab

If you do not have Python installed locally, run mineralML on Google Colab. The Cloud-based version runs rapidly, with test cases of >10,000 microanalyses classified within 4 seconds.

Run and Install Locally

Obtain a version of Python between 3.9 and 3.14 if you do not already have it installed. mineralML can be installed with one line. Open terminal and type the following:

pip install mineralML

Make sure that you keep up with the latest version of mineralML. To upgrade to the latest version of mineralML, open terminal and type the following:

pip install mineralML --upgrade

Metadata

Release files for mineralML 0.0.3.22

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for mineralML 0.0.3.22
File Size Uploaded
mineralml-0.0.3.22.tar.gz 2.1 MB Details

Built distribution (wheel)

Table of built distributions (wheels) for mineralML 0.0.3.22
File Interpreter ABI Platform
mineralml-0.0.3.22-py3-none-any.whl Python 3 none any Details

Total release size: 4.3 MB

Release files / mineralml-0.0.3.22.tar.gz

Download URL mineralml-0.0.3.22.tar.gz
Size 2.1 MB
Tags Source
SHA-256 checksum
How to use checksums
0bb02d39b189e97a356b814af171279c69d71b7990f0b8df7f73b62612e44fdf
BLAKE2b-256 checksum
How to use checksums
85972d0d1d39d695887251a44133a1c58001a79fec299474021332912d3487d4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.14

Release files / mineralml-0.0.3.22-py3-none-any.whl

Download URL mineralml-0.0.3.22-py3-none-any.whl
Size 2.2 MB
Tags Python 3
SHA-256 checksum
How to use checksums
11316a4bfc079b679893fc71a103617361e0c80bd091bc9d4945f8e8c27526cb
BLAKE2b-256 checksum
How to use checksums
c36dff48427c3852f15d162453b90dcc4a471f9743d5b6c6aeca152cd6cece97
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.14

Release history Release notifications | RSS feed

This release

0.0.3.22 This release

2 release files

0.0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page