Skip to content
Discussion options

You must be logged in to vote

The recommended way to do this is through the usage of transforms, e.g.:

class MyTransform:
     def __init__(self, median_performance):
         self.median_performance = median_performance
     
     def __call__(self, data):
          if data.performance < median_performance:
               data.y = 1
          else:
               data.y = 0
          return data
          
dataset.transform = MyTransform(median_performance)
     

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@anthonysirico
Comment options

Answer selected by anthonysirico
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants