Pinch ratio clustering and classification in the sklearn framework