# What is the difference between sklearn's transform() and predict() methods?

What I have understood thus far is that transform() gives you values that are qualitatively similar to X (your features) and predict() gives you values that are qualitatively similar to y (your labels). But what I'm seeking some clarity over is why are there only a few classes that have BOTH of these methods, e.g KMeans, PLSRegression, etc.

Why doesn't it make sense to either put both methods in every class, or never let these two occur in the same class together? For example, if KMeans needed to have a method that returns the Euclidean points, why not let it have a separate method? Implementing transform() to achieve this functionality, in my opinion, takes away the clear distinction between the two methods. Similarly, in PLSRegression, I haven't been able to understand the difference between the two methods.

Partial Least Squares Regression is a supervised learning technique that also does dimensionality reduction. The PLSRegression class needs both transform and predict interfaces to properly implement the behavior of Partial Least Squares Regression. The transform method is the interface for dimensionality reduction. The predict method is the interface for generating targets from a trained regression model.