text_plain_output_1.png
from sklearn.ensemble import RandomForestRegressor

from sklearn.model_selection import train_test_split

from sklearn.pipeline import Pipeline

from sklearn.preprocessing import StandardScaler

import matplotlib.pyplot as plt

import pandas as pd

import seaborn as sns

df_train = pd.read_csv('/kaggle/input/playground-series-s3e14/train.csv', index_col='id')
df_test = pd.read_csv('/kaggle/input/playground-series-s3e14/test.csv', index_col='id')

X_train_full = df_train.drop(['yield'], axis=1)
y_train_full = df_train['yield']
X_test = df_test

X_train, X_valid, y_train, y_valid = train_test_split(X_train_full, y_train_full, test_size=0.2)

pipeline = Pipeline([('scaler', StandardScaler()), ('random_forest_regr', RandomForestRegressor())])
pipeline.fit(X_train.values, y_train)