check_probability_distribution_sum#
- check_probability_distribution_sum(location, property_name, tolerance=0.01, valid_properties=None, **kwargs)[source]#
Check that fields representing probability distributions have sums equal to 1 within some tolerance.
- Parameters:
location (json) – the json object with location data
property_name (str) – the property name
tolerance (float) – difference from the sum of 1 tolerated
valid_properties (str or list) – a list of the valid probability distributions
kwargs (dict) – dictionary of values passed to np.isclose()
- Returns:
[True, None] if the sum of the probability distribution is equal to 1 within the tolerance level. [False, str] else. The returned str is the error message with some information about the check.