Spaces:
Sleeping
Sleeping
saicharan2804
commited on
Commit
·
7fc0b97
1
Parent(s):
e57187a
Error commented out
Browse files- molgenevalmetric.py +4 -6
molgenevalmetric.py
CHANGED
@@ -38,8 +38,6 @@ import pandas as pd
|
|
38 |
from fcd_torch import FCD
|
39 |
# from syba.syba import SybaClassifier
|
40 |
|
41 |
-
# from tdc import Evaluator
|
42 |
-
# from tdc import Oracle
|
43 |
|
44 |
|
45 |
def get_mol(smiles_or_mol):
|
@@ -401,10 +399,10 @@ def oracles(gen, train):
|
|
401 |
"""
|
402 |
|
403 |
Result = {}
|
404 |
-
|
405 |
-
|
406 |
|
407 |
-
|
408 |
|
409 |
|
410 |
oracle_list = [
|
@@ -508,7 +506,7 @@ class molgenevalmetric(evaluate.Metric):
|
|
508 |
metrics['unique'] = fraction_unique(gen=gensmi)
|
509 |
metrics['IntDiv'] = internal_diversity(gen=gensmi)
|
510 |
metrics['FCD'] = fcd_metric(gen = gensmi, train = trainsmi)
|
511 |
-
metrics['Oracles'] = oracles(gen = gensmi, train = trainsmi)
|
512 |
|
513 |
# metrics['SA'] = SAscore(gen=gensmi)
|
514 |
# metrics['SCS'] = SAscore(gen=trainsmi)
|
|
|
38 |
from fcd_torch import FCD
|
39 |
# from syba.syba import SybaClassifier
|
40 |
|
|
|
|
|
41 |
|
42 |
|
43 |
def get_mol(smiles_or_mol):
|
|
|
399 |
"""
|
400 |
|
401 |
Result = {}
|
402 |
+
evaluator = Evaluator(name = 'KL_Divergence')
|
403 |
+
KL_Divergence = evaluator(gen, train)
|
404 |
|
405 |
+
Result["KL_Divergence"] = KL_Divergence
|
406 |
|
407 |
|
408 |
oracle_list = [
|
|
|
506 |
metrics['unique'] = fraction_unique(gen=gensmi)
|
507 |
metrics['IntDiv'] = internal_diversity(gen=gensmi)
|
508 |
metrics['FCD'] = fcd_metric(gen = gensmi, train = trainsmi)
|
509 |
+
# metrics['Oracles'] = oracles(gen = gensmi, train = trainsmi)
|
510 |
|
511 |
# metrics['SA'] = SAscore(gen=gensmi)
|
512 |
# metrics['SCS'] = SAscore(gen=trainsmi)
|