cannot apply featurize_dataframe with VoronoiFingerprint, AverageBondLength or AverageBondAngle

Hi,

I am trying to use the VoronoiFingerprint (or AverageBondLength, or AverageBondAngle) to featurize my structures. The featurize() function works well if given a “structure” and a proper “idx”.

It seems there is no way to pass the “idx” parameter to the featurize_dataframe() function and the featurization process always raises an error similar to the following:

AverageBondLength: 100%|████████████████████████████████████████████████████████| 2322/2322 [00:00<00:00, 9241.78it/s]

···

RemoteTraceback Traceback (most recent call last)
RemoteTraceback:
“”"
Traceback (most recent call last):
File “~/miniconda3/envs/py3/lib/python3.6/site-packages/matminer/featurizers/base.py”, line 396, in featurize_wrapper
return self.featurize(*x)
TypeError: featurize() missing 1 required positional argument: ‘idx’

``

Except this question, I wonder whether there is a suggested way to featurize a general structure without the need to specify an “idx”, since the number of “sites” are different in different structures.

Other information: I am using matminer 0.4.6 and most of other featurizers work well.

Sincerely,

Libin

Hello Libin,

Thanks for the question!

As you’ve noticed, the featurizers you mentioned (VoronoiFingerprint, etc) are designed to retrieve properties of a certain atomic site. If you want to describe a complete structure, you should use the “SiteStatsFingerprint” (see docs here), which will compute the features of each site in a structure and then create a composite feature for the structure by computing statistics of those site properties.

We have an example that uses this kind of functionality in our examples repository: https://github.com/hackingmaterials/matminer_examples/blob/master/notebooks/machine-learning/voronoi-ward-prb-2017.ipynb

Does this solve your problem?

Best,

Logan

···

From: Libin Wen
Sent: Monday, December 17, 2018 2:23 AM
To: matminer
Subject: cannot apply featurize_dataframe with VoronoiFingerprint,AverageBondLength or AverageBondAngle

Hi,

I am trying to use the VoronoiFingerprint (or AverageBondLength, or AverageBondAngle) to featurize my structures. The featurize() function works well if given a “structure” and a proper “idx”.

It seems there is no way to pass the “idx” parameter to the featurize_dataframe() function and the featurization process always raises an error similar to the following:

AverageBondLength: 100%|████████████████████████████████████████████████████████| 2322/2322 [00:00<00:00, 9241.78it/s]

RemoteTraceback Traceback (most recent call last)
RemoteTraceback:
“”"
Traceback (most recent call last):
File “~/miniconda3/envs/py3/lib/python3.6/site-packages/matminer/featurizers/base.py”, line 396, in featurize_wrapper
return self.featurize(*x)
TypeError: featurize() missing 1 required positional argument: ‘idx’

Except this question, I wonder whether there is a suggested way to featurize a general structure without the need to specify an “idx”, since the number of “sites” are different in different structures.

Other information: I am using matminer 0.4.6 and most of other featurizers work well.

Sincerely,

Libin


You received this message because you are subscribed to the Google Groups “matminer” group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
For more options, visit https://groups.google.com/d/optout.

Thank you Logan, your answer clearly solved my problem.

Sincerely,

Libin Wen

···

On Monday, December 17, 2018 at 11:08:04 PM UTC+8, Logan Ward wrote:

Hello Libin,

Thanks for the question!

As you’ve noticed, the featurizers you mentioned (VoronoiFingerprint, etc) are designed to retrieve properties of a certain atomic site. If you want to describe a complete structure, you should use the “SiteStatsFingerprint” (see docs here), which will compute the features of each site in a structure and then create a composite feature for the structure by computing statistics of those site properties.

We have an example that uses this kind of functionality in our examples repository: https://github.com/hackingmaterials/matminer_examples/blob/master/notebooks/machine-learning/voronoi-ward-prb-2017.ipynb

Does this solve your problem?

Best,

Logan

From: Libin Wen
Sent: Monday, December 17, 2018 2:23 AM
To: matminer
Subject: cannot apply featurize_dataframe with VoronoiFingerprint,AverageBondLength or AverageBondAngle

Hi,

I am trying to use the VoronoiFingerprint (or AverageBondLength, or AverageBondAngle) to featurize my structures. The featurize() function works well if given a “structure” and a proper “idx”.

It seems there is no way to pass the “idx” parameter to the featurize_dataframe() function and the featurization process always raises an error similar to the following:

AverageBondLength: 100%|████████████████████████████████████████████████████████| 2322/2322 [00:00<00:00, 9241.78it/s]

RemoteTraceback Traceback (most recent call last)
RemoteTraceback:
“”"
Traceback (most recent call last):
File “~/miniconda3/envs/py3/lib/python3.6/site-packages/matminer/featurizers/base.py”, line 396, in featurize_wrapper
return self.featurize(*x)
TypeError: featurize() missing 1 required positional argument: ‘idx’

Except this question, I wonder whether there is a suggested way to featurize a general structure without the need to specify an “idx”, since the number of “sites” are different in different structures.

Other information: I am using matminer 0.4.6 and most of other featurizers work well.

Sincerely,

Libin


You received this message because you are subscribed to the Google Groups “matminer” group.
To unsubscribe from this group and stop receiving emails from it, send an email to matminer+u.[email protected].
For more options, visit https://groups.google.com/d/optout.

Hi Logan,
Is there still an example on github using SiteStatsFingerprint? The link you gave is no longer valid.

Thank you

Nahom

···

On Monday, December 17, 2018 at 5:08:04 PM UTC+2, Logan Ward wrote:

Hello Libin,

Thanks for the question!

As you’ve noticed, the featurizers you mentioned (VoronoiFingerprint, etc) are designed to retrieve properties of a certain atomic site. If you want to describe a complete structure, you should use the “SiteStatsFingerprint” (see docs here), which will compute the features of each site in a structure and then create a composite feature for the structure by computing statistics of those site properties.

We have an example that uses this kind of functionality in our examples repository: https://github.com/hackingmaterials/matminer_examples/blob/master/notebooks/machine-learning/voronoi-ward-prb-2017.ipynb

Does this solve your problem?

Best,

Logan

From: Libin Wen
Sent: Monday, December 17, 2018 2:23 AM
To: matminer
Subject: cannot apply featurize_dataframe with VoronoiFingerprint,AverageBondLength or AverageBondAngle

Hi,

I am trying to use the VoronoiFingerprint (or AverageBondLength, or AverageBondAngle) to featurize my structures. The featurize() function works well if given a “structure” and a proper “idx”.

It seems there is no way to pass the “idx” parameter to the featurize_dataframe() function and the featurization process always raises an error similar to the following:

AverageBondLength: 100%|████████████████████████████████████████████████████████| 2322/2322 [00:00<00:00, 9241.78it/s]

RemoteTraceback Traceback (most recent call last)
RemoteTraceback:
“”"
Traceback (most recent call last):
File “~/miniconda3/envs/py3/lib/python3.6/site-packages/matminer/featurizers/base.py”, line 396, in featurize_wrapper
return self.featurize(*x)
TypeError: featurize() missing 1 required positional argument: ‘idx’

Except this question, I wonder whether there is a suggested way to featurize a general structure without the need to specify an “idx”, since the number of “sites” are different in different structures.

Other information: I am using matminer 0.4.6 and most of other featurizers work well.

Sincerely,

Libin


You received this message because you are subscribed to the Google Groups “matminer” group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
For more options, visit https://groups.google.com/d/optout.

Yes, we just moved the examples to a new directory:

https://github.com/hackingmaterials/matminer_examples/blob/master/matminer_examples/machine_learning-nb/voronoi-ward-prb-2017.ipynb

Logan

···

From: Nahom Aymere
Sent: Monday, June 10, 2019 8:59 AM
To: matminer
Subject: Re: cannot apply featurize_dataframe withVoronoiFingerprint,AverageBondLength or AverageBondAngle

Hi Logan,

Is there still an example on github using SiteStatsFingerprint? The link you gave is no longer valid.

Thank you

Nahom

On Monday, December 17, 2018 at 5:08:04 PM UTC+2, Logan Ward wrote:

Hello Libin,

Thanks for the question!

As you’ve noticed, the featurizers you mentioned (VoronoiFingerprint, etc) are designed to retrieve properties of a certain atomic site. If you want to describe a complete structure, you should use the “SiteStatsFingerprint” (see docs here), which will compute the features of each site in a structure and then create a composite feature for the structure by computing statistics of those site properties.

We have an example that uses this kind of functionality in our examples repository: https://github.com/hackingmaterials/matminer_examples/blob/master/notebooks/machine-learning/voronoi-ward-prb-2017.ipynb

Does this solve your problem?

Best,

Logan

From: Libin Wen
Sent: Monday, December 17, 2018 2:23 AM
To: matminer
Subject: cannot apply featurize_dataframe with VoronoiFingerprint,AverageBondLength or AverageBondAngle

Hi,

I am trying to use the VoronoiFingerprint (or AverageBondLength, or AverageBondAngle) to featurize my structures. The featurize() function works well if given a “structure” and a proper “idx”.

It seems there is no way to pass the “idx” parameter to the featurize_dataframe() function and the featurization process always raises an error similar to the following:

AverageBondLength: 100%|████████████████████████████████████████████████████████| 2322/2322 [00:00<00:00, 9241.78it/s]

RemoteTraceback Traceback (most recent call last)
RemoteTraceback:
“”"
Traceback (most recent call last):
File “~/miniconda3/envs/py3/lib/python3.6/site-packages/matminer/featurizers/base.py”, line 396, in featurize_wrapper
return self.featurize(*x)
TypeError: featurize() missing 1 required positional argument: ‘idx’

Except this question, I wonder whether there is a suggested way to featurize a general structure without the need to specify an “idx”, since the number of “sites” are different in different structures.

Other information: I am using matminer 0.4.6 and most of other featurizers work well.

Sincerely,

Libin


You received this message because you are subscribed to the Google Groups “matminer” group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
For more options, visit https://groups.google.com/d/optout.


You received this message because you are subscribed to the Google Groups “matminer” group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
To view this discussion on the web visit https://groups.google.com/d/msgid/matminer/af353379-0a9d-458c-bb83-6cb24de768f8%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Hi Logan,

1)Is there a documentation about these SiteStatsFingerprint.from_preset arguments such as “LocalPropertyDifference_ward-prb-2017”, is there a list of these possible preset arguments?
2) I was also wondering if you have examples for site.featurizers. I do not understand how I get index of target site in structure struct.
Thanks Nahom

···

On Monday, June 10, 2019 at 5:21:20 PM UTC+3, Logan Ward wrote:

Yes, we just moved the examples to a new directory:

https://github.com/hackingmaterials/matminer_examples/blob/master/matminer_examples/machine_learning-nb/voronoi-ward-prb-2017.ipynb

Logan

From: Nahom Aymere
Sent: Monday, June 10, 2019 8:59 AM
To: matminer
Subject: Re: cannot apply featurize_dataframe withVoronoiFingerprint,AverageBondLength or AverageBondAngle

Hi Logan,

Is there still an example on github using SiteStatsFingerprint? The link you gave is no longer valid.

Thank you

Nahom

On Monday, December 17, 2018 at 5:08:04 PM UTC+2, Logan Ward wrote:

Hello Libin,

Thanks for the question!

As you’ve noticed, the featurizers you mentioned (VoronoiFingerprint, etc) are designed to retrieve properties of a certain atomic site. If you want to describe a complete structure, you should use the “SiteStatsFingerprint” (see docs here), which will compute the features of each site in a structure and then create a composite feature for the structure by computing statistics of those site properties.

We have an example that uses this kind of functionality in our examples repository: https://github.com/hackingmaterials/matminer_examples/blob/master/notebooks/machine-learning/voronoi-ward-prb-2017.ipynb

Does this solve your problem?

Best,

Logan

From: Libin Wen
Sent: Monday, December 17, 2018 2:23 AM
To: matminer
Subject: cannot apply featurize_dataframe with VoronoiFingerprint,AverageBondLength or AverageBondAngle

Hi,

I am trying to use the VoronoiFingerprint (or AverageBondLength, or AverageBondAngle) to featurize my structures. The featurize() function works well if given a “structure” and a proper “idx”.

It seems there is no way to pass the “idx” parameter to the featurize_dataframe() function and the featurization process always raises an error similar to the following:

AverageBondLength: 100%|████████████████████████████████████████████████████████| 2322/2322 [00:00<00:00, 9241.78it/s]

RemoteTraceback Traceback (most recent call last)
RemoteTraceback:
“”"
Traceback (most recent call last):
File “~/miniconda3/envs/py3/lib/python3.6/site-packages/matminer/featurizers/base.py”, line 396, in featurize_wrapper
return self.featurize(*x)
TypeError: featurize() missing 1 required positional argument: ‘idx’

Except this question, I wonder whether there is a suggested way to featurize a general structure without the need to specify an “idx”, since the number of “sites” are different in different structures.

Other information: I am using matminer 0.4.6 and most of other featurizers work well.

Sincerely,

Libin


You received this message because you are subscribed to the Google Groups “matminer” group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
For more options, visit https://groups.google.com/d/optout.


You received this message because you are subscribed to the Google Groups “matminer” group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
To view this discussion on the web visit https://groups.google.com/d/msgid/matminer/af353379-0a9d-458c-bb83-6cb24de768f8%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.