Closed jrasero closed 5 years ago
Have you upgraded to the latest version of mgcpy
? We recently reformatted the package and so older versions of the code may have compute_distance_matrix
incorrectly placed. You can upgrade the package through pip
using:
pip install --upgrade mgcpy
If this does not work, can you please post the error output?
Hi,
upgrading did not work. This is the output:
cannot import name 'compute_distance_matrix' from 'mgcpy.independence_tests.utils.mdmr_functions'
It seems that it fails to find that function. Indeed, in the current repository, which I guess it is the newest one, there's no compute_distance_matrix
function inside mdmr_functions
module
I have found a fix that will also be updated in the next version of the package. A fix, for now, is to remove the following line:
from mgcpy.independence_tests.utils.compute_distance_matrix import compute_distance
and whenever the MDMR object is created in the tutorial as in the following line, just remove the compute_distance_matrix
variable:
mdmr = MDMR()
instead of mdmr = MDMR(compute_distance_matrix)
Please let me know if that fixed the issue
Thanks! That fixed the issue.
Hi,
In the first cell of the MDMR demo notebook, I tried to import "compute_distance_matrix" function, but it didn't work. There is a module called in the same way within the "utils" module, but it is not a function and therefore, if you try to import it and use it later as an argument when using MDMR in the following cell, it also gives rise to an error. Could you please check it?