Skip to content

Commit

Permalink
Merge pull request #149 from openclimatefix/remove_properties
Browse files Browse the repository at this point in the history
Remove properties
  • Loading branch information
dfulu authored Feb 29, 2024
2 parents ecbcd48 + 8bb4564 commit 7e4a48a
Showing 1 changed file with 6 additions and 11 deletions.
17 changes: 6 additions & 11 deletions pvnet/models/base_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -300,19 +300,14 @@ def __init__(
self._accumulated_batches = BatchAccumulator(key_to_keep=self._target_key_name)
self._accumulated_y_hat = PredAccumulator()

@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"""
# 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:
out_features = self.forecast_len * len(self.output_quantiles)
self.num_output_features = self.forecast_len * len(self.output_quantiles)
else:
out_features = self.forecast_len
return out_features
self.num_output_features = self.forecast_len

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

0 comments on commit 7e4a48a

Please sign in to comment.