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

Update tutorials #35

Merged
merged 15 commits into from
Mar 10, 2021
Merged

Update tutorials #35

merged 15 commits into from
Mar 10, 2021

Conversation

ppdebreuck
Copy link
Owner

@ppdebreuck ppdebreuck commented Feb 24, 2021

Example notebooks updates to v0.1.9
Plus a few accompanying inner updates (each has its corresponding commit).

  • Introduce the materials argument, but conserving structures argument for backward compatibility
  • It seams the alias fix of GaussianSymmetry in DeBreuck2020 preset is erroneous. To maintain compatibility with the database (MP_2018.6), I removed the alias. E.g. ChemEnvSiteFingerprint|GaussianSymmFuncmean G2_0.05 should be GaussianSymmFunc|mean G2_0.05 (as used in MP_2018.6 on figshare)
  • Update existing example notebooks to v0.1.9
  • Fixed composition only featurization
  • Added composition only test
  • Added composition only example notebook
  • Set nans in cross_nmi to zero

modnet/featurizers/featurizers.py Outdated Show resolved Hide resolved
@@ -155,6 +156,7 @@ def get_cross_nmi(df_feat: pd.DataFrame, **kwargs) -> pd.DataFrame:
)[0] / (0.5 * (diag[x_feat] + diag[y_feat]))
mutual_info.loc[y_feat, x_feat] = mutual_info.loc[x_feat, y_feat] = I_xy

mutual_info.fillna(0, inplace=True) # if na => no relation => set to zero
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just commenting on this as something we should discuss in a moment

modnet/preprocessing.py Outdated Show resolved Hide resolved
modnet/preprocessing.py Outdated Show resolved Hide resolved
@@ -157,7 +158,7 @@ def get_cross_nmi(df_feat: pd.DataFrame, **kwargs) -> pd.DataFrame:
mutual_info.loc[y_feat, x_feat] = mutual_info.loc[x_feat, y_feat] = I_xy

mutual_info.fillna(0, inplace=True) # if na => no relation => set to zero
return mutual_info
return mutual_info, diag # diag can be useful for future elimination based on entropy without the need of recomputing the cross NMI
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could we just set the diagonal values in the dataframe instead of setting them to 1, so we don't need to return this? This change breaks the existing API otherwise

@ppdebreuck ppdebreuck merged commit a30cfce into master Mar 10, 2021
@ml-evs ml-evs deleted the update_tutorials branch August 9, 2021 10:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants