Standardizing Multimodal AI for Materials Prediction
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.
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 toolsThe 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_validationbuild_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:novamagormaterials_projectmode:cross_validation,random_split,ood,uncertaintyorpredict
Override other settings in the same command, for example tuning.enabled=false.
Packages under kalematerials/, following PyKale's six-step pipeline:
loaddata: datasets, element reference tables, train/test splitsprepdata: formula parsing, stoichiometry, atomic fractionsembed: composition descriptorspredict: regression models, prediction intervalsevaluate: metrics, significance tests, calibrationinterpret: model explanations, dataset distributions, case-study plots
The pipeline package combines these stages into feature-building and evaluation workflows.
KaleMaterials is released under the MIT License. See LICENSE for details.