brails.inferers.hazus_inferer.hazus_inferer module
- class brails.inferers.hazus_inferer.hazus_inferer.HazusInferer(input_inventory, n_possible_worlds=1, include_features=['ReplacementCost', 'StructureType'], seed=1, overwirte_existing=True, yearBuilt_key='YearBuilt', occupancyClass_key='OccupancyClass', numberOfStories_key='NumberOfStories', income_key='Income', planArea_key='PlanArea', splitLevel_key='SplitLevel', garageType_key='GarageType', constructionClass_key='ConstructionClass', structureType_key='StructureType', replacementCost_key='ReplacementCost')
Bases:
InferenceEngine
Make inference based on Hazus 6 rulesets
Attributes:
Methods:
- add_features_to_asset(new_prop, structureType_key, structure_types, weights, n_pw, n_bldg_subset, global_asset_indices)
- check_keys(needed_keys, target_key, inventory, optional_needed_keys=[])
- flatten_array(arr)
- get_replacement_cost(input_inventory, income_key, occupancyClass_key, numberOfStories_key, planArea_key, splitLevel_key, garageType_key, constructionClass_key, n_pw, replacementCost_key)
- get_str_from_occ(input_inventory, yearBuilt_key, occupancyClass_key, numberOfStories_key, n_pw, structureType_key)
- infer()
Infer and add new features for each asset in the inventory.
- Parameters:
input_inventory (AssetInventory) – The inventory of assets to process.
- Returns:
A new or updated inventory with additional inferred features.
- Return type:
- merge_two_json(A, B, shrink=False)
- modulate_occ(s)
- modulate_weights(weights, structure_types, region, occ, year_class, height)