-
Notifications
You must be signed in to change notification settings - Fork 11
Open
Labels
documentationImprovements or additions to documentationImprovements or additions to documentation
Description
Hi,
How can I parse any other (custom) reward function other than the default auc/aupr?
I am following this example on colab how to use AMBER. Say i want to implement the spearman correlation as the reward function. From the AMBER reward submodule documentation I'd took these few lines of code
from amber.architect.reward import LossAucReard
import scipy.stats as ss
reward_fn = LossAucReward(method=lambda y_true, y_score: ss.spearmanr(y_true, y_score).correlation)
and substituted 'reward_fn': {'method': 'auc'} with 'reward_fn': {'method': reward_fn(model,val_data)} but this doesnt seem to be the right way of doing it. Do you have any suggestions?
Thanks
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
documentationImprovements or additions to documentationImprovements or additions to documentation