Skip to content

Commit

Permalink
remove properties fully
Browse files Browse the repository at this point in the history
  • Loading branch information
dfulu committed Feb 29, 2024
1 parent 37e0fbc commit 2014dce
Showing 1 changed file with 2 additions and 13 deletions.
15 changes: 2 additions & 13 deletions pvnet/models/base_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -300,26 +300,15 @@ def __init__(
self._accumulated_batches = BatchAccumulator(key_to_keep=self._target_key_name)
self._accumulated_y_hat = PredAccumulator()

# Store whether the model should use quantile regression or simply predict the mean
self.use_quantile_regression = self.output_quantiles is not None

# Store the number of ouput features that the model should predict for
if self.use_quantile_regression:
self.num_output_features = self.forecast_len * len(self.output_quantiles)
else:
self.num_output_features = self.forecast_len

@property
def _use_quantile_regression(self):
"""Whether the model should use quantile regression or simply predict the mean"""
return self.output_quantiles is not None

@property
def _num_output_features(self):
"""Number of ouput features he model chould predict for"""
if self.use_quantile_regression:
out_features = self.forecast_len * len(self.output_quantiles)
else:
out_features = self.forecast_len
return out_features

def _quantiles_to_prediction(self, y_quantiles):
"""
Expand Down

0 comments on commit 2014dce

Please sign in to comment.