Closed
Description
Short Question Description
A clear single sentence question we can try to help with?
In the predict() of Class SimpleRegressionPipeline, there are restrictions on the min/max values of y.
def predict(self, X, batch_size=None):
y = super().predict(X, batch_size=batch_size)
y[y > (2 * self.y_max_)] = 2 * self.y_max_
if self.y_min_ < 0:
y[y < (2 * self.y_min_)] = 2 * self.y_min_
elif self.y_min_ > 0:
y[y < (0.5 * self.y_min_)] = 0.5 * self.y_min_
return y
My question is should we also consider y_max < 0 like y_min?
def predict(self, X, batch_size=None):
y = super().predict(X, batch_size=batch_size)
if self.y_max > 0:
y[y > (2 * self.y_max_)] = 2 * self.y_max_
elif self.y_max < 0:
y[y > (0.5 * self.y_max_)] = 0.5 * self.y_max_
if self.y_min_ < 0:
y[y < (2 * self.y_min_)] = 2 * self.y_min_
elif self.y_min_ > 0:
y[y < (0.5 * self.y_min_)] = 0.5 * self.y_min_
return y
If I have missed anything, please let me know.
Many thanks!