|
|
@ -30,6 +30,9 @@ __all__ = [
|
|
|
|
|
|
|
|
|
|
|
|
age_table = [1, 18, 25, 35, 45, 50, 56]
|
|
|
|
age_table = [1, 18, 25, 35, 45, 50, 56]
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
URL = 'http://files.grouplens.org/datasets/movielens/ml-1m.zip'
|
|
|
|
|
|
|
|
MD5 = 'c4d9eecfca2ab87c1945afe126590906'
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
class MovieInfo(object):
|
|
|
|
class MovieInfo(object):
|
|
|
|
def __init__(self, index, categories, title):
|
|
|
|
def __init__(self, index, categories, title):
|
|
|
@ -77,10 +80,7 @@ USER_INFO = None
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def __initialize_meta_info__():
|
|
|
|
def __initialize_meta_info__():
|
|
|
|
fn = download(
|
|
|
|
fn = download(URL, "movielens", MD5)
|
|
|
|
url='http://files.grouplens.org/datasets/movielens/ml-1m.zip',
|
|
|
|
|
|
|
|
module_name='movielens',
|
|
|
|
|
|
|
|
md5sum='c4d9eecfca2ab87c1945afe126590906')
|
|
|
|
|
|
|
|
global MOVIE_INFO
|
|
|
|
global MOVIE_INFO
|
|
|
|
if MOVIE_INFO is None:
|
|
|
|
if MOVIE_INFO is None:
|
|
|
|
pattern = re.compile(r'^(.*)\((\d+)\)$')
|
|
|
|
pattern = re.compile(r'^(.*)\((\d+)\)$')
|
|
|
@ -205,5 +205,9 @@ def unittest():
|
|
|
|
print train_count, test_count
|
|
|
|
print train_count, test_count
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def download():
|
|
|
|
|
|
|
|
paddle.v2.dataset.common.download(URL, "movielens", MD5)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if __name__ == '__main__':
|
|
|
|
if __name__ == '__main__':
|
|
|
|
unittest()
|
|
|
|
unittest()
|
|
|
|