8000 #22061 fix image by cathelineparisot · Pull Request #22164 · scikit-learn/scikit-learn · GitHub
[go: up one dir, main page]

Skip to content

#22061 fix image #22164

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion doc/modules/manifold.rst
Original file line number Diff line number Diff line change
Expand Up @@ -417,7 +417,7 @@ version, the algorithms will try to preserve the order of the distances, and
hence seek for a monotonic relationship between the distances in the embedded
space and the similarities/dissimilarities.

.. figure:: ../auto_examples/manifold/images/sphx_glr_plot_lle_digits_010.png
.. figure:: ../auto_examples/manifold/images/sphx_glr_plot_lle_digits_002.png
:target: ../auto_examples/manifold/plot_lle_digits.html
:align: center
:scale: 50
Expand Down
22 changes: 22 additions & 0 deletions sklearn/pipeline.py
Original file line number Diff line number Diff line change
Expand Up @@ -201,6 +201,18 @@ def _validate_steps(self):
for t in transformers:
if t is None or t == "passthrough":
continue
<<<<<<< HEAD
<<<<<<< HEAD
if (not hasattr(t, "fit_transform") and
(not hasattr(t, "fit") and hasattr(t, "transform"))):
raise TypeError("All intermediate steps should be "
"transformers and implement fit and "
"transform, fit_transform or be the string "
"'passthrough'. '%s' (type %s) doesn't"
% (t, type(t)))
=======
=======
>>>>>>> parent of 3b294b20d... [fix]allow-when-only-fit-transform
if not (hasattr(t, "fit") or hasattr(t, "fit_transform")) or not hasattr(
t, "transform"
):
Expand All @@ -210,6 +222,7 @@ def _validate_steps(self):
"or be the string 'passthrough' "
"'%s' (type %s) doesn't" % (t, type(t))
)
>>>>>>> parent of 3b294b20d... [fix]allow-when-only-fit-transform

# We allow last estimator to be None as an identity transformation
if (
Expand All @@ -218,10 +231,19 @@ def _validate_steps(self):
and not hasattr(estimator, "fit")
):
raise TypeError(
<<<<<<< HEAD
<<<<<<< HEAD
"Last step of Pipeline should implement fit, "
"fit_transform or be the string 'passthrough'. "
"'%s' (type %s) doesn't" % (estimator, type(estimator)))
=======
=======
>>>>>>> parent of 3b294b20d... [fix]allow-when-only-fit-transform
"Last step of Pipeline should implement fit "
"or be the string 'passthrough'. "
"'%s' (type %s) doesn't" % (estimator, type(estimator))
)
>>>>>>> parent of 3b294b20d... [fix]allow-when-only-fit-transform

def _iter(self, with_final=True, filter_passthrough=True):
"""
Expand Down
0