thats ok but they have to work differently: So the following two functions implements…
- User
thats ok but they have to work differently: So the following two functions implements the AND ( conjunction ) and the NOT ( DISJUNCTION) OPERATION but they work with only positive values in (0, 1).
The values in u tells what values in i to take into account in the and operation, for example: i'll explain better with an example with results, considering one user (u1) with two rules, each rules is of dim=4 and more items: u1 = [1, 1, 0, 0] U2 = [0, 0, 1, 0] i1 = [0.9, 1, 0.2, 0]
U1-i1: Will give as results 1 for the first u1-i1 i.e.: [1, 1, 0, 0] choose the first two embedding of i [0.9, 1, 0.2, 0], i.e = 0.9 AND 1 = 1 (almost) 0 for the second user u2 = [0, 0, 1, 0], will choose the third element of i1 [0.9, 1, 0.2, 0] , I.e. 0.2
How can I extend them to work well with negative values i.e. ( they would be like not operation). For example, extending the and function: -1 AND -1 should give 1. -1 AND 1 should give 0. -1 AND 0 should give 0.
- Assistant