RMHalak commited on
Commit
7dc04fd
1 Parent(s): 4d98bba

Update utils.py

Browse files
Files changed (1) hide show
  1. utils.py +33 -28
utils.py CHANGED
@@ -9,35 +9,40 @@ def create_new_features(df):
9
  return df
10
 
11
  def normalize(df):
12
- min_dict = {'bedrooms': 0,
13
- 'bathrooms': 0,
14
- 'sqft_living': 370,
15
- 'sqft_lot': 638,
16
- 'floors': 1,
17
- 'waterfront': 0,
18
- 'view': 0,
19
- 'condition': 1,
20
- 'sqft_above': 370,
21
- 'sqft_basement': 0,
22
- 'yr_built': 1900,
23
- 'yr_renovated': 0,
24
- 'house_age': 0,
25
- 'years_since_renovation': 0}
 
 
 
 
 
 
 
 
 
 
 
 
 
 
26
 
27
- max_dict = {'bedrooms': 9,
28
- 'bathrooms': 8,
29
- 'sqft_living': 13540,
30
- 'sqft_lot': 1074218,
31
- 'floors': 3,
32
- 'waterfront': 1,
33
- 'view': 4,
34
- 'condition': 5,
35
- 'sqft_above': 9410,
36
- 'sqft_basement': 4820,
37
- 'yr_built': 2014,
38
- 'yr_renovated': 2014,
39
- 'house_age': 114,
40
- 'years_since_renovation': 2014}
41
 
42
  numerical_features = ['bedrooms', 'bathrooms', 'sqft_living', 'sqft_lot', 'floors', 'waterfront',
43
  'view', 'condition', 'sqft_above', 'sqft_basement',
 
9
  return df
10
 
11
  def normalize(df):
12
+ # min_dict = {'bedrooms': 0,
13
+ # 'bathrooms': 0,
14
+ # 'sqft_living': 370,
15
+ # 'sqft_lot': 638,
16
+ # 'floors': 1,
17
+ # 'waterfront': 0,
18
+ # 'view': 0,
19
+ # 'condition': 1,
20
+ # 'sqft_above': 370,
21
+ # 'sqft_basement': 0,
22
+ # 'yr_built': 1900,
23
+ # 'yr_renovated': 0,
24
+ # 'house_age': 0,
25
+ # 'years_since_renovation': 0}
26
+ # max_dict = {'bedrooms': 9,
27
+ # 'bathrooms': 8,
28
+ # 'sqft_living': 13540,
29
+ # 'sqft_lot': 1074218,
30
+ # 'floors': 3,
31
+ # 'waterfront': 1,
32
+ # 'view': 4,
33
+ # 'condition': 5,
34
+ # 'sqft_above': 9410,
35
+ # 'sqft_basement': 4820,
36
+ # 'yr_built': 2014,
37
+ # 'yr_renovated': 2014,
38
+ # 'house_age': 114,
39
+ # 'years_since_renovation': 2014}
40
 
41
+ with open("./min_dict.json", "r") as f:
42
+ min_dict = json.load(f)
43
+
44
+ with open("./max_dict.json", "r") as f:
45
+ max_dict = json.load(f)
 
 
 
 
 
 
 
 
 
46
 
47
  numerical_features = ['bedrooms', 'bathrooms', 'sqft_living', 'sqft_lot', 'floors', 'waterfront',
48
  'view', 'condition', 'sqft_above', 'sqft_basement',