Skip to content

Commit

Permalink
🌐 [i18n-KO] Translated model_doc/time_series_transformer.md to Kore…
Browse files Browse the repository at this point in the history
…an (#33596)

* docs: ko: model_doc/time_series_transformer.md

* fix: resolve suggestions

Co-authored-by: Chaewon Song <[email protected]>
Co-authored-by: Ahnjj_DEV <[email protected]>

* fix: resolve suggestions

* fix: resolve suggestions

* fix: resolve suggestions

Co-authored-by: Ahnjj_DEV <[email protected]>

---------

Co-authored-by: Chaewon Song <[email protected]>
Co-authored-by: Ahnjj_DEV <[email protected]>
  • Loading branch information
3 people authored Oct 9, 2024
1 parent 32cc15c commit 04f51c4
Show file tree
Hide file tree
Showing 2 changed files with 64 additions and 2 deletions.
4 changes: 2 additions & 2 deletions docs/source/ko/_toctree.yml
Original file line number Diff line number Diff line change
Expand Up @@ -765,8 +765,8 @@
title: (λ²ˆμ—­μ€‘) Informer
- local: model_doc/patchtsmixer
title: PatchTSMixer
- local: in_translation
title: (λ²ˆμ—­μ€‘) Time Series Transformer
- local: model_doc/time_series_transformer
title: μ‹œκ³„μ—΄ 트랜슀포머
title: μ‹œκ³„μ—΄ λͺ¨λΈ
- isExpanded: false
sections:
Expand Down
62 changes: 62 additions & 0 deletions docs/source/ko/model_doc/time_series_transformer.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
<!--Copyright 2022 The HuggingFace Team. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on
an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the
specific language governing permissions and limitations under the License.
⚠️ Note that this file is in Markdown but contain specific syntax for our doc-builder (similar to MDX) that may not be
rendered properly in your Markdown viewer.
-->

# μ‹œκ³„μ—΄ 트랜슀포머[[time-series-transformer]]

## κ°œμš”[[overview]]

이 μ‹œκ³„μ—΄ 트랜슀포머 λͺ¨λΈμ€ μ‹œκ³„μ—΄ μ˜ˆμΈ‘μ„ μœ„ν•œ 기본적인 인코더-디코더 ꡬ쑰의 트랜슀포머 μž…λ‹ˆλ‹€.
이 λͺ¨λΈμ€ [kashif](https://huggingface.co/kashif)에 μ˜ν•΄ κΈ°μ—¬λ˜μ—ˆμŠ΅λ‹ˆλ‹€.

## μ‚¬μš© 팁[[usage-tips]]

- λ‹€λ₯Έ 라이브러리의 λͺ¨λΈλ“€κ³Ό λ§ˆμ°¬κ°€μ§€λ‘œ, [`TimeSeriesTransformerModel`]은 상단에 ν—€λ“œκ°€ μ—†λŠ” 기본적인 트랜슀포머 μž…λ‹ˆλ‹€. [`TimeSeriesTransformerForPrediction`]은 상단에 뢄포 ν—€λ“œλ₯Ό μΆ”κ°€ν•˜μ—¬ μ‹œκ³„μ—΄ μ˜ˆμΈ‘μ— μ‚¬μš©ν•  수 μžˆμŠ΅λ‹ˆλ‹€. 이 λͺ¨λΈμ€ 이λ₯Έλ°” ν™•λ₯ μ  예츑 λͺ¨λΈμ΄λ©°, 포인트 예츑 λͺ¨λΈμ΄ μ•„λ‹™λ‹ˆλ‹€. 즉 μƒ˜ν”Œλ§ν•  수 μžˆλŠ” 뢄포λ₯Ό ν•™μŠ΅ν•˜λ©°, 값을 직접 좜λ ₯ ν•˜μ§€λŠ” μ•ŠμŠ΅λ‹ˆλ‹€.
- [`TimeSeriesTransformerForPrediction`]은 λ‘κ°œμ˜ λΈ”λ‘μœΌλ‘œ κ΅¬μ„±λ˜μ–΄ μžˆμŠ΅λ‹ˆλ‹€. μΈμ½”λ”λŠ” `context_length`의 μ‹œκ³„μ—΄ 값을 μž…λ ₯(`past_values`라고 뢀름)으둜 받아듀이며, λ””μ½”λ”λŠ” 미래의 `prediction_length`만큼 μ‹œκ³„μ—΄ 값을 μ˜ˆμΈ‘ν•©λ‹ˆλ‹€(`future_values`라고 뢀름). ν•™μŠ΅μ€‘μ—λŠ” λͺ¨λΈμ— `past_values` 와 `future_values`μŒμ„ λͺ¨λΈμ— μ œκ³΅ν•΄μ•Ό ν•©λ‹ˆλ‹€.
- κ°€κ³΅ν•˜μ§€ μ•Šμ€ `past_values` 와 `future_values` 쌍 외에도, 일반적으둜 λͺ¨λΈμ— 좔가적인 νŠΉμ§•μ„ μ œκ³΅ν•©λ‹ˆλ‹€. λ‹€μŒμ€ κ·Έ νŠΉμ§•λ“€μ— λŒ€ν•΄ μ†Œκ°œν•©λ‹ˆλ‹€:
- `past_time_features`: λͺ¨λΈμ΄ `past_values`에 μΆ”κ°€ν•  μ‹œκ°„μ  νŠΉμ„±. μ΄λŠ” 트랜슀포머 μΈμ½”λ”μ˜ "μœ„μΉ˜ 인코딩" 역할을 ν•©λ‹ˆλ‹€.
예λ₯Ό λ“€μ–΄ "μ›”μ˜ 일", "μ—°λ„μ˜ μ›”" 등을 슀칼라 κ°’μœΌλ‘œ (그리고 λ²‘ν„°λ‘œ μŒ“μ•„μ„œ) λ‚˜νƒ€λƒ…λ‹ˆλ‹€.
μ˜ˆμ‹œ: νŠΉμ • μ‹œκ³„μ—΄ 값이 8μ›” 11일에 κΈ°λ‘λ˜μ—ˆλ‹€λ©΄, [11, 8]을 μ‹œκ°„ νŠΉμ„± λ²‘ν„°λ‘œ μ‚¬μš©ν•  수 μžˆμŠ΅λ‹ˆλ‹€ (11은 "μ›”μ˜ 일", 8은 "μ—°λ„μ˜ μ›”").
- `future_time_features`: λͺ¨λΈμ΄ `future_values`에 μΆ”κ°€ν•  μ‹œκ°„μ  νŠΉμ„±. μ΄λŠ” 트랜슀포머 λ””μ½”λ”μ˜ "μœ„μΉ˜ 인코딩" 역할을 ν•©λ‹ˆλ‹€.
예λ₯Ό λ“€μ–΄ "μ›”μ˜ 일", "μ—°λ„μ˜ μ›”" 등을 슀칼라 κ°’μœΌλ‘œ (그리고 λ²‘ν„°λ‘œ μŒ“μ•„μ„œ) λ‚˜νƒ€λƒ…λ‹ˆλ‹€.
예: νŠΉμ • μ‹œκ³„μ—΄ 값이 8μ›” 11일에 μ–»μ–΄μ‘Œλ‹€λ©΄, [11, 8]을 μ‹œκ°„ νŠΉμ„± λ²‘ν„°λ‘œ μ‚¬μš©ν•  수 μžˆμŠ΅λ‹ˆλ‹€ (11은 "μ›”μ˜ 일", 8은 "μ—°λ„μ˜ μ›”").
- `static_categorical_features`: μ‹œκ°„μ— 따라 λ³€ν•˜μ§€ μ•ŠλŠ” λ²”μ£Όν˜• νŠΉμ„± (즉, λͺ¨λ“  `past_values`와 `future_values`에 λŒ€ν•΄ λ™μΌν•œ 값을 가짐).
예λ₯Ό λ“€μ–΄ νŠΉμ • μ‹œκ³„μ—΄μ„ μ‹λ³„ν•˜λŠ” 맀μž₯ IDλ‚˜ 지역 IDκ°€ μžˆμŠ΅λ‹ˆλ‹€.
μ΄λŸ¬ν•œ νŠΉμ„±μ€ λͺ¨λ“  데이터 포인트(미래의 데이터 포인트 포함)에 λŒ€ν•΄ μ•Œλ €μ Έ μžˆμ–΄μ•Ό ν•©λ‹ˆλ‹€.
- `static_real_features`: μ‹œκ°„μ— 따라 λ³€ν•˜μ§€ μ•ŠλŠ” μ‹€μˆ˜κ°’ νŠΉμ„± (즉, λͺ¨λ“  `past_values`와 `future_values`에 λŒ€ν•΄ λ™μΌν•œ 값을 가짐).
예λ₯Ό λ“€μ–΄ μ‹œκ³„μ—΄ 값을 가진 μ œν’ˆμ˜ 이미지 ν‘œν˜„ (μ‹œκ³„μ—΄μ΄ μ‹ λ°œ νŒλ§€μ— κ΄€ν•œ 것이라면 "μ‹ λ°œ" μ‚¬μ§„μ˜ [ResNet](resnet) μž„λ² λ”© 처럼)이 μžˆμŠ΅λ‹ˆλ‹€.
μ΄λŸ¬ν•œ νŠΉμ„±μ€ λͺ¨λ“  데이터 포인트(미래의 데이터 포인트 포함)에 λŒ€ν•΄ μ•Œλ €μ Έ μžˆμ–΄μ•Ό ν•©λ‹ˆλ‹€.
- 이 λͺ¨λΈμ€ 기계 λ²ˆμ—­μ„ μœ„ν•œ 트랜슀포머 ν›ˆλ ¨κ³Ό μœ μ‚¬ν•˜κ²Œ "ꡐ사 κ°•μ œ(teacher-forcing)" λ°©μ‹μœΌλ‘œ ν›ˆλ ¨λ©λ‹ˆλ‹€. 즉, ν›ˆλ ¨ 쀑에 `future_values`λ₯Ό λ””μ½”λ”μ˜ μž…λ ₯으둜 였λ₯Έμͺ½μœΌλ‘œ ν•œ μœ„μΉ˜ μ΄λ™μ‹œν‚€κ³ , `past_values`의 λ§ˆμ§€λ§‰ 값을 μ•žμ— λΆ™μž…λ‹ˆλ‹€. 각 μ‹œκ°„ λ‹¨κ³„μ—μ„œ λͺ¨λΈμ€ λ‹€μŒ νƒ€κ²Ÿμ„ μ˜ˆμΈ‘ν•΄μ•Ό ν•©λ‹ˆλ‹€. λ”°λΌμ„œ ν›ˆλ ¨ 섀정은 μ–Έμ–΄λ₯Ό μœ„ν•œ GPT λͺ¨λΈκ³Ό μœ μ‚¬ν•˜μ§€λ§Œ, `decoder_start_token_id` κ°œλ…μ΄ μ—†μŠ΅λ‹ˆλ‹€ (μš°λ¦¬λŠ” λ‹¨μˆœνžˆ μ»¨ν…μŠ€νŠΈμ˜ λ§ˆμ§€λ§‰ 값을 λ””μ½”λ”μ˜ 초기 μž…λ ₯으둜 μ‚¬μš©ν•©λ‹ˆλ‹€).
- μΆ”λ‘  μ‹œμ—λŠ” `past_values`의 μ΅œμ’… 값을 λ””μ½”λ”μ˜ μž…λ ₯으둜 μ œκ³΅ν•©λ‹ˆλ‹€. κ·Έ λ‹€μŒ, λͺ¨λΈμ—μ„œ μƒ˜ν”Œλ§ν•˜μ—¬ λ‹€μŒ μ‹œκ°„ λ‹¨κ³„μ—μ„œμ˜ μ˜ˆμΈ‘μ„ λ§Œλ“€κ³ , 이λ₯Ό 디코더에 κ³΅κΈ‰ν•˜μ—¬ λ‹€μŒ μ˜ˆμΈ‘μ„ λ§Œλ“­λ‹ˆλ‹€ (μžκΈ°νšŒκ·€ 생성이라고도 함).

## 자료 [[resources]]

μ‹œμž‘ν•˜λŠ” 데 도움이 λ˜λŠ” Hugging Face와 community 자료 λͺ©λ‘(🌎둜 ν‘œμ‹œλ¨) μž…λ‹ˆλ‹€. 여기에 포함될 자료λ₯Ό μ œμΆœν•˜κ³  μ‹ΆμœΌμ‹œλ‹€λ©΄ PR(Pull Request)λ₯Ό μ—΄μ–΄μ£Όμ„Έμš”. 리뷰 ν•΄λ“œλ¦¬κ² μŠ΅λ‹ˆλ‹€! μžλ£ŒλŠ” κΈ°μ‘΄ 자료λ₯Ό λ³΅μ œν•˜λŠ” λŒ€μ‹  μƒˆλ‘œμš΄ λ‚΄μš©μ„ λ‹΄κ³  μžˆμ–΄μ•Ό ν•©λ‹ˆλ‹€.

- HuggingFace λΈ”λ‘œκ·Έμ—μ„œ μ‹œκ³„μ—΄ 트랜슀포머 포슀트λ₯Ό ν™•μΈν•˜μ„Έμš”: [πŸ€— νŠΈλžœμŠ€ν¬λ¨Έμ™€ ν™•λ₯ μ  μ‹œκ³„μ—΄ 예츑](https://huggingface.co/blog/time-series-transformers)

## TimeSeriesTransformerConfig[[transformers.TimeSeriesTransformerConfig]]

[[autodoc]] TimeSeriesTransformerConfig

## TimeSeriesTransformerModel[[transformers.TimeSeriesTransformerModel]]

[[autodoc]] TimeSeriesTransformerModel
- forward

## TimeSeriesTransformerForPrediction[[transformers.TimeSeriesTransformerForPrediction]]

[[autodoc]] TimeSeriesTransformerForPrediction
- forward

0 comments on commit 04f51c4

Please sign in to comment.