-
-
Save amankharwal/e4a04d37febc00ab6293425aa09ae0a7 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import pandas as pd | |
from sklearn.model_selection import train_test_split | |
from sklearn.preprocessing import MinMaxScaler | |
from sklearn.preprocessing import StandardScaler | |
data = pd.read_csv("housing.csv") | |
# using these three features for simplicity | |
data = data.loc[:, ["median_income", "latitude", "longitude"]] | |
training, testing = train_test_split(data, test_size=0.2, random_state=42) | |
normalization = MinMaxScaler().fit_transform(training) | |
standardization = StandardScaler().fit_transform(training) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment