TypeError grid seach

Solía crear un bucle para encontrar los mejores parámetros para mi modelo que aumentaron mis errores en la codificación, así que decidí usarGridSearchCV.
stoy tratando de encontrar los mejores parámetros para PCA para mi modelo (el único parámetro en el que quiero buscar en la cuadrícula).
n este modelo, después de la normalización, quiero combinar las características originales con las características reducidas de PCA y luego aplicar el SVM lineal.
Luego guardo todo el modelo para predecir mi entrada.

Tengo un error en la línea donde trato de ajustar los datos para poder usarbest_estimator_ ybest_params_ funciones.
El error dice:TypeError: The score function should be a callable, all (<type 'str'>) was passed. No utilicé ningún parámetro para el que podría necesitar asignar cadena enGridSearchCVso no estoy seguro de por qué tengo este error

También quiero saber si la líneaprint("shape after model",X.shape) antes de guardar mi modelo, debería imprimir(150, 7) and (150, 5) ambos basados en todos los parámetros posibles?

from sklearn.pipeline import Pipeline, FeatureUnion
from sklearn.model_selection import GridSearchCV
from sklearn.svm import SVC
from sklearn.datasets import load_iris
from sklearn.decomposition import PCA
from sklearn.feature_selection import SelectKBest
from sklearn.preprocessing import StandardScaler
from sklearn.externals import joblib
from numpy import array

iris = load_iris()
X, y = iris.data, iris.target

print(X.shape) #prints (150, 4)
print (y)

#cretae models and piplline them
combined_features = FeatureUnion([("pca", PCA()), ("univ_select", SelectKBest(k='all'))])
svm = SVC(kernel="linear")

pipeline = Pipeline([("scale", StandardScaler()),("features", combined_features), ("svm", svm)])

# Do grid search over n_components:
param_grid = dict(features__pca__n_components=[1,3])

grid_search = GridSearchCV(pipeline, param_grid=param_grid, cv=5, verbose=10)
grid_search.fit(X, y)
print("best parameters", grid_search.best_params_)

print("shape after model",X.shape) #should this print (150, 7) or (150, 5) based on best parameter?

#save the model
joblib.dump(grid_search.best_estimator_, 'model.pkl', compress = 1)

#new data to predict
Input=[ 2.9 , 4.  ,1.2  ,0.2]
Input= array(Input)

#use the saved model to predict the new data
modeltrain="model.pkl"
modeltrain_saved = joblib.load(modeltrain) 
model_predictions = modeltrain_saved.predict(Input.reshape(1, -1))
print(model_predictions)

Actualicé el código basado en las respuestas

Respuestas a la pregunta(1)

Su respuesta a la pregunta