myfm.utils.benchmark_data.MovieLens10MDataManager¶
- class myfm.utils.benchmark_data.MovieLens10MDataManager(zippath: Optional[pathlib.Path] = None)[source]¶
Bases:
myfm.utils.benchmark_data.loader_base.MovieLensBase
- __init__(zippath: Optional[pathlib.Path] = None)¶
Methods
__init__
([zippath])load_rating_all
()load_rating_kfold_split
(K, fold[, random_state])Load the entire dataset and split it into train/test set.
Attributes
DEFAULT_PATH
DOWNLOAD_URL
- load_rating_kfold_split(K: int, fold: int, random_state: Optional[int] = 0) Tuple[pandas.core.frame.DataFrame, pandas.core.frame.DataFrame] ¶
Load the entire dataset and split it into train/test set. K-fold
- Parameters
K (int) – K in the K-fold splitting scheme.
fold (int) – fold index.
random_state (Union[np.RandomState, int, None], optional) – Controlls random state of the split.
- Returns
train and test dataframes.
- Return type
Tuple[pd.DataFrame, pd.DataFrame]
- Raises
ValueError – When 0 <= fold < K is not met.