Skip to content

Commit

Permalink
.
Browse files Browse the repository at this point in the history
  • Loading branch information
sherstpasha committed Mar 13, 2024
1 parent 97e4bf7 commit 51f82d5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
4 changes: 2 additions & 2 deletions src/test.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
from sklearn.metrics import confusion_matrix
from sklearn.metrics import f1_score
from thefittest.regressors import MLPEARegressor
from thefittest.optimizers import SHAGA
from thefittest.optimizers import SHAGA, SHADE

from sklearn.metrics import r2_score

Expand Down Expand Up @@ -40,7 +40,7 @@ def problem(x):
pop_size=250,
hidden_layers=(5, 5),
activation="sigma",
weights_optimizer=SHAGA,
weights_optimizer=SHADE,
weights_optimizer_args={"show_progress_each": 50},
)

Expand Down
5 changes: 2 additions & 3 deletions src/thefittest/base/_mlp.py
Original file line number Diff line number Diff line change
Expand Up @@ -294,10 +294,9 @@ def fit(self, X: ArrayLike, y: ArrayLike):
self.classes_ = self._label_encoder.classes_
self.n_classes_ = len(self.classes_)
else:
pass
# X, y = self._validate_data(X, y, y_numeric=True, reset=True)
X, y = self._validate_data(X, y, y_numeric=True, reset=True)

# X, y = array_like_to_numpy_X_y(X, y)
X, y = array_like_to_numpy_X_y(X, y)

if self.offset:
X = np.hstack([X, np.ones((X.shape[0], 1))])
Expand Down

0 comments on commit 51f82d5

Please sign in to comment.