> ## Documentation Index
> Fetch the complete documentation index at: https://wb-21fd5541-dependabot-npm-and-yarn-scripts-css-minify-npm.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# 맞춤형 차트 Overview

> W&B Python SDK에서 맞춤형 차트를 사용하여 프로젝트 대시보드에 대화형 시각화를 만드세요

W\&B의 맞춤형 차트는 `wandb.plot` 네임스페이스의 함수 모음을 통해 프로그래밍 방식으로 사용할 수 있습니다. 이 함수들은 W\&B 프로젝트 대시보드에서 대화형 시각화를 생성하며, 혼동 행렬, ROC 곡선, 분포 플롯과 같은 일반적인 ML 시각화를 지원합니다.

<h2 id="available-chart-functions">
  사용 가능한 차트 함수
</h2>

| 함수 | 설명 |
| - | - |
| [`confusion_matrix()`](/ko/models/ref/python/custom-charts/confusion_matrix/) | 분류 성능을 시각화하는 혼동 행렬을 생성합니다. |
| [`roc_curve()`](/ko/models/ref/python/custom-charts/roc_curve/) | 이진 및 다중 클래스 분류기를 위한 ROC 곡선을 생성합니다. |
| [`pr_curve()`](/ko/models/ref/python/custom-charts/pr_curve/) | 분류기 평가를 위한 정밀도-재현율 곡선을 생성합니다. |
| [`line()`](/ko/models/ref/python/custom-charts/line/) | 표 형식 데이터에서 선 차트를 생성합니다. |
| [`scatter()`](/ko/models/ref/python/custom-charts/scatter/) | 변수 간 관계를 보여주는 산점도를 생성합니다. |
| [`bar()`](/ko/models/ref/python/custom-charts/bar/) | 범주형 데이터를 위한 막대 차트를 생성합니다. |
| [`histogram()`](/ko/models/ref/python/custom-charts/histogram/) | 데이터 분포 분석을 위한 히스토그램을 생성합니다. |
| [`line_series()`](/ko/models/ref/python/custom-charts/line_series/) | 하나의 차트에 여러 선 series를 표시합니다. |
| [`plot_table()`](/ko/models/ref/python/custom-charts/plot_table/) | Vega-Lite 사양을 사용해 맞춤형 차트를 생성합니다. |

<h2 id="common-use-cases">
  주요 사용 사례
</h2>

<h3 id="model-evaluation">
  모델 평가
</h3>

* **분류**: 분류기 평가용 `confusion_matrix()`, `roc_curve()`, `pr_curve()`
* **회귀**: 예측값과 실제값을 비교하는 플롯용 `scatter()`, 잔차 분석용 `histogram()`
* **Vega-Lite 차트**: 도메인별 시각화용 `plot_table()`

<h3 id="training-monitoring">
  트레이닝 모니터링
</h3>

* **학습 곡선**: 에포크별 메트릭을 추적하는 `line()` 또는 `line_series()`
* **하이퍼파라미터 비교**: 설정을 비교하는 `bar()` 차트

<h3 id="data-analysis">
  데이터 분석
</h3>

* **분포 분석**: 특성 분포를 확인하는 `histogram()`
* **상관관계 분석**: 변수 간 관계를 보여주는 `scatter()` 산점도

<h2 id="getting-started">
  시작하기
</h2>

<h3 id="log-a-confusion-matrix">
  혼동 행렬 기록하기
</h3>

```python theme={null}
import wandb

y_true = [0, 1, 2, 0, 1, 2]
y_pred = [0, 2, 2, 0, 1, 1]
class_names = ["class_0", "class_1", "class_2"]

# run 초기화
with wandb.init(project="custom-charts-demo") as run:
    run.log({
        "conf_mat": wandb.plot.confusion_matrix(
            y_true=y_true, 
            preds=y_pred,
            class_names=class_names
        )
    })
```

<h3 id="build-a-scatter-plot-for-feature-analysis">
  특성 분석용 산점도 만들기
</h3>

```python theme={null}
import numpy as np

# 합성 데이터 생성
data_table = wandb.Table(columns=["feature_1", "feature_2", "label"])

with wandb.init(project="custom-charts-demo") as run:

    for _ in range(100):
        data_table.add_data(
            np.random.randn(), 
            np.random.randn(), 
            np.random.choice(["A", "B"])
        )

    run.log({
        "feature_scatter": wandb.plot.scatter(
            data_table, x="feature_1", y="feature_2",
            title="Feature Distribution"
        )
    })

```
