Many materials-informatics problems live in an awkward regime for machine learning.

The datasets are often small. Measurements can be expensive, noisy, and collected under different conditions. Simulation data may be abundant for one fidelity but scarce at the experimental fidelity that ultimately matters. A model is rarely useful only because it gives a point prediction. It also needs to say how uncertain it is, how it was validated, and whether its behavior makes sense physically.

That is the space where Gaussian Process Regression still feels very useful.

GPR is not the newest model family, and it is not always the most scalable. But for many materials problems, especially when data are limited and each new experiment matters, its strengths are exactly the right ones: calibrated uncertainty, flexible kernels, principled Bayesian optimization, and a natural way to combine data-driven learning with prior physical knowledge.

I built matgpr to make those workflows easier to assemble, inspect, and reuse.

Why another GPR package?

There are already excellent general-purpose tools for Gaussian Processes. scikit-learn, GPyTorch, and BoTorch cover important parts of the modeling stack. But when working on materials datasets, the actual workflow usually needs more than a GP model object.

You often need to:

  1. Clean irregular tabular data.
  2. Generate composition, molecular, polymer, or structure descriptors.
  3. Split the data in a reproducible way.
  4. Fit baseline GPR models and more flexible GPyTorch models.
  5. Track predictive uncertainty, not only prediction error.
  6. Add physics-informed mean functions, constraints, or target transforms.
  7. Compare models with learning curves and validation summaries.
  8. Rank finite candidate pools for the next experiment.
  9. Report enough details that another person can reproduce the result.

matgpr is meant to sit in that practical layer. It is not only a wrapper around a model. It is a set of pieces for building auditable materials-informatics workflows from raw-ish data to model evaluation, uncertainty analysis, and candidate recommendation.

The core idea

The core idea behind matgpr is simple: make physics-informed, uncertainty-aware modeling feel like a normal workflow rather than a custom script every time.

In a typical project, you might start with a dataframe of compositions, molecular structures, polymer repeat units, processing conditions, or simulation descriptors. matgpr provides utilities for cleaning the data, creating features, defining train-test splits, building GPR models, evaluating uncertainty, and visualizing the results.

For more domain-aware modeling, the package also supports physics-informed mean functions. This means you can start from a mechanistic equation, let the GP learn residual structure around it, and then inspect both the learned data-driven correction and the physical baseline. For materials problems where known trends matter, this is often more satisfying than asking a black-box model to rediscover everything from scratch.

The package also includes pieces for target transforms, physics constraints, observation-noise models, derivative-informed trends, multitask GPR, multi-fidelity workflows, finite-pool Bayesian optimization, and candidate-pool diagnostics. These are not separate philosophical ideas. They are all parts of the same problem: making model predictions useful enough to guide the next materials decision.

What kinds of problems is it for?

I see matgpr as most useful for materials problems where data are valuable and decisions are sequential.

Examples include:

  • predicting polymer or molecular properties from descriptors
  • combining simulation and experimental data
  • modeling transport, mechanical, thermal, electronic, or solubility-related properties
  • building physics-informed residual models
  • comparing single-property and multi-property GPR models
  • selecting the next candidate from a finite design pool
  • auditing why a Bayesian optimization workflow recommended a specific candidate

The package is especially relevant when the question is not only "what is the best prediction?" but also "how confident is the model, what physics did we include, what data supported the claim, and what experiment should we run next?"

Why uncertainty matters

In materials design, uncertainty is not decoration. It changes the decision.

If a model predicts two candidates with similar property values, but one prediction is much less certain, that should influence how we prioritize experiments. If the model is systematically overconfident in a region of chemical space, that should show up in calibration diagnostics. If candidate recommendations are driven by high uncertainty rather than high predicted performance, that should be visible in the audit trail.

This is one reason I wanted matgpr to include uncertainty diagnostics, learning curves, validation helpers, and Bayesian optimization summaries as first-class pieces of the workflow. A model that cannot explain its uncertainty is much harder to trust in an experimental loop.

Why physics-informed GPR matters

Materials science is not starting from zero. We often know useful physical trends before looking at the dataset.

Diffusion can follow Arrhenius-like behavior. Strength can follow Hall-Petch-like trends. Transport can depend on free-volume relationships. Mixture properties can be shaped by simple rule-of-mixtures baselines. These equations may not be complete, but they are not useless either.

Physics-informed GPR gives a practical compromise: use the physical equation as a mean function, then let the GP learn what the equation misses. This keeps the model connected to domain knowledge while still allowing data-driven flexibility.

That is the kind of modeling habit I want matgpr to encourage. Not physics versus machine learning, but physics as a useful starting point for machine learning.

What I plan to write next

This post is only the introduction. The real value of matgpr will be clearer through examples, so I plan to write a series of practical notes showing how to use it for different applications.

Some posts I want to write next:

  1. A quickstart from standard GPR to physics-informed GPR.
  2. How to choose fingerprints for molecular, polymer, and composition datasets.
  3. How to evaluate uncertainty calibration and learning curves.
  4. How to model multiple correlated material properties with multitask GPR.
  5. How to combine simulation and experiment with multi-fidelity GPR.
  6. How to use Bayesian optimization to select the next candidate from a finite pool.
  7. How to write dataset cards and model cards for reproducible materials examples.

The goal is not just to advertise a package. The goal is to make a modeling workflow easier to learn, easier to inspect, and easier to adapt to real materials problems.

matgpr is still an active-development 0.x package, so users should pin versions or commit hashes for reproducible work. But I think it is already useful as a practical toolkit for people who want materials-informatics models that are uncertainty-aware, physics-aware, and built for the messy middle between datasets and decisions.

Explore the package: matgpr on GitHub and matgpr documentation.