Skip to content

Commit

Permalink
Class weights being initialized with only training partition, not val…
Browse files Browse the repository at this point in the history
…idation
  • Loading branch information
gAldeia committed Nov 8, 2024
1 parent b0b485d commit 2451619
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion pybrush/BrushEstimator.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ def fit(self, X, y):
self.train_.set_batch_size(self.batch_size) # TODO: update batch indexes at the beggining of every generation
self.validation_ = self.data_.get_validation_data()

self.parameters_ = self._wrap_parameters(y)
self.parameters_ = self._wrap_parameters(self.train_.y)

self.search_space_ = SearchSpace(self.data_,
self.parameters_.functions,
Expand Down
2 changes: 1 addition & 1 deletion pybrush/DeapEstimator.py
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ def fit(self, X, y):

self.validation_ = self.data_.get_validation_data()

self.parameters_ = self._wrap_parameters(y)
self.parameters_ = self._wrap_parameters(self.train_.y)
self.search_space_ = SearchSpace(self.data_, self.parameters_.functions, self.weights_init)

if self.mode == "classification":
Expand Down

0 comments on commit 2451619

Please sign in to comment.