Skip to content

Instantly share code, notes, and snippets.

@lakshay-arora
Last active January 28, 2020 13:58
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 lakshay-arora/173fb9af6a4cbdfb27ce434dfc9e21c4 to your computer and use it in GitHub Desktop.
Save lakshay-arora/173fb9af6a4cbdfb27ce434dfc9e21c4 to your computer and use it in GitHub Desktop.
# importing required libraries
import pandas as pd
from sklearn.compose import ColumnTransformer
from sklearn.impute import SimpleImputer
import category_encoders as ce
from sklearn.preprocessing import StandardScaler
from sklearn.ensemble import RandomForestRegressor
from sklearn.pipeline import Pipeline
# read the training data set
data = pd.read_csv('dataset/train_kOBLwZA.csv')
# top rows of the data
data.head()
# seperate the independent and target variables
train_x = data.drop(columns=['Item_Outlet_Sales'])
train_y = data['Item_Outlet_Sales']
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment