I have 2 small questions. So, after browsing a lot of the documentation of sklearn, I have noticed that many sklearn preprocessing classes such as standard scaler have a .transform method which takes the X values and scales them. However , to ensure that this can be performed in a pipeline, the method also ensures that the y values are taken as input too (albeit ignored if need be)
So, question 1: the documentation of these methods looks like this:
fit_transform(self, X[, y]).
Why is the y in brackets like that with a preceding comma. Is it to signify that this value is not necessary as an input?
Question 2: If my thoughts on question one are correct, the fit_transform documentation of SelectKBest looks like this:
fit_transform(self, X[, y])
In this case, how can y be an optional input, if there is no way to select K features without the y values as targets?