I have a set of 4-dimensional feature vectors, V1 { D1, D2, D3, D4 }, ... Vn { D1, ... D4 }
on which, given a query, Q1 { D1, ... D4 }
I am calculating a distance metric between Q1
and each of V1 ... Vn
to determine similarity. I return the 5 nearest neighbors as my recommendations and this is working okay.
I also have vectors of users who have expressed a preference for certain feature vectors. So U1 { V1, V2 }, U2 { V1, V8 }, U3 { V1, V2, V4, V8 },
etc.
I'm stuck on how to reconcile both systems so that given Ui { V1, ... Vn }
and Vn { D1, ... D4 }
my recommendation engine returns a refined set of neighbors particular to Ui
.
My first thought is to take each V liked by Ui as a separate query, return those recommendations, and then merge the result sets to find the 5 nearest neighbors. But Ui can have many members, and Vn can be very large so that seems expensive and probably not the optimal solution.
I haven't been able to find any resources on this but perhaps I'm using the wrong terms. I hope I've used the notation correctly and explained this clearly, I'm learning as I go along.