Skip to content

Commit

Permalink
fix #185
Browse files Browse the repository at this point in the history
  • Loading branch information
ejolly committed Mar 29, 2024
1 parent 6dcb591 commit 541b2be
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions feat/plotting.py
Original file line number Diff line number Diff line change
Expand Up @@ -1009,6 +1009,12 @@ def predict(au, model=None, feature_range=None):
if feature_range:
au = minmax_scale(au, feature_range=feature_range, axis=1)

# Handle auto-raveling feature added to PLSRegression in sklearn 1.3
# because our model was trained in an earlier version where this attribute
# did not exist
# https://scikit-learn.org/stable/whats_new/v1.3.html#sklearn-cross-decomposition
if not hasattr(model, "_predict_1d"):
model._predict_1d = True
landmarks = np.reshape(model.predict(au), (2, 68))
return landmarks

Expand Down

0 comments on commit 541b2be

Please sign in to comment.