Hello there. Can you help me, please. I was confused to make PHP code about adjusted cosine similarity. I have build data like this : $data[UserID][ItemID] = Rating
data example : $data[1][1] = 5; $data[1][2] = 3; $data[1][3] = 4; $data[2][1] = 3; $data[2][2] = 2; $data[2][4] = 3; $data[2][5] = 3; $data[3][1] = 4; $data[3][3] = 3; $data[3][5] = 5; $data[4][1] = 1; $data[4][2] = 4; $data[4][4] = 2; $data[4][5] = 1; $data[5][3] = 4; $data[5][4] = 3;
If anyone can help me to build the function of this? The function to calculate the adjusted cosine of 2 items. like adjusted_cosine(itemID1,itemID2).
You're help is very helping me. Thanks before.