Skip to content

boostcampaitech4lv23recsys1/level2_movierecommendation_recsys-level3-recsys-02

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

37 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

LEVEL3 U Stage - Movie Recommendation

image

๋ชฉ์ฐจ

ํŒ€์› ์†Œ๊ฐœ

์ตœ์ข… ๊ฒฐ๊ณผ

ํ”„๋กœ์ ํŠธ ๊ฐœ์š”

ํ”„๋กœ์ ํŠธ ๊ตฌ์กฐ

์„ค์น˜ ๋ฐ ์‹œ์ž‘

2๏ธโƒฃ RecSys_2์กฐ 2๏ธโƒฃ

ํŒ€์› ์†Œ๊ฐœ

๊น€๋™์˜_4028 ๋ฏผ๋ณต๊ธฐ_T4074 ๋ฐ•๊ฒฝ์ค€_T4076 ์˜คํฌ์ •_T4129 ์šฉํฌ์›_T4130
ย 

์ตœ์ข… ๊ฒฐ๊ณผ

  • public

แ„‰แ…ณแ„แ…ณแ„…แ…ตแ†ซแ„‰แ…ฃแ†บ 2023-01-07 แ„‹แ…ฉแ„’แ…ฎ 2 34 32

  • private

แ„‰แ…ณแ„แ…ณแ„…แ…ตแ†ซแ„‰แ…ฃแ†บ 2023-01-07 แ„‹แ…ฉแ„’แ…ฎ 2 34 54

ํ”„๋กœ์ ํŠธ ๊ฐœ์š”

  • ํ”„๋กœ์ ํŠธ ์ฃผ์ œ

    ์‚ฌ์šฉ์ž์˜ ์˜ํ™” ์‹œ์ฒญ ์ด๋ ฅ ๋ฐ์ดํ„ฐ๋ฅผ ๋ฐ”ํƒ•์œผ๋กœ ์‚ฌ์šฉ์ž๊ฐ€ ๋‹ค์Œ์— ์‹œ์ฒญํ•  ์˜ํ™” ๋ฐ ์ข‹์•„ํ•  ์˜ํ™”๋ฅผ ์˜ˆ์ธกํ•˜๋Š” ๊ฒƒ

    • timestamp๋ฅผ ๊ณ ๋ คํ•œ ์‚ฌ์šฉ์ž์˜ ์ˆœ์ฐจ์ ์ธ ์ด๋ ฅ
    • implicit feedback
    • ์•„์ดํ…œ (์˜ํ™”)๊ณผ ๊ด€๋ จ๋œ content (side-information)์˜ ํ™œ์šฉ๋ฐฉ์•ˆ
  • ํ”„๋กœ์ ํŠธ ๊ฐœ์š”

    • input:ย user์˜ implicit ๋ฐ์ดํ„ฐ, item(movie)์˜ meta๋ฐ์ดํ„ฐ
    • output:ย user์—๊ฒŒ ์ถ”์ฒœํ•˜๋Š” item์„ user, item์ด ','๋กœ ๊ตฌ๋ถ„๋œ ํŒŒ์ผ(csv) ๋กœ ์ œ์ถœ
    • metrics : normalized Recall@K
  • ๋ฐ์ดํ„ฐ์…‹

    • ์›๋ณธ ๋ฐ์ดํ„ฐ๊ฐ€ ์žˆ๋‹ค๋ฉด ํŠน์ • ์‹œ์  ์ดํ›„์˜ ๋ฐ์ดํ„ฐ (sequential)์™€ ํŠน์ • ์‹œ์  ์ด์ „์˜ ์ผ๋ถ€ ๋ฐ์ดํ„ฐ(static) ๋ฐ์ดํ„ฐ๋ฅผ ์ž„์˜๋กœ ์ถ”์ถœํ•˜์—ฌ, ์ •๋‹ต (ground-truth) ๋ฐ์ดํ„ฐ๋กœ ์‚ฌ์šฉ

    • ๋ฐ์ดํ„ฐ์…‹ ๊ตฌ์กฐ

      train
      โ”œโ”€โ”€ Ml_item2attributes.json      # item๊ณผ genre์˜ mapping ๋ฐ์ดํ„ฐ
      โ”œโ”€โ”€ directors.tsv                # item, director
      โ”œโ”€โ”€ genres.tsv                   # item, genre -> 1:N
      โ”œโ”€โ”€ titles.tsv                   # item, title
      โ”œโ”€โ”€ train_ratings.csv            # user, item, timestamp
      โ”œโ”€โ”€ writers.tsv                  # item, writer
      โ””โ”€โ”€ years.tsv                    # item, year

ํ”„๋กœ์ ํŠธ ๊ตฌ์กฐ

  • ๋ฒ ์ด์Šค๋ผ์ธ ๊ตฌ์กฐ (๋Œ€ํšŒ ์ œ๊ณต )

    image

    code
    โ”œโ”€โ”€ datasets.py                        #
    โ”‚    โ”œโ”€โ”€ PretrainDataset
    โ”‚    โ””โ”€โ”€ SASRecDataset
    โ”‚
    โ”œโ”€โ”€ models.py                          #
    โ”‚    โ””โ”€โ”€ S3RecModel
    โ”œโ”€โ”€ modules.py                         #
    โ”‚    โ”œโ”€โ”€ LayerNorm
    โ”‚    โ”œโ”€โ”€ Embeddings
    โ”‚    โ”œโ”€โ”€ SelfAttention
    โ”‚    โ”œโ”€โ”€ Intermediate
    โ”‚    โ”œโ”€โ”€ Layer
    โ”‚    โ””โ”€โ”€ Encoder
    โ”‚
    โ”œโ”€โ”€ trainers.py                        #
    โ”‚    โ”œโ”€โ”€ Trainer
    โ”‚    โ”œโ”€โ”€ PretrainTrainer
    โ”‚    โ””โ”€โ”€ FinetuneTrainer
    โ”‚
    โ”œโ”€โ”€ inference.py                       #
    โ”‚
    โ”œโ”€โ”€ preprocessing.py                   #
    โ”œโ”€โ”€ utils.py                           #
    โ”‚
    โ”œโ”€โ”€ run_pretrain.py                    #
    โ”œโ”€โ”€ run_train.py                       #
    โ”œโ”€โ”€ sample_submission.ipynb            #
    โ”œโ”€โ”€ requirements.txt                   #
    โ””โ”€โ”€ output
      โ””โ”€โ”€ most_popular_submission.csv
  • RecBole ๋ฒ ์ด์Šค๋ผ์ธ ๊ตฌ์กฐ

์„ค์น˜ ๋ฐ ์‹œ์ž‘

  • ๋ฒ ์ด์Šค๋ผ์ธ

    ### Installation
    conda create -n movie_rec
    conda activate movie_rec
    pip install -r requirements.txt
    
    ### Pretraining
    python run_pretrain.py
    
    ### Fine-tuning (Main Training)
    # without pre-trained weight
    python run_train.py
    # with pre-trained weight
    python run_train.py --using_pretrain
    
    ### Inference
    python inference.py
  • RecBole

About

๐Ÿ“š Boostcamp AI Tech 4th - Movie Recommedation Contest

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •