Spaces:
Sleeping
Sleeping
Update pages/market_rent_estimation.py
Browse files
pages/market_rent_estimation.py
CHANGED
|
@@ -47,7 +47,7 @@ def main():
|
|
| 47 |
filltered_rows_embeding = distances_matrix[mask]
|
| 48 |
selected_row_embeding = distances_matrix[row_index]
|
| 49 |
distances_to_properties = np.linalg.norm(filltered_rows_embeding - selected_row_embeding, axis=1)
|
| 50 |
-
df_properties_filtered["
|
| 51 |
reordered_df_properties_filtered = df_properties_filtered.sort_values("score_pred", ascending=False)
|
| 52 |
|
| 53 |
df_properties_filtered = df_properties_filtered.reset_index()
|
|
@@ -57,9 +57,9 @@ def main():
|
|
| 57 |
#comps page
|
| 58 |
with tab1:
|
| 59 |
filtered_data = reordered_df_properties_filtered[["google_ola", "market_costar", "submarket_costar", 'distance_from_first (km)', "execution_date", "rented_sf", "building_sf", "year_built", "office_rate", "min_clear_height", "max_clear_height", "docks", "drive_ins", "rent_combined", "lat", "long"]]#pd.concat([filtered_data2])
|
| 60 |
-
comps_scores = sorted_distances
|
| 61 |
|
| 62 |
-
filtered_data.insert(loc=1, column='Similarity score', value=comps_scores)
|
| 63 |
|
| 64 |
# Formatting the DataFrame
|
| 65 |
filtered_data['Similarity score'] = ((1 - filtered_data['Similarity score']) * 100).apply(lambda x: f"{x:.2f}")
|
|
|
|
| 47 |
filltered_rows_embeding = distances_matrix[mask]
|
| 48 |
selected_row_embeding = distances_matrix[row_index]
|
| 49 |
distances_to_properties = np.linalg.norm(filltered_rows_embeding - selected_row_embeding, axis=1)
|
| 50 |
+
df_properties_filtered["Similarity score"] = distances_to_properties
|
| 51 |
reordered_df_properties_filtered = df_properties_filtered.sort_values("score_pred", ascending=False)
|
| 52 |
|
| 53 |
df_properties_filtered = df_properties_filtered.reset_index()
|
|
|
|
| 57 |
#comps page
|
| 58 |
with tab1:
|
| 59 |
filtered_data = reordered_df_properties_filtered[["google_ola", "market_costar", "submarket_costar", 'distance_from_first (km)', "execution_date", "rented_sf", "building_sf", "year_built", "office_rate", "min_clear_height", "max_clear_height", "docks", "drive_ins", "rent_combined", "lat", "long"]]#pd.concat([filtered_data2])
|
| 60 |
+
# comps_scores = sorted_distances
|
| 61 |
|
| 62 |
+
# filtered_data.insert(loc=1, column='Similarity score', value=comps_scores)
|
| 63 |
|
| 64 |
# Formatting the DataFrame
|
| 65 |
filtered_data['Similarity score'] = ((1 - filtered_data['Similarity score']) * 100).apply(lambda x: f"{x:.2f}")
|