Example #1
0
    """
    Testing case study one:
    1. Remove N percent of users from data set.
    2. Process testing set.

    Original:
    Add a user to testing set and do IBCF.

    New methodolgoy:
    Add a user to testing set, then do
        usual processing
        ICBF
    """
    #load original prefs
    original_prefs = original.load()
    
    #get the required testing set.
    mod_prefs = deleteUsers(original_prefs, 0.5)

    print deleted_users
    
    for user in deleted_users:

        new_prefs = {}
        new_prefs = copyDict(mod_prefs)
        print "Length of new_prefs %d"%(len(new_prefs))
        
        org_prefs = {}
        org_prefs = copyDict(original_prefs)
        print "Length of org_prefs %d"%(len(org_prefs))
Example #2
0
if __name__ == '__main__':
    """
    Testing case study one:
    1. Remove N percent of users from data set.
    2. Process testing set.

    Original:
    Add a user to testing set and do IBCF.

    New methodolgoy:
    Add a user to testing set, then do
        usual processing
        ICBF
    """
    #load original prefs
    original_prefs = original.load()

    #get the required testing set.
    mod_prefs = deleteUsers(original_prefs, 0.5)

    print deleted_users

    for user in deleted_users:

        new_prefs = {}
        new_prefs = copyDict(mod_prefs)
        print "Length of new_prefs %d" % (len(new_prefs))

        org_prefs = {}
        org_prefs = copyDict(original_prefs)
        print "Length of org_prefs %d" % (len(org_prefs))