Here comes a rookie! I am gettin an above-mentioned error in line 27 and I have no idea what to do. I posted that question on stack overflow and I was advised to change tuple format: “the transformers are triples, not 4-tuples. See the docs page for possible formats of passing the list of columns to operate on.” Still I have no idea what to do. This code snipet is from Deep Learning Regression with Admissions Data. Could someone help me please? Just to be comperhensive, I attached all my code.
import pandas as pd from sklearn.model_selection import train_test_split from sklearn.preprocessing import StandardScaler from sklearn.preprocessing import Normalizer from sklearn.compose import ColumnTransformer from tensorflow.keras.models import Sequential from tensorflow.keras.layers import InputLayer from tensorflow.keras.layers import Dense from tensorflow.keras.optimizers import Adam dataset = pd.read_csv("life_expectancy.csv") print(dataset.describe()) dataset = dataset.drop(['Country'], axis = 1) labels = dataset.iloc[:, -1] features = dataset.iloc[:,0:-1] features = pd.get_dummies(features) features_train, labels_train, features_test, labels_test = train_test_split(features, labels, test_size = 20, random_state = 23) ct = ColumnTransformer([("only numeric", StandardScaler(), features_train,features_test)], remainder='passthrough') features_train_scaled = ct.fit_transform(features_train) features_test_scaled = ct.fit_transform(features_test)