Conversation
Align O2PLS.fit with the sklearn estimator contract (sklearn's own cross_decomposition deprecated Y in favour of y). Positional calls unaffected; keyword calls must use fit(X, y=...). Y-block helpers (predict_x, transform_y, ...) keep their uppercase Y block argument. Remove O2PLS.score: it duplicated RegressorMixin.score exactly; the method remains available via the mixin. Also complete the O2PLS Attributes docstring (b_t_/b_u_, filtered and residual training blocks with a pickle-size note, fitted component counts, n_features_in_/feature_names_in_) and note that the string scale parameter differs from PLSRegression's boolean scale.
Document previously undocumented fitted attributes per the sklearn docstring standard: OPLS per-component diagnostics (r2x_components_, r2x_ortho_components_, r2y_components_), training Q residuals and residual sums of squares, and n_features_in_/feature_names_in_ on both estimators plus n_orthogonal_ on OPLSDA. Note on OPLS that the string scale parameter differs from PLSRegression's boolean scale.
Replace np.testing.assert_allclose with sklearn.utils._testing.assert_allclose, which the sklearn developer guide recommends for continuous-value comparisons (it infers rtol from the array dtypes). Exact-equality assert_array_equal calls unchanged.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.