-
Notifications
You must be signed in to change notification settings - Fork 34
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CompositionOnly featurizer preset does not use oxidation states #46
Comments
Hi! Was this implemented or is it still pending? |
Hi! Thanks for pulling this up. This hasn't been implemented but can easily be added manually. from modnet.featurizers.presets import DeBreuck2020Featurizer
from modnet.preprocessing import MODData
from pymatgen.core import Composition
materials = [Composition("SiO2"),Composition("Li20")]
class CompositionOxidFeaturizer(DeBreuck2020Featurizer):
def __init__(self):
super().__init__()
self.structure_featurizers = ()
self.site_featurizers = ()
data = MODData(materials=materials, featurizer=CompositionOxidFeaturizer())
data.featurize()
print(data.df_featurized) This will add 9 extra features compared to the current default one. |
I will just add one extra bit to @ppdebreuck's suggestion, which is to add the
will use more sensible defaults for oxidation state calculations that you can then test: modnet/modnet/featurizers/featurizers.py Lines 161 to 170 in 06ca45f
(also see the relevant code in matminer/pymatgen) |
Thank you for your inputs! |
Yep, the base featurizer just knows to take each listed matminer featurizer in turn and apply it to the relevant sites, structure or composition.
Yeah, this is just convenience/laziness. You could instead inherit from the base featurizer and list out all of the matminer featurizer classes you wanted to use, but as we have them all already in the DeBreuck2020 preset it is easier base on that and disable the ones we don't want. |
At some point the Possible workarounds:
|
As above. We should probably add the oxidation state featurizers used in the
DeBreuck2020Featurizer
to theCompositionOnly
featurizer too.The text was updated successfully, but these errors were encountered: