try
This commit is contained in:
parent
e77989bf86
commit
d19f741dbf
@ -1,10 +1,11 @@
|
|||||||
import sklearn
|
import sklearn
|
||||||
|
from sklearn.model_selection import train_test_split
|
||||||
import pandas as pd
|
import pandas as pd
|
||||||
|
|
||||||
housing_price_dataset = pd.read_csv('housing_price_dataset.csv')
|
housing_price_dataset = pd.read_csv('housing_price_dataset.csv')
|
||||||
|
|
||||||
hp_train_test, hp_dev = sklearn.model_selection.train_test_split(housing_price_dataset, test_size=0.1)
|
hp_train_test, hp_dev = train_test_split(housing_price_dataset, test_size=0.1)
|
||||||
hp_train, hp_test = sklearn.model_selection.train_test_split(hp_train_test, test_size=1000)
|
hp_train, hp_test = train_test_split(hp_train_test, test_size=1000)
|
||||||
|
|
||||||
hp_train = pd.get_dummies(hp_train, columns=['Neighborhood'])
|
hp_train = pd.get_dummies(hp_train, columns=['Neighborhood'])
|
||||||
hp_dev = pd.get_dummies(hp_dev, columns=['Neighborhood'])
|
hp_dev = pd.get_dummies(hp_dev, columns=['Neighborhood'])
|
||||||
|
Loading…
Reference in New Issue
Block a user