Deeprank-GNN
Deeprank-GNN copied to clipboard
Support custom regression targets
Sorry if I've missed something here, but I haven't found a way to use a custom target for regression that isn't one of the canned values (fnat, irmsd, lrmsd). I've created graphs and added targets according to the guidelines in the docs, but when I go to train/evaluate models (requesting metrics with binary=False) I get an error:
train_metrics = model.get_metrics('train', threshold = 4.0, binary=False)
File "/home/edlunde/Deeprank-GNN/deeprank_gnn/NeuralNet.py", line 579, in get_metrics
return Metrics(pred, y, self.target, threshold, binary)
File "/home/edlunde/Deeprank-GNN/deeprank_gnn/Metrics.py", line 130, in __init__
raise ValueError('target must be capri_class on bin_class')
ValueError: target must be capri_class on bin_class
It looks like the Metrics module is only calculating regression metrics if the target is one of ['fnat', 'irmsd', 'lrmsd'] (line 188).
Is there a way to train/score regression models I'm missing? Thanks.