diff --git a/cornac/datasets/filmtrust.py b/cornac/datasets/filmtrust.py index 8d921416..05b2b653 100644 --- a/cornac/datasets/filmtrust.py +++ b/cornac/datasets/filmtrust.py @@ -25,7 +25,7 @@ def _get_cache_dir(): - cache_dir = get_cache_path('filmtrust')[0] + cache_dir = get_cache_path("filmtrust")[0] if not os.path.exists(cache_dir): os.makedirs(cache_dir) return cache_dir @@ -44,10 +44,14 @@ def load_feedback(reader: Reader = None) -> List: data: array-like Data in the form of a list of tuples (user, item, rating). """ - fpath = cache(url='https://www.librec.net/datasets/filmtrust.zip', - unzip=True, cache_dir=_get_cache_dir(), relative_path='ratings.txt') + fpath = cache( + url="https://static.preferred.ai/cornac/datasets/filmtrust/filmtrust.zip", + unzip=True, + cache_dir=_get_cache_dir(), + relative_path="ratings.txt", + ) reader = Reader() if reader is None else reader - return reader.read(fpath, sep=' ') + return reader.read(fpath, sep=" ") def load_trust(reader: Reader = None) -> List: @@ -63,7 +67,11 @@ def load_trust(reader: Reader = None) -> List: data: array-like Data in the form of a list of tuples (user, user, 1). """ - fpath = cache(url='https://www.librec.net/datasets/filmtrust.zip', - unzip=True, cache_dir=_get_cache_dir(),relative_path='trust.txt') + fpath = cache( + url="https://static.preferred.ai/cornac/datasets/filmtrust/filmtrust.zip", + unzip=True, + cache_dir=_get_cache_dir(), + relative_path="trust.txt", + ) reader = Reader() if reader is None else reader - return reader.read(fpath, sep=' ') + return reader.read(fpath, sep=" ")