Good Evening everyone,
I've been trying to figure out the most efficient way to do this, but am falling short. Here's how it goes...
I am ultimately trying to determine "like customers" based on a specific customer's buying habits and a given threshold, say 50%. IE customer 1 purchased products A,B,C,D ... customer 2 purchased B,C,D,E ... these two customers are >= 50% "likeness" so they should be matched.
My schema is as would be expected
CLIENT (1 ----- many) CLIENT_PURCHASE (1 -------many) PRODUCT
*clientID *clientID *prodID *prodID
For now I am ignoring the threshold and simply am trying to find customers who have purchased any item within customer 1's history via a linq subquery. I think I have this working with the following two queries:
var clientOneHistory = (from cp in client.Client_Purchase |
So my ultimate question is, "How do I work in the threshold portion?"
Suthish NairPosted Nov 3, 2010, 12:09 PM
Am not sure how you maintaining the threshold portion part.
You need a kind of mapping table (threshold ==> prodID).
For example, out of ABCD if you found BCD then the threshold mapping is 30% or CD then 20% like this..
Or, wait for more efficient replys which will help you out..