prmr / Creco

Recommendation System for Consumer Products
Apache License 2.0
6 stars 2 forks source link

Attribute Ranking Enhancement #95

Closed asutcl closed 10 years ago

asutcl commented 10 years ago

As discussed in #79.

I have added the feature that you can pass a TypedValue to a scored attribute and get the ranking of that value within that attribute according to the correlation score for nominals(boolean, string) and according to the value for numerics (if two numerics have the same value this will return the same rank).

For booleans, I don't think the rank should be showed but it can be used to know if true or false is better for the attribute in question.

I've made an Issue for this because I have need to do a bit of debuggin and testing but if anyone wants acces to the interface you can look at the method signature in branch attribute_ranking_enhancement @MariamN

asutcl commented 10 years ago

ScoredAttribute.getValueRank(TypedValue) returns the rank of the TypedValue within the attribute, throws an IllegalArgumentError is the value is incompatible ScoredAttribute.getValueScore(TypedValue) returns the score of the TypedValue within the attribute, throws an IllegalArgumentError is the value is incompatible

read javadoc comments for more details