To improve soft clustering, you can combine distance-based membership (locality-oriented) and outlier-based membership (cluster-oriented) using a Bayesian approach. This treats the membership vectors as probability mass functions (PMFs) and multiplies them to get a combined posterior distribution.
This method helps cluster membership follow manifolds while allowing noise points near clusters to retain some appropriate hue.
# Combining distance-based and outlier-based membership
def combined_membership_vector(point, data, tree, exemplar_dict, cluster_ids,
max_lambda_dict, point_dict, softmax=False):
raw_tree = tree._raw_tree
dist_vec = dist_membership_vector(point, exemplar_dict, data, softmax)
outl_vec = outlier_membership_vector(point, cluster_ids, raw_tree,
max_lambda_dict, point_dict, softmax)
result = dist_vec * outl_vec
result /= result.sum()
return result