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

Support custom regression targets #75

@erikedlund

Description

@erikedlund

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions