title: Fitting method in scickit'slearn Pipeline class
body: <p>Let's say i have this python code:</p>
  
  <pre><code>from imblearn.pipeline import Pipeline
  
  
  from sklearn.feature_selection import VarianceThreshold
  from sklearn.preprocessing import StandardScaler 
  from imblearn.over_sampling import RandomOverSampler
  from sklearn.decomposition import PCA
  
  
  selector = VarianceThreshold()
  scaler = StandardScaler()
  ros = RandomOverSampler()
  pca = PCA()
  clf = neighbors.KNeighborsClassifier(n_jobs=-1) 
  pipe = Pipeline(steps=[('selector', selector), ('scaler', scaler), ('sampler', ros), ('pca', pca), ('kNN', clf)])
  pipe.fit(X_train,y_train)
  preds = pipe.predict(X_test)
  </code></pre>
  
  <p>What this does is import 4 transformers and an estimator from scickit learn.Then it fit's these in the data and lastly it predicts.If i understand correctly fit method applies the 4 transformers to the data and the predict method makes the final estimation(in our case using kNN).My question is this:For scaler as well as pca the alterations that are done in the train data must be also applied in the test data.But in fit's parameters we don't give test and as a result the test data won't be altered.How does that make sense?Is there something i am missing?</p>