Classification by a proximity matrix