- Authors : Dishant Beniwal 1, Pratik K. Ray 1
- Journal : Physical Review Materials
- DOI : https://doi.org/10.1103/PhysRevMaterials.7.043802
CoSMoR extracts EXACT contribution of each feature towards the overall decision-making process along continuous composition pathways. It thus provides material-specific insights as to how exactly does the ML model makes its predictions.
- Where can you apply CoSMoR?
- It is applicable to all compositional machine learning models wherein the input features are a direct function of material composition and elemental properties.
- What is a continuous composition pathway: Ax-B1-x?
- Suppose you have a baseline composition B. Now if you add another component A to this base material, then Ax-B1-x represents a composition-pathway characterized by parameter x that represents atomic fraction of component A. It is to be noted that A and B can be either pure elements (such as 'Al', 'Co' or 'Zr') or they can be stoichiometric combination of elements (such as 'Al2Ni', 'CoCrNi' or 'AlCoCrFe2Ni1.5').
- What information does CoSMoR provide?
- Once a composition pathway 'Ax-B1-x' is defined, CoSMoR will provide the exact contribution of each feature towards the change in model output (prediction) with respect to baseline composition. For example, suppose you have an ML model that predicts alloy hardness and we define Crx-(FeNiZr)1-x as the composition pathway. Then CoSMoR will provide the exact contribution of each feature towards the change in alloy hardness as Cr is added to FeNiZr base alloy, i.e. as the value of x increases.
The CoSMoR code uses three scripts as provided in this repository. These are:
- core_functions.py : Contains all the core functions required for implementation of CoSMOR. Here, two functions (namely 'create_features' and 'make_predictions') are user-defined and have to be created by the user based on the ML model at hand. 'create_features' takes alloy compositions generated by 'create_alloys' as an input and returns a pandas dataframe containing features. 'make_predictions' takes these features generated by 'create_features' as input and returns a prediction array. All the other functions in this script are default and do not require any changes in normal use-case scenarios.
- cosmor_class.py : contains the CoSMoR class.
- run-cosmor.py : run this script in console to initiate the creation of CoSMoR class based on user parameters and to run the CoSMoR framework.
- EXAMPLES: The directory examples provides examples of how CoSMoR can be used for compositional ML models.
- VIDEO TUTORIALS: Video guides will be linked here soon to guide adoption of CoSMoR for new ML models.