Closed dxbdxx closed 2 years ago
When I run the script _01_mnistdata.ipynb in the folder paper, I get the following error
File "bidd-aggmap-master\paper\00_mnist\correlation\aggmap\utils\calculator.py", line 23, in _calculate x1 = data[:, i1] NameError: name 'data' is not defined NameError Traceback (most recent call last) <ipython-input-10-b1aa715419d2> in <module> ----> 1 mp_train = AggMap(x_train_df, metric = metric) 2 mp_test = AggMap(x_test_df, metric = metric) 3 4 mp_train.save(os.path.join(data_save_folder, 'train.mp')) 5 mp_test.save(os.path.join(data_save_folder, 'test.mp'))
I just copy the aggmap folder into the working directory and modified the _mnist_data_savefolder in config.py. Could you please explain the error so that I can modify it myself? Thanks.
Hi, May I know your python version? try to add this before you import aggmap:
import sys
sys.path.insert(0, 'Your_aggmap_path/')
Thank you for your reply.
I'm using Python 3.7.6 and adding the path doesn't work. I think the error is related to the statement global data
in calculator.py.
Finally, I set by_scipy = True in AggMap and it works fine.
When I run the script _01_mnistdata.ipynb in the folder paper, I get the following error
I just copy the aggmap folder into the working directory and modified the _mnist_data_savefolder in config.py. Could you please explain the error so that I can modify it myself? Thanks.