Jul-09-2023, 07:43 AM
I want to run linear.py from the below website. But I always am stuck at line 90 of linear.py. How to fix the error? The linear.py code can be seen here: https://github.com/xunzheng/notears/blob.../linear.py
Traceback (most recent call last):
File "C:\Users\14047\notears\notears\linear.py", line 90, in <module>
from notears import utils
ModuleNotFoundError: No module named 'notears'
[Finished in 2.9s]
This website https://github.com/xunzheng/notears said
> Running a simple demo
The simplest way to try out NOTEARS is to run a simple example:
$ git clone https://github.com/xunzheng/notears.git
$ cd notears/
$ python notears/linear.py
This runs the l1-regularized NOTEARS on a randomly generated 20-node Erdos-Renyi graph with 100 samples. Within a few seconds, you should see output like this:
{'fdr': 0.0, 'tpr': 1.0, 'fpr': 0.0, 'shd': 0, 'nnz': 20}
The data, ground truth graph, and the estimate will be stored in X.csv, W_true.csv, and W_est.csv.
I want to fix the error. Then when I run linear.py, I can get the same output as authors suggest.
Traceback (most recent call last):
File "C:\Users\14047\notears\notears\linear.py", line 90, in <module>
from notears import utils
ModuleNotFoundError: No module named 'notears'
[Finished in 2.9s]
This website https://github.com/xunzheng/notears said
> Running a simple demo
The simplest way to try out NOTEARS is to run a simple example:
$ git clone https://github.com/xunzheng/notears.git
$ cd notears/
$ python notears/linear.py
This runs the l1-regularized NOTEARS on a randomly generated 20-node Erdos-Renyi graph with 100 samples. Within a few seconds, you should see output like this:
{'fdr': 0.0, 'tpr': 1.0, 'fpr': 0.0, 'shd': 0, 'nnz': 20}
The data, ground truth graph, and the estimate will be stored in X.csv, W_true.csv, and W_est.csv.
I want to fix the error. Then when I run linear.py, I can get the same output as authors suggest.