LocationClosestGranularity Class
Defines a closest location granularity.
_cord_count
is the count of customer data after duplicates are dropped. If it's bigger
than _cord_limit
, the _lower_fuzzy_boundary
is used to do the rough
filtering, otherwise, _upper_fuzzy_boundary
is used.
All possible locations will be ranked by spherical distance of two
locations, the _closest_top_n
are selected to do further joins.
Initialize with various configs.
cord_count is the count of customer_data after dropDuplicates(), if it's bigger than _cord_limit, we'll use _lower_fuzzy_boundary to do the rough filtering, otherwise, use _upper_fuzzy_boundary. all possible locations will be ranked by spherical distance of two locations, we'll select _closest_top_n to do further join.
- Inheritance
-
LocationClosestGranularity
Constructor
LocationClosestGranularity(_cord_limit=5, _lower_fuzzy_boundary=2, _upper_fuzzy_boundary=5, _closest_top_n=1)
Parameters
Name | Description |
---|---|
_cord_limit
|
The count of customer data after dropping duplicates. The default is 5. Default value: 5
|
_lower_fuzzy_boundary
|
Lower bound for filtering. The default is 2 Default value: 2
|
_upper_fuzzy_boundary
|
Upper bound for filtering. The default is 5 Default value: 5
|
_closest_top_n
|
How many of the top matches to consider closest. The default is 1. The bigger the value, the more time cost. Default value: 1
|
_cord_limit
Required
|
default is 5 |
_lower_fuzzy_boundary
Required
|
default is 2 |
_upper_fuzzy_boundary
Required
|
default is 5 |
_closest_top_n
Required
|
default is 1, the bigger, the more time cost. |
Methods
get_log_property |
Get log property tuple, None if no property. |
get_log_property
Get log property tuple, None if no property.
get_log_property()