Skip to content

Instantly share code, notes, and snippets.

@Emekaborisama
Created November 7, 2022 20:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Emekaborisama/c99d0a1b8f367756cef645df75c4e1ab to your computer and use it in GitHub Desktop.
Save Emekaborisama/c99d0a1b8f367756cef645df75c4e1ab to your computer and use it in GitHub Desktop.
from sklearn.model_selection import train_test_split
from sklearn.metrics import mean_absolute_error, mean_squared_error
from math import sqrt
scaler = StandardScaler()
x=new_train_df.drop("price",axis =1)
y=new_train_df.price
X = scaler.fit_transform(x)
X_train, X_test, y_train, y_test = train_test_split(X, y, test_size=0.3, random_state=23)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment