Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to evaluate the model? #36

Closed
Layne-Huang opened this issue Apr 7, 2022 · 5 comments
Closed

How to evaluate the model? #36

Layne-Huang opened this issue Apr 7, 2022 · 5 comments

Comments

@Layne-Huang
Copy link

No description provided.

@mattragoza
Copy link
Owner

You can use the command python3 generate.py config/generate.config to generate molecules for each of the selected test targets that were used for evaluations in our Chemical Science article.

@Layne-Huang
Copy link
Author

Thank you very much for your kind reply!

May I ask how to count the evaluation metrics like validity, novelty, and uniqueness?

Thank you again.

@Matheo-Chang
Copy link

Excuse me, when I use the command python3 generate.py config/generate.config. It appears a problem as follows:
Traceback (most recent call last):
File "generate.py", line 48, in
main(sys.argv[1:])
File "generate.py", line 41, in main
debug=args.debug,
File "/da1/home/changhaoyu/liGAN/liGAN/generating.py", line 98, in init
**output_kws,
File "/da1/home/changhaoyu/liGAN/liGAN/generating.py", line 671, in init
self.metrics = pd.DataFrame(columns=columns).set_index(columns)
File "/home/changhaoyu/anaconda3/envs/py37/lib/python3.7/site-packages/pandas/core/frame.py", line 392, in init
mgr = init_dict(data, index, columns, dtype=dtype)
File "/home/changhaoyu/anaconda3/envs/py37/lib/python3.7/site-packages/pandas/core/internals/construction.py", line 196, in init_dict
nan_dtype)
File "/home/changhaoyu/anaconda3/envs/py37/lib/python3.7/site-packages/pandas/core/dtypes/cast.py", line 1175, in construct_1d_arraylike_from_scalar
dtype = dtype.dtype
AttributeError: type object 'object' has no attribute 'dtype'
How can I solve it?

@mattragoza
Copy link
Owner

@Layne-Huang I just added a script scripts/valid_novel_unique.py which can be used as follows:

(LiGAN) [mtragoza@dv002 LiGAN]$ python scripts/valid_novel_unique.py -h
usage: valid_novel_unique.py [-h] [--groupby GROUPBY] [-o OUT_FILE] data_root train_file metrics_file

positional arguments:
  data_root
  train_file
  metrics_file

optional arguments:
  -h, --help            show this help message and exit
  --groupby GROUPBY
  -o OUT_FILE, --out_file OUT_FILE
(LiGAN) [mtragoza@dv002 LiGAN]$ python scripts/valid_novel_unique.py data/crossdock2020/ data/it2_tt_0_lowrmsd_valid_mols_test0_1000.types DEMO.gen_metrics
Loading train set molecules
Loading generated molecules
     % valid  % novel  % unique
all
all    100.0    100.0     100.0

@mattragoza
Copy link
Owner

@Matheo-Chang I moved this to a separate issue #48.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants