Sacred & pymongo install + data normalization fix
This commit is contained in:
parent
a6daa1b902
commit
041339a0f3
@ -4,3 +4,5 @@ numpy
|
||||
sklearn
|
||||
torch
|
||||
matplotlib
|
||||
sacred
|
||||
pymongo
|
@ -6,7 +6,10 @@ cols = list(pd.read_csv("data/avocado.csv", nrows=1))
|
||||
# print("###\n", cols, "\n###")
|
||||
avocados = pd.read_csv(
|
||||
"data/avocado.csv").rename(columns={"Unnamed: 0": 'Week'})
|
||||
avocados.describe(include="all")
|
||||
print(avocados.describe(include="all"))
|
||||
avg_prices = avocados['AveragePrice']
|
||||
avocados.drop(['AveragePrice'], axis=1, inplace=True)
|
||||
|
||||
|
||||
# * Retrieve the target column
|
||||
# y = avocados.AveragePrice
|
||||
@ -43,7 +46,8 @@ print(all_cols)
|
||||
# avocados = pd.concat([avocados, ohe_df], axis=1)
|
||||
# * Time for normalization
|
||||
mM = MinMaxScaler()
|
||||
avocados_normed = pd.DataFrame(mM.fit_transform(avocados.values), columns=all_cols)
|
||||
avocados_normed = pd.concat([avg_prices, pd.DataFrame(
|
||||
mM.fit_transform(avocados.values), columns=all_cols)], axis=1)
|
||||
|
||||
print(avocados_normed.head())
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user