pyart.retrieve.determine_medoids#
- pyart.retrieve.determine_medoids(medoids_dict, var_names, hydro_names, nmedoids_min=1, acceptance_threshold=0.5, kmax_iter=100, use_median=False)[source]#
Computes the final medoids from the medoids found at each iteration
- Parameters:
medoids_dict (dict) – dictionary of type dict[hydro_name]= array(niterations, nvars) containing the medoids for each hydrometeor type computed at each iteration
var_names (1D-array of str) – Name of variables
hydro_names (1D-array of str) – Name of hydrometeors
nmedoids_min (int) – Minimum number of intermediate medoids to compute an intermediate medoid
acceptance_threshold (float) – Threshold on the inter-quantile coefficient of dispersion of the medoids above which the medoid of the class is not acceptable.
use_median (bool) – If True the final medoid is compute as the median of each variable in the intermediate medoids. Otherwise is computed using the kmedoids algorithm
- Returns:
final_medoids_dict (dict) – dictionary of type dict[hydro_name]= medoids_arr containing the medoids for each hydrometeor type that has been accepted