Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
367 views
in Technique[技术] by (71.8m points)

arrays - How to rank a record based on gowers similarity, if we want to get ranking based on weights on columns?

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

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)
Waitting for answers

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

2.1m questions

2.1m answers

60 comments

57.0k users

...