I have to rank records which have categorical data based on similarity to each other. For example- For a given record I want to rank all other records based on its similarity( A more similar item is having same values of all categorical value as same). Since data is categorical I am using Gowers Metric to calculate similarity as distance.
c=gower.gower_topn(empr[0:1,:], empe[:,:], n = 10)
d=c["index"]
print(empe[d]
My question is, i want to rank my records also on the priority of different columns. Say I want to give preference to the first column i.e. if there is a conflict between any columns to give precedence, i would want to choose based on the value of first column.
In other words, feature weight should be given while prioritizing data
question from:
https://stackoverflow.com/questions/65833016/how-to-rank-a-record-based-on-gowers-similarity-if-we-want-to-get-ranking-based 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…