Skip to content
This repository has been archived by the owner on Mar 22, 2024. It is now read-only.

Support custom regression targets #75

Open
erikedlund opened this issue Jun 13, 2022 · 0 comments
Open

Support custom regression targets #75

erikedlund opened this issue Jun 13, 2022 · 0 comments

Comments

@erikedlund
Copy link

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.

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

No branches or pull requests

1 participant