Skip to content
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

Added missing impute_nan for WenAlloys and removed unnecessary warning #937

Merged
merged 1 commit into from
Apr 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion matminer/featurizers/composition/alloy.py
Original file line number Diff line number Diff line change
Expand Up @@ -719,7 +719,7 @@ def featurize(self, comp):
atomic_fraction = self.compute_atomic_fraction(elements, comp)
yang_delta = self.yss.compute_delta(comp)
yang_omega = self.yss.compute_omega(comp)
ape = AtomicPackingEfficiency().compute_simultaneous_packing_efficiency(comp)[0]
ape = AtomicPackingEfficiency(impute_nan=self.impute_nan).compute_simultaneous_packing_efficiency(comp)[0]
radii_local_mismatch = self.compute_local_mismatch(miracle_radius_stats["array"], fractions)
radii_gamma = self.compute_gamma_radii(miracle_radius_stats)
S_config = self.compute_configuration_entropy(fractions)
Expand Down
2 changes: 0 additions & 2 deletions matminer/featurizers/composition/composite.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,6 @@ class ElementProperty(BaseFeaturizer):

def __init__(self, data_source, features, stats, impute_nan=False):
self.impute_nan = impute_nan
if not self.impute_nan:
warnings.warn(f"{self.__class__.__name__}(impute_nan=False):\n" + IMPUTE_NAN_WARNING)
if data_source == "pymatgen":
self.data_source = PymatgenData(impute_nan=self.impute_nan)
elif data_source == "magpie":
Expand Down
2 changes: 1 addition & 1 deletion matminer/featurizers/composition/packing.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ def __init__(self, threshold=0.01, n_nearest=(1, 3, 5), max_types=6, impute_nan=
self.impute_nan = impute_nan
if not self.impute_nan:
warnings.warn(f"{self.__class__.__name__}(impute_nan=False):\n" + IMPUTE_NAN_WARNING)
self._data_source = MagpieData(impute_nan=impute_nan)
self._data_source = MagpieData(impute_nan=self.impute_nan)

# Lookup table of ideal radius ratios
self.ideal_ratio = dict(
Expand Down