title: Save intermenidte results of the sklearn pipeline
body: <p>I have a code example - sklearn pipeline that has two components (PCA and Random Forest), I want to use the intermediate results of the pipeline in order to bring some explainability. I know that it is possible to use .get_params() to see the intermediate steps, but is it possible to save or extract the intermediate results for additional actions? I want to apply additional functions of the PCA (1.1. and 1.2 sections in the code) </p>
  
  <pre><code>from sklearn.datasets import load_breast_cancer
  import numpy as np
  import pandas as pd
  from sklearn.decomposition import FastICA, PCA
  from sklearn.ensemble import RandomForestClassifier
  from sklearn.pipeline import Pipeline
  from sklearn.model_selection import train_test_split
  from sklearn.metrics import classification_report
  from sklearn.metrics import confusion_matrix
  
  #Convert the dataset to data frame
  cancer = load_breast_cancer()     
  data = np.c_[cancer.data, cancer.target]
  columns = np.append(cancer.feature_names, ["target"])
  df = pd.DataFrame(data, columns=columns)
  
  
  #Split data into train and test 
  X = df.iloc[:, 0:30].values
  Y = df.iloc[:, 30].values
  X_train, X_test, Y_train, Y_test = train_test_split(X, Y, test_size = 0.25, random_state = 0)
  
  
  #Create a pipeline 
  n_comp = 12
  clf = Pipeline([('pca', PCA(n_comp)), ('RandomForest', RandomForestClassifier(n_estimators=100))])
  clf.fit(X_train, Y_train)
  
  
  #Evalute the pipeline 
  cr = classification_report(Y_test, Y_pred)
  print(cr)
  
  
  #see the intermediate steps of the pipeline
  print(clf.get_params()['pca'])
  
  
  ##1.1 if I create PCA outside of the pipeline 
  pca = PCA(n_components=10)
  principalComponents = pca.fit_transform(X)
  
  ##1.2 some explainability on pca outside of the pipeline 
  pca.explained_variance_ratio_
  </code></pre>