level2_klue-nlp-06 created by GitHub Classroom
μκ°μ | κΉμ§ν | κΉλ―ΌνΈ | κΉμ±μ | νμν |
- κ΄κ³ μΆμΆ(Relation Extraction)μ λ¬Έμ₯μ λ¨μ΄(Entity)μ λν μμ±κ³Ό κ΄κ³λ₯Ό μμΈ‘νλ λ¬Έμ μ΄λ€. κ΄κ³ μΆμΆμ μ§μ κ·Έλν ꡬμΆμ μν ν΅μ¬ κ΅¬μ± μμλ‘, ꡬ쑰νλ κ²μ, κ°μ λΆμ, μ§λ¬Έ λ΅λ³νκΈ°, μμ½κ³Ό κ°μ μμ°μ΄μ²λ¦¬ μμ© νλ‘κ·Έλ¨μμ μ€μνλ€.
- λνμ λͺ©νλ λ¬Έμ₯ λ΄ λ λ¨μ΄(entity)μ κ΄κ³λ₯Ό νμ νμ¬ 30κ°μ§μ Labelλ‘ μ λΆλ₯νλ λͺ¨λΈμ νμ΅μν€λ κ²μ΄λ€.
- train.csv : μ΄ 32470κ°
- test_data.csv : μ΄ 7765κ°
- Label : μ΄ 30κ°μ class
- KLUE-RE evaluation metricμ κ·Έλλ‘ μ¬μ©νλ©°, λ μ€ micro F1 scoreκ° μ°μ μλ¨.
-
no_relation classλ₯Ό μ μΈν micro F1 score
$\mathrm{Recall} = \frac{\mathrm{TP}}{\mathrm{TP}+\mathrm{FN}}$ $\mathrm{Precision} = \frac{\mathrm{TP}}{\mathrm{TP}+\mathrm{FP}}$ $\mathrm{F1 \ score} = 2 \times\frac{\mathrm{Precision} \times \mathrm{Recall}}{\mathrm{Precision}+\mathrm{Recall}}$ -
λͺ¨λ classμ λν area under the precision-recall curve(AUPRC)
-
- κΉλ―ΌνΈ : λͺ¨λΈ ꡬ쑰 λ° μμ€ ν¨μ λΆμ
- κΉμ±μ : main μ€ν μ½λ μμ±, λ°μ΄ν° μ μ²λ¦¬, λͺ¨λΈ 컀μ€ν
- κΉμ§ν : μ μ²λ¦¬ λ°©λ² μ μ, λͺ¨λΈ ꡬ쑰 λΆμ, 컀μ€ν λͺ¨λΈ ꡬν, base setting κΈ°μ¬ λ° μμλΈ
- μκ°μ : νμ΄νΌ νλΌλ―Έν° νλ λ° λ€μν λͺ¨λΈ μ€ν
- νμν : μ μ²λ¦¬ λ°©λ² μ μ λ° λͺ¨λΈ μμΈ‘ κ²°κ³Ό λΆμ
βββ src
β βββ dict_label_to_num.pkl
β βββ dict_num_to_label.pkl
β βββ train.py
β βββ inference.py
β βββ ensemble.py
β βββ hp_train.py
β
β
βββ utils
β βββ preprocessing.py : tokenizing μ΄μ κΉμ§μ μ μ²λ¦¬ ν¨μλ₯Ό μ μ₯νλ ν¨μ
β βββ tokenizing.py : dataset μ΄μ κΉμ§ λ΄λΉνλ ν¨μλ€ λͺ¨μλλ κ³³
β βββ metric.py : λ©νΈλ¦ κ΄λ ¨ ν¨μλ€ λͺ¨μλλ κ³³
β βββ load_data.py : μ μ²λ¦¬μ λ°μ΄ν°μ
ꡬμ±μ μν ν¨μ μ½λ!
β
βββ result
β βββ {run_name} : λͺ¨λΈ κ²°κ³Ό
β βββ best_model : λͺ¨λΈ μ μ₯νλ κ³³
β
βββ data
β βββ test
β β βββ test_data.csv
β βββ train
β β βββ train_original.csv
β β βββ train.csv
β β βββ dev.csv
β βββ prediction
β βββ sample_submission.csv
β
βββ main.py
βββ requirements.txt
βββ README.md
βββ config.yaml
https://eojjeol-stones.notion.site/REPORT-09253205d8864f7c8837cee868566702
pip install -r requirements.txt
python main.py # train, inference λͺ¨λ μ€ν
python main.py -r train # train μ€ν
python main.py -r inference # inference μ€ν