# How are my neighbors calculated?

The neighbors are calculated by picking the users with the highest compatibility rating. The exact formula used to determine the compatibility rating of a user with you is as follows:

compatiblityRating(U) = CS(U) × SW + CF(U) × FW + CD(U) × DW

Where:

**U**: The user to compare yourself to**S**: Number of movies seen by you**SU**: Number of movies seen by the other user**F**: Number of movies marked as favorite by you**FU**: Number of movies marked as favorite by the other user**D**: Number of movies marked as didn't liked by you**DU**: Number of movies marked as didn't liked by the other user**SS(U)**: Number of movies seen by you and user U**SF(U)**: Number of movies marked as a favorite by you and user U**SD(U)**: Number of movies marked as a didn't liked by you and user U**SSP(U)**: Percentage of number of seen movies shared = (SS(U) / S) * 100 if S > 0; 0 if S = 0**SSPU(U)**: Percentage of number of shared seen movies = (SS(U) / SU) * 100 if SU > 0; 0 if SU = 0**SSF(U)**: Percentage of number of favorite movies shared = (SF(U) / F) * 100 if F > 0; 0 if F = 0**SSFU(U)**: Percentage of number of favorite movies shared = (SF(U) / FU) * 100 if FU > 0; 0 if FU = 0**SSD(U)**: Percentage of number of not liked movies shared = (SF(U) / F) * 100 if D > 0; 0 if D = 0**SSFD(U)**: Percentage of number of not liked movies shared = (SD(U) / DU) * 100 if DU > 0; 0 if DU = 0**SC**: Scale factor = 0.3**MSC**: Maximum scaled value = 100^SC**SSSP(U)**: Scaled percentage of number of seen movies shared = ((SSP(U)^SC) / MSC) × 100**SSSPU(U)**: Scaled percentage of number of other user's shared seen movies = ((SSPU(U)^SC) / MSC) × 100**SSSF(U)**: Scaled percentage of number of favorite movies shared = ((SSF(U)^SC) / MSC) × 100**SSSFU(U)**: Scaled percentage of number of other user's shared favorite movies = ((SSFU(U)^SC) / MSC) × 100**SSSD(U)**: Scaled percentage of number of not liked movies shared = ((SSD(U)^SC) / MSC) × 100**SSSDU(U)**: Scaled percentage of number of other user's shared not liked movies = ((SSDU(U)^SC) / MSC) × 100**CS(U)**: Corrected seen movies percentage = (SSSP(U) * SSSPU(U)) / 100 if SSSP(U) < 100; 100 if SSSP(U) = 100**CF(U)**: Corrected favorite movies percentage = (SSSF(U) * SSSFU(U)) / 100 if SSSF(U) < 100; 100 if SSSF(U) = 100**CD(U)**: Corrected not liked movies percentage = (SSSD(U) * SSSDU(U)) / 100 if SSSD(U) < 100; 100 if SSSD(U) = 100**SW**: Weight applied to seen movies percentage = 0.2 if F > 0; 1.0 if F = 0 and D = 0; 0.6 if F = 0 or D = 0**FW**: Weight applied to favorite movies percentage = 0.4 if S > 0; 1.0 if S = 0 and D = 0; 0.6 if S = 0**DW**: Weight applied to not liked movies percentage = 0.4 if D > 0