mirror of
https://github.com/Hestia-Homes/Model.git
synced 2026-06-30 13:10:47 +00:00
debugging stoneater alg
This commit is contained in:
parent
8f9b8f0886
commit
2158ab2cd5
1 changed files with 7 additions and 3 deletions
|
|
@ -1635,7 +1635,7 @@ def propsed_wave_3_sample():
|
||||||
)
|
)
|
||||||
|
|
||||||
# TODO: We drop 302 properties that are not priority postcodes - confirm w/ Stonewater
|
# TODO: We drop 302 properties that are not priority postcodes - confirm w/ Stonewater
|
||||||
asset_list = asset_list[asset_list["Archetype ID"] == "NOT PRIORITY POSTCODE"]
|
asset_list = asset_list[asset_list["Archetype ID"] != "NOT PRIORITY POSTCODE"]
|
||||||
# Clean address ids
|
# Clean address ids
|
||||||
asset_list = asset_list[~pd.isnull(asset_list["Address ID"])]
|
asset_list = asset_list[~pd.isnull(asset_list["Address ID"])]
|
||||||
asset_list = asset_list[asset_list["Address ID"] != "Address ID"]
|
asset_list = asset_list[asset_list["Address ID"] != "Address ID"]
|
||||||
|
|
@ -1678,7 +1678,7 @@ def propsed_wave_3_sample():
|
||||||
#
|
#
|
||||||
|
|
||||||
results = []
|
results = []
|
||||||
for region in unique_postal_regions:
|
for region in tqdm(unique_postal_regions):
|
||||||
# Take all of the properties in that region
|
# Take all of the properties in that region
|
||||||
region_assets = asset_list[asset_list["Postal Region"] == region].copy()
|
region_assets = asset_list[asset_list["Postal Region"] == region].copy()
|
||||||
archetypes = region_assets["Archetype ID"].unique()
|
archetypes = region_assets["Archetype ID"].unique()
|
||||||
|
|
@ -1739,7 +1739,11 @@ def propsed_wave_3_sample():
|
||||||
|
|
||||||
missed_addressids = region_assets[pd.isnull(region_assets["Confidence Tier"])]["Address ID"].unique().tolist()
|
missed_addressids = region_assets[pd.isnull(region_assets["Confidence Tier"])]["Address ID"].unique().tolist()
|
||||||
|
|
||||||
# This means that this archetype was never surveyed and so we need to find a sufficiently similar property
|
if not missed_addressids:
|
||||||
|
results.append(region_assets)
|
||||||
|
continue
|
||||||
|
|
||||||
|
# This means that this archetype was never surveyed and so we need to find a sufficiently similar property
|
||||||
final_missed_matches = []
|
final_missed_matches = []
|
||||||
for a_id in missed_addressids:
|
for a_id in missed_addressids:
|
||||||
property = asset_list[asset_list["Address ID"] == a_id].squeeze()
|
property = asset_list[asset_list["Address ID"] == a_id].squeeze()
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue