Module Import alias identifier Import alias ImportFrom alias ClassDef bases body FunctionDef arguments args NameParam defaults body Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr ListLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr ListLoad Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr ListLoad Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr ListLoad Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr ListLoad Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr ListLoad Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr ListLoad decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore TupleLoad AttributeLoad NameLoad attr Assign NameStore TupleLoad AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr keyword NameLoad keyword AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr keyword NameLoad keyword AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr keyword NameLoad Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr keyword NameLoad Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr keyword NameLoad keyword AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr keyword NameLoad keyword AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam NameParam defaults body Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr BinOpAdd Call AttributeLoad NameLoad attr SubscriptLoad NameLoad ExtSlice Slice Index AttributeLoad NameLoad attr Num Assign AttributeStore NameLoad attr BinOpAdd Call AttributeLoad NameLoad attr SubscriptLoad NameLoad ExtSlice Slice Index AttributeLoad NameLoad attr Num decorator_list FunctionDef arguments args NameParam defaults body If CompareEq AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr ListLoad body Raise Call NameLoad Str orelse Expr Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Assign TupleStore NameStore NameStore Call NameLoad keyword SubscriptLoad AttributeLoad NameLoad attr ExtSlice Slice Index AttributeLoad NameLoad attr keyword SubscriptLoad AttributeLoad NameLoad attr ExtSlice Slice Index AttributeLoad NameLoad attr Assign NameStore Call NameLoad keyword AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr Call NameLoad keyword NameLoad keyword NameLoad keyword NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Call NameLoad keyword SubscriptLoad AttributeLoad NameLoad attr ExtSlice Slice Index AttributeLoad NameLoad attr keyword SubscriptLoad AttributeLoad NameLoad attr ExtSlice Slice Index AttributeLoad NameLoad attr keyword AttributeLoad NameLoad attr Assign TupleStore NameStore NameStore Call NameLoad keyword SubscriptLoad AttributeLoad NameLoad attr ExtSlice Slice Index AttributeLoad NameLoad attr keyword NameLoad Assign NameStore BinOpDiv Call AttributeLoad NameLoad attr NameLoad Call AttributeLoad NameLoad attr NameLoad If CompareEq NameLoad AttributeLoad NameLoad attr body Raise Call NameLoad Str Assign AttributeStore NameLoad attr Call NameLoad keyword NameLoad keyword NameLoad keyword NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body If CompareEq AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr ListLoad body Raise Call NameLoad Str If CompareEq AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr ListLoad body Raise Call NameLoad Str Assign NameStore SubscriptLoad AttributeLoad NameLoad attr Index NameLoad Assign NameStore SubscriptLoad AttributeLoad NameLoad attr Index NameLoad Return BinOpAdd NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Assign AttributeStore NameLoad attr ListLoad Expr Call AttributeLoad NameLoad attr NameLoad keyword Call NameLoad NameLoad Str decorator_list decorator_list FunctionDef arguments args NameParam NameParam defaults body If CompareNotEq AttributeLoad NameLoad attr AttributeLoad NameLoad attr body Raise Call NameLoad Str Assign NameStore BinOpAdd Call AttributeLoad NameLoad attr NameLoad Num Assign NameStore Call NameLoad NameLoad NameLoad Assign NameStore Call AttributeLoad NameLoad attr keyword TupleLoad NameLoad keyword AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr keyword TupleLoad NameLoad keyword AttributeLoad NameLoad attr For TupleStore NameStore NameStore NameLoad body AugAssignAdd SubscriptStore NameLoad Index NameLoad NameLoad AugAssignAdd SubscriptStore NameLoad Index NameLoad Num Return TupleLoad NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body Assign NameStore Call AttributeLoad NameLoad attr keyword AttributeLoad NameLoad attr keyword AttributeLoad NameLoad attr For TupleStore NameStore NameStore Call NameLoad NameLoad body AugAssignAdd SubscriptStore NameLoad Index NameLoad BinOpSub NameLoad SubscriptLoad NameLoad Index SubscriptLoad NameLoad Index NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body Return Call AttributeLoad NameLoad attr ListComp BinOpDiv BinOpAdd BinOpMult NameLoad AttributeLoad NameLoad attr SubscriptLoad NameLoad Index NameLoad BinOpAdd AttributeLoad NameLoad attr SubscriptLoad NameLoad Index NameLoad comprehension NameStore Call NameLoad Call NameLoad NameLoad keyword AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Return Call AttributeLoad NameLoad attr SubscriptLoad NameLoad ExtSlice Slice Index AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Assign NameStore Call NameLoad NameLoad Str Assign NameStore Call AttributeLoad NameLoad attr NameLoad Return NameLoad decorator_list
N/A N/A numpy np N/A pickle utils constants DataStats N/A N/A __init__ N/A N/A self N/A N/A N/A N/A self data_set N/A N/A np array N/A N/A N/A self num_users None N/A N/A self num_movies None N/A N/A self global_average None N/A N/A self movie_averages N/A N/A np array N/A N/A N/A self movie_rating_count N/A N/A np array N/A N/A N/A self movie_rating_sum N/A N/A np array N/A N/A N/A self user_offsets N/A N/A np array N/A N/A N/A self user_rating_count N/A N/A np array N/A N/A N/A self user_offsets_sum N/A N/A np array N/A N/A init_movie_and_user_arrays N/A N/A self N/A N/A N/A movies_1d N/A N/A self num_movies N/A users_1d N/A N/A self num_movies N/A N/A self movie_averages N/A N/A np zeros shape movies_1d dtype N/A np float32 N/A N/A self movie_rating_count N/A N/A np zeros shape movies_1d dtype N/A np int32 N/A N/A self movie_rating_sum N/A N/A np zeros shape movies_1d N/A N/A self user_offsets_sum N/A N/A np zeros shape users_1d N/A N/A self user_offsets N/A N/A np zeros shape users_1d dtype N/A np float32 N/A N/A self user_rating_count N/A N/A np zeros shape users_1d dtype N/A np int32 N/A load_data_set N/A N/A self data_set N/A N/A N/A N/A self data_set data_set N/A N/A self num_users N/A N/A N/A np amax N/A data_set N/A N/A N/A N/A constants USER_INDEX 1 N/A N/A self num_movies N/A N/A N/A np amax N/A data_set N/A N/A N/A N/A constants MOVIE_INDEX 1 N/A compute_stats N/A N/A self N/A N/A N/A N/A N/A self data_set N/A N/A np array N/A N/A N/A N/A Exception No Data set loaded. Please use DataStats.load_data_set(data_set) to load a data set before calling compute_stats N/A N/A N/A N/A self init_movie_and_user_arrays N/A N/A N/A self compute_movie_stats N/A N/A N/A self compute_user_stats N/A compute_movie_stats N/A N/A self N/A N/A N/A N/A simple_sum simple_count N/A compute_simple_indexed_sum_and_count data_values N/A N/A self data_set N/A N/A N/A N/A constants RATING_INDEX data_indices N/A N/A self data_set N/A N/A N/A N/A constants MOVIE_INDEX N/A global_average N/A compute_global_average_rating data_set N/A self data_set N/A N/A self movie_averages N/A compute_blended_indexed_averages simple_sum simple_sum simple_count simple_count global_average global_average N/A N/A self movie_rating_count simple_count N/A N/A self movie_rating_sum simple_sum N/A N/A self global_average global_average N/A compute_user_stats N/A N/A self N/A N/A N/A simple_offsets N/A compute_offsets data_indices N/A N/A self data_set N/A N/A N/A N/A constants MOVIE_INDEX data_values N/A N/A self data_set N/A N/A N/A N/A constants RATING_INDEX averages N/A self movie_averages N/A N/A simple_sum simple_count N/A compute_simple_indexed_sum_and_count data_indices N/A N/A self data_set N/A N/A N/A N/A constants USER_INDEX data_values simple_offsets N/A user_offset_global_average N/A N/A N/A np sum simple_sum N/A N/A np sum simple_count N/A N/A user_offset_global_average N/A np nan N/A N/A N/A Exception Error NaN in global average of offsets N/A N/A self user_offsets N/A compute_blended_indexed_averages simple_sum simple_sum simple_count simple_count global_average user_offset_global_average N/A N/A self user_offsets_sum simple_sum N/A N/A self user_rating_count simple_count N/A get_baseline N/A N/A self user movie N/A N/A N/A N/A N/A self movie_averages N/A N/A np array N/A N/A N/A N/A Exception Cannot get baseline: Missing Movie averages! N/A N/A N/A self user_offsets N/A N/A np array N/A N/A N/A N/A Exception Cannot get baseline: Missing user offsets! N/A mov_avg N/A N/A self movie_averages N/A movie N/A usr_off N/A N/A self user_offsets N/A user N/A N/A mov_avg usr_off N/A write_stats_to_file N/A N/A self file_path N/A N/A N/A N/A self data_set N/A N/A N/A N/A pickle dump self file N/A open file_path wb N/A N/A compute_simple_indexed_sum_and_count N/A N/A data_indices data_values N/A N/A N/A N/A N/A data_indices shape N/A data_values shape N/A N/A N/A ValueError Error! Shapes of index array and data array are not the same! N/A array_length N/A N/A N/A np amax data_indices 1 N/A data N/A zip data_indices data_values N/A indexed_sum N/A N/A np zeros shape N/A array_length dtype N/A np float32 N/A indexed_count N/A N/A np zeros shape N/A array_length dtype N/A np int32 N/A N/A index value data N/A N/A N/A indexed_sum N/A index value N/A N/A indexed_count N/A index 1 N/A N/A indexed_sum indexed_count N/A compute_offsets N/A N/A data_values data_indices averages N/A N/A N/A offsets N/A N/A np zeros shape N/A data_values shape dtype N/A np float32 N/A N/A index value N/A enumerate data_values N/A N/A N/A offsets N/A index N/A value N/A averages N/A N/A data_indices N/A index N/A offsets N/A compute_blended_indexed_averages N/A N/A simple_sum simple_count global_average N/A N/A N/A N/A N/A np array N/A N/A N/A N/A global_average N/A constants BLENDING_RATIO N/A simple_sum N/A i N/A N/A constants BLENDING_RATIO N/A simple_count N/A i N/A i N/A range N/A len simple_sum dtype N/A np float32 N/A compute_global_average_rating N/A N/A data_set N/A N/A N/A N/A N/A np mean N/A data_set N/A N/A N/A N/A constants RATING_INDEX N/A load_stats_from_file N/A N/A file_path N/A N/A N/A pickle_file N/A open file_path rb N/A stats_object N/A N/A pickle load pickle_file N/A stats_object N/A