Problem about matminer.featurizers.function module

Hello,

This is Yuefei Huang from Rice University, USA.

I tried to use your matminer.featurizers.function module, but I found some problems about it.

I tested it on some simple data, but the outputs obviously are incorrect. Here is an example.

So am I using it incorrectly or the code has some mistake? Thank you very much!

Best,

Yuefei

Hello Yuefei,

Thanks for pointing this out!

I am unable to reproduce the problem you demonstrated here. One potential issue could be if ft was fit using a different list of expressions that what shown in [126]. How did you fit the featurizer?

Also, which version of matminer and Python are you running? Could you run the code below and tell me if the results makes sense? I get the correct result on my installation.

Best,

Logan

from matminer.featurizers.function import FunctionFeaturizer

import pandas as pd

ff = FunctionFeaturizer()

ff.set_n_jobs(1)

d = pd.DataFrame({‘t2’: [1, 2, 3]})

ff.fit(d)

print(ff)

b = ff.featurize_dataframe(d, [‘t2’])

print(b)

···

From: [email protected]
Sent: Wednesday, September 5, 2018 5:24 PM
To: matminer
Subject: Problem about matminer.featurizers.function module

Hello,

This is Yuefei Huang from Rice University, USA.

I tried to use your matminer.featurizers.function module, but I found some problems about it.

I tested it on some simple data, but the outputs obviously are incorrect. Here is an example.

cid:autoGeneratedInlineImage1

So am I using it incorrectly or the code has some mistake? Thank you very much!

Best,

Yuefei


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/c39d0bc3-66a2-419f-b898-40a574af781b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Hello Logan,

My Python version is 3.7. Matminer I am not sure but I installed it 1 month ago.

I tried your scripts and it runs well. I found that the key here is this line:

ff.set_n_jobs(1)

Without setting n_job to 1, it is 8 by default on my PC. If n_job is set to 1, it runs correctly. If not, it shows the same mistake as shown in my first message. So why would it make mistakes if running in parallel?

Thank you very much for the help!

Best,

Yuefei

在 2018年9月5日星期三 UTC-5下午6:03:04,Logan Ward写道:

···

Hello Yuefei,

Thanks for pointing this out!

I am unable to reproduce the problem you demonstrated here. One potential issue could be if ft was fit using a different list of expressions that what shown in [126]. How did you fit the featurizer?

Also, which version of matminer and Python are you running? Could you run the code below and tell me if the results makes sense? I get the correct result on my installation.

Best,

Logan

from matminer.featurizers.function import FunctionFeaturizer

import pandas as pd

ff = FunctionFeaturizer()

ff.set_n_jobs(1)

d = pd.DataFrame({‘t2’: [1, 2, 3]})

ff.fit(d)

print(ff)

b = ff.featurize_dataframe(d, [‘t2’])

print(b)

From: [email protected]
Sent: Wednesday, September 5, 2018 5:24 PM
To: matminer
Subject: Problem about matminer.featurizers.function module

Hello,

This is Yuefei Huang from Rice University, USA.

I tried to use your matminer.featurizers.function module, but I found some problems about it.

I tested it on some simple data, but the outputs obviously are incorrect. Here is an example.

So am I using it incorrectly or the code has some mistake? Thank you very much!

Best,

Yuefei


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/c39d0bc3-66a2-419f-b898-40a574af781b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Good catch! I removed the “set_n_jobs” line and now get a wrong result.

Thank you for figuring that out! It gives us a nice starting point for debugging!.

I have opened up an issue on GitHub and one of us will take a look in to fixing it.

Thanks!

Logan

···

From: [email protected]
Sent: Friday, September 7, 2018 2:18 PM
To: matminer
Subject: Re: Problem about matminer.featurizers.function module

Hello Logan,

My Python version is 3.7. Matminer I am not sure but I installed it 1 month ago.

I tried your scripts and it runs well. I found that the key here is this line:

ff.set_n_jobs(1)

Without setting n_job to 1, it is 8 by default on my PC. If n_job is set to 1, it runs correctly. If not, it shows the same mistake as shown in my first message. So why would it make mistakes if running in parallel?

Thank you very much for the help!

Best,

Yuefei

在 2018年9月5日星期三 UTC-5下午6:03:04,Logan Ward写道:

Hello Yuefei,

Thanks for pointing this out!

I am unable to reproduce the problem you demonstrated here. One potential issue could be if ft was fit using a different list of expressions that what shown in [126]. How did you fit the featurizer?

Also, which version of matminer and Python are you running? Could you run the code below and tell me if the results makes sense? I get the correct result on my installation.

Best,

Logan

from matminer.featurizers.function import FunctionFeaturizer

import pandas as pd

ff = FunctionFeaturizer()

ff.set_n_jobs(1)

d = pd.DataFrame({‘t2’: [1, 2, 3]})

ff.fit(d)

print(ff)

b = ff.featurize_dataframe(d, [‘t2’])

print(b)

From: [email protected]
Sent: Wednesday, September 5, 2018 5:24 PM
To: matminer
Subject: Problem about matminer.featurizers.function module

Hello,

This is Yuefei Huang from Rice University, USA.

I tried to use your matminer.featurizers.function module, but I found some problems about it.

I tested it on some simple data, but the outputs obviously are incorrect. Here is an example.

So am I using it incorrectly or the code has some mistake? Thank you very much!

Best,

Yuefei


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/c39d0bc3-66a2-419f-b898-40a574af781b%40googlegroups.com.
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/68ca8cef-e7a3-4176-9e2f-aef18cdf9e4e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Hello Yuefei,

I’m not sure if you follow the issues on GitHub, but we’ve figured out and fixed this bug.

Thanks again for reporting it!

Best,

Logan

···

From: Logan Ward
Sent: Friday, September 7, 2018 2:32 PM
To: [email protected]; matminer
Subject: RE: Problem about matminer.featurizers.function module

Good catch! I removed the “set_n_jobs” line and now get a wrong result.

Thank you for figuring that out! It gives us a nice starting point for debugging!.

I have opened up an issue on GitHub and one of us will take a look in to fixing it.

Thanks!

Logan

From: [email protected]
Sent: Friday, September 7, 2018 2:18 PM
To: matminer
Subject: Re: Problem about matminer.featurizers.function module

Hello Logan,

My Python version is 3.7. Matminer I am not sure but I installed it 1 month ago.

I tried your scripts and it runs well. I found that the key here is this line:

ff.set_n_jobs(1)

Without setting n_job to 1, it is 8 by default on my PC. If n_job is set to 1, it runs correctly. If not, it shows the same mistake as shown in my first message. So why would it make mistakes if running in parallel?

Thank you very much for the help!

Best,

Yuefei

在 2018年9月5日星期三 UTC-5下午6:03:04,Logan Ward写道:

Hello Yuefei,

Thanks for pointing this out!

I am unable to reproduce the problem you demonstrated here. One potential issue could be if ft was fit using a different list of expressions that what shown in [126]. How did you fit the featurizer?

Also, which version of matminer and Python are you running? Could you run the code below and tell me if the results makes sense? I get the correct result on my installation.

Best,

Logan

from matminer.featurizers.function import FunctionFeaturizer

import pandas as pd

ff = FunctionFeaturizer()

ff.set_n_jobs(1)

d = pd.DataFrame({‘t2’: [1, 2, 3]})

ff.fit(d)

print(ff)

b = ff.featurize_dataframe(d, [‘t2’])

print(b)

From: [email protected]
Sent: Wednesday, September 5, 2018 5:24 PM
To: matminer
Subject: Problem about matminer.featurizers.function module

Hello,

This is Yuefei Huang from Rice University, USA.

I tried to use your matminer.featurizers.function module, but I found some problems about it.

I tested it on some simple data, but the outputs obviously are incorrect. Here is an example.

So am I using it incorrectly or the code has some mistake? Thank you very much!

Best,

Yuefei


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/c39d0bc3-66a2-419f-b898-40a574af781b%40googlegroups.com.
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/68ca8cef-e7a3-4176-9e2f-aef18cdf9e4e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.