algorithms/userSimilarity.py
def keyOnUserPair(item_id,user_and_rating_pair):
    ''' 
    Convert each item and co_rating user pairs to a new vector
    keyed on the user pair ids, with the co_ratings as their value. 
    '''
    (user1_with_rating,user2_with_rating) = user_and_rating_pair
    user1_id,user2_id = user1_with_rating[0],user2_with_rating[0]
    user1_rating,user2_rating = user1_with_rating[1],user2_with_rating[1]
    return (user1_id,user2_id),(user1_rating,user2_rating)
 
    Convert each item and co_rating user pairs to a new vector
    keyed on the user pair ids, with the co_ratings as their value. 
    
Convert each item and co_rating user pairs to a new vector
keyed on the user pair ids, with the co_ratings as their value.
Convert each item and co_rating user pairs to a new vector keyed on the user pair ids with the co_ratings as their value .
def keyOnUserPair(item_id,user_and_rating_pair):
    (user1_with_rating,user2_with_rating) = user_and_rating_pair
    user1_id,user2_id = user1_with_rating[0],user2_with_rating[0]
    user1_rating,user2_rating = user1_with_rating[1],user2_with_rating[1]
    return (user1_id,user2_id),(user1_rating,user2_rating)
def keyOnUserPair ( item_id , user_and_rating_pair ) : ( user1_with_rating , user2_with_rating ) = user_and_rating_pair user1_id , user2_id = user1_with_rating [ 0 ] , user2_with_rating [ 0 ] user1_rating , user2_rating = user1_with_rating [ 1 ] , user2_with_rating [ 1 ] return ( user1_id , user2_id ) , ( user1_rating , user2_rating )
Convert each item and co_rating user pairs to a new vector
keyed on the user pair ids, with the co_ratings as their value.
Convert each item and co_rating user pairs to a new vector keyed on the user pair ids with the co_ratings as their value .
''' 
    Convert each item and co_rating user pairs to a new vector
    keyed on the user pair ids, with the co_ratings as their value. 
    '''
item_id
user_and_rating_pair