Changing the Y
Value of the baseline data (time crunch on this one)
#8405
-
If i have an
I am doing this in a loop because performance changes every time. But, when it gets to the training, I get:
|
Beta Was this translation helpful? Give feedback.
Answered by
rusty1s
Nov 20, 2023
Replies: 1 comment 1 reply
-
The recommended way to do this is through the usage of 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)
|
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
anthonysirico
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The recommended way to do this is through the usage of
transforms
, e.g.: