# split the data into train and test X_train, X_test, y_train, y_test = train_test_split( df[feature_columns], df['CHURNVALUE'], test_size=0.2 ) # preprocessing columns column_transform = make_column_transformer( (OneHotEncoder(), categorical_columns), remainder='passthrough') random_forest=RandomForestClassifier() # fit the model model = make_pipeline(column_transform, random_forest).fit(X_train, y_train);
Hosted onDeepnote