Skip to content

Repository files navigation

KaleMaterials

Standardizing Multimodal AI for Materials Prediction

tests codecov Python License

KaleMaterials is a machine learning library for predicting materials properties, following PyKale's pipeline design.

It currently supports composition-based prediction, in-distribution and out-of-distribution evaluation, and uncertainty estimation. The included example predicts saturation magnetization for soft magnetic materials.

Support for structure, images, text, tabular characterization data and multimodal learning is planned.

Installation

From the repository root, choose one command. Use the second to run the examples or develop the library.

pip install -e .          # library
pip install -e ".[dev]"   # plus examples and development tools

Quick start

The example requires local raw data. Place the Novamag JSON files under examples/saturation_magnetism_prediction/data/novamag/Novamag_Data_Files/, then build the dataset and evaluate the models:

cd examples/saturation_magnetism_prediction
python build_dataset.py --dataset novamag
python main.py dataset=novamag mode=cross_validation

build_dataset.py writes the feature table and saves its target-distribution figures; pass --no-plots to skip them.

Choose a dataset and evaluation mode:

  • dataset: novamag or materials_project
  • mode: cross_validation, random_split, ood, uncertainty or predict

Override other settings in the same command, for example tuning.enabled=false.

Package structure

Packages under kalematerials/, following PyKale's six-step pipeline:

  • loaddata: datasets, element reference tables, train/test splits
  • prepdata: formula parsing, stoichiometry, atomic fractions
  • embed: composition descriptors
  • predict: regression models, prediction intervals
  • evaluate: metrics, significance tests, calibration
  • interpret: model explanations, dataset distributions, case-study plots

The pipeline package combines these stages into feature-building and evaluation workflows.

License

KaleMaterials is released under the MIT License. See LICENSE for details.

About

Standardizing Multimodal AI for Materials Prediction

Resources

Stars

2 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages