I am predicting the IPL match win probability. While deploying the model using streamlit it show this error:
AttributeError: 'ColumnTransformer' object has no attribute '_name_to_fitted_passthrough'
That's my code:
from sklearn.compose import ColumnTransformer
from sklearn.preprocessing import OneHotEncoder
trf = ColumnTransformer([('trf',OneHotEncoder(sparse=False,drop='first'),
['batting_team','bowling_team','city'])],remainder='passthrough')
pipeline code
pipe = Pipeline(steps=[
('step1',trf),
('step2',LogisticRegression(solver='liblinear'))])