Replies: 1 comment
-
|
You can use code from paragraph 4 (https://www.kaggle.com/code/astrung/recbole-lstm-sequential-for-recomendation-tutorial) |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
What is the correct configuration for an FM (context-aware recommender) to produce the top k results. Below is my code and configuration file.
CONFIG
dataset config : General Recommendation
USER_ID_FIELD: user_id
ITEM_ID_FIELD: item_id
load_col:
inter: ['user_id', 'item_id', 'rating', 'timestamp']
user: ['user_id', 'age', 'gender', 'occupation']
item: ['item_id', 'release_year', 'class']
model config
embedding_size: 10
Training and evaluation config
epochs: 10
train_batch_size: 4096
eval_batch_size: 4096
train_neg_sample_args:
distribution: uniform
sample_num: 1
alpha: 1.0
dynamic: False
candidate_num: 0
eval_args:
split: {'RS':[0.8,0.1,0.1]}
order: RO
group_by: ~
mode: labeled
metrics: ['Recall', 'MRR', 'NDCG', 'Hit', 'Precision']
topk: 10
valid_metric: MRR@10
metric_decimal_place: 4
CODE
from logging import getLogger
from recbole.config import Config
from recbole.data import create_dataset, data_preparation
from recbole.model.context_aware_recommender import FM
from recbole.trainer import Trainer
from recbole.utils import init_seed, init_logger
from recbole.quick_start.quick_start import load_data_and_model
from recbole.quick_start import run_recbole
if name == 'main':
When the last three lines of the config file were changed to the below the code was working properly but the results were not top k.
train_neg_sample_args: ~
metrics: ['AUC', 'LogLoss']
valid_metric: AUC
Beta Was this translation helpful? Give feedback.
All reactions