Text Classification
Transformers
Safetensors
Korean
bert
sentiment-analysis
korean
finance
finbert
Eval Results (legacy)
text-embeddings-inference
Instructions to use DataWizardd/finbert-sentiment-ko with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use DataWizardd/finbert-sentiment-ko with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-classification", model="DataWizardd/finbert-sentiment-ko")# Load model directly from transformers import AutoTokenizer, AutoModelForSequenceClassification tokenizer = AutoTokenizer.from_pretrained("DataWizardd/finbert-sentiment-ko") model = AutoModelForSequenceClassification.from_pretrained("DataWizardd/finbert-sentiment-ko", device_map="auto") - Notebooks
- Google Colab
- Kaggle
| language: ko | |
| datasets: naver-finance-news | |
| tags: | |
| - sentiment-analysis | |
| - korean | |
| - finance | |
| - finbert | |
| - transformers | |
| license: mit | |
| model-index: | |
| - name: finbert-sentiment-ko | |
| results: | |
| - task: | |
| name: Sentiment Analysis | |
| type: text-classification | |
| metrics: | |
| - type: accuracy | |
| value: 0.93 | |
| # FinBERT Sentiment Analysis (Korean, Finance Domain) | |
| μ΄ λͺ¨λΈμ **νκ΅μ΄ νμ¨(κΈμ΅) λ΄μ€ μμ½λ¬Έ**μ λμμΌλ‘ κ°μ μ λΆλ₯νκΈ° μν΄ νμΈνλλ BERT κΈ°λ° λͺ¨λΈμ λλ€. | |
| κ°μ λΆλ₯λ λ€μ μΈ κ°μ§ ν΄λμ€ μ€ νλλ‘ μνλ©λλ€: | |
| - `0`: λΆμ | |
| - `1`: μ€λ¦½ | |
| - `2`: κΈμ | |
| ## π§ νμ΅ μ 보 | |
| - κΈ°λ° λͺ¨λΈ: [`snunlp/KR-FinBERT-SC`](https://huggingface.co/snunlp/KR-FinBERT-SC) | |
| - λ°μ΄ν°: μ§μ μμ§ν **λ€μ΄λ² νμ¨(κΈμ΅) λ΄μ€** μμ½ + κ°μ μμμ λΌλ²¨λ§ | |
| - μ΄ μν μ: μ½ 200 | |
| - Optimizer: AdamW | |
| - Epochs: 4 | |
| - μ΅λ κΈΈμ΄: 128 | |
| - νκ° μ§ν: Accuracy, F1 Score | |
| ## π μ±λ₯ νκ° | |
| | κ°μ ν΄λμ€ | Precision | Recall | F1-score | Support | | |
| |-------------|-----------|--------|----------|---------| | |
| | λΆμ | 0.89 | 1.00 | 0.94 | 17 | | |
| | μ€λ¦½ | 1.00 | 0.82 | 0.90 | 11 | | |
| | κΈμ | 0.93 | 0.93 | 0.93 | 14 | | |
| | **μ νλ** | | | **0.93** | 42 | | |
| > μ 체 μ νλ: **93%** | |
| > Macro F1-score: **0.92** | |
| --- | |
| ## π μ¬μ© λ°©λ² | |
| ```python | |
| from transformers import pipeline | |
| pipe = pipeline("text-classification", model="DataWizardd/finbert-sentiment-ko") | |
| pipe("νμ¨μ΄ κΈλ±νλ©° μμ₯ λΆμμ΄ μ»€μ§κ³ μλ€.") | |
| # μΆλ ₯: [{'label': 'λΆμ ', 'score': 0.95}] | |