A new class of weighted similarity indices using polytomous variables