English 中文(简体)
A. 现实世界:衡量投入价值的独特性
原标题:Real world Algorithm - Measuring uniqueness of input values

I have a list of key value pairs. For each key, I want to see how unique the values are. For example, for a particular key k1, all the values might be the same. (best case). For a key k2, half of the values are one type and the other half are different. . . Similarly, for a key kx, none of the values match (worst case).

我想根据以上所述,对每个关键人物进行排名(或百分比,无论大小),并作出最后命令,以便我能够筛选出具有许多不同价值(超标等级或百分比)的人。

I somehow think this is somewhat related to some concepts I learned in my data mining course, but just cannot recall effectively.

感谢。

最佳回答

或许可以为此使用

For each key, you could compute the entropy of the values. The higher the entropy, the more diverse the key s values are. You could use that to rank the keys.

以下条款讨论了一些相关专题:。 计算数据采矿的Entropy

问题回答




相关问题
Spring Properties File

Hi have this j2ee web application developed using spring framework. I have a problem with rendering mnessages in nihongo characters from the properties file. I tried converting the file to ascii using ...

Logging a global ID in multiple components

I have a system which contains multiple applications connected together using JMS and Spring Integration. Messages get sent along a chain of applications. [App A] -> [App B] -> [App C] We set a ...

Java Library Size

If I m given two Java Libraries in Jar format, 1 having no bells and whistles, and the other having lots of them that will mostly go unused.... my question is: How will the larger, mostly unused ...

How to get the Array Class for a given Class in Java?

I have a Class variable that holds a certain type and I need to get a variable that holds the corresponding array class. The best I could come up with is this: Class arrayOfFooClass = java.lang....

SQLite , Derby vs file system

I m working on a Java desktop application that reads and writes from/to different files. I think a better solution would be to replace the file system by a SQLite database. How hard is it to migrate ...

热门标签