EXAONE API Platform

EXAONE Tabular

POST /v1/tabular/classification

POST /v1/tabular/regression

LG AI연구원이 개발한 정형 데이터 특화 AI 모델, EXAONE Tabular를 만나보세요. 표 형태의 데이터를 기반으로 분류 및 회귀 예측을 수행하며, 별도의 모델 재학습 없이 다양한 산업 분야의 데이터 분석에 활용할 수 있습니다.


요청 정보

요청 Content-Type: multipart/form-data

FieldTypeDescriptionRequired
train_filefile학습용 csv 파일mandatory
test_filefile예측 대상 행을 포함한 csv 파일mandatory
modestringdefault 입력mandatory
output_typestring분류: class / probability (default: "class") 회귀: point(점 예측값) / full(분위수 기반 예측 분포)(default: "point")mandatory
target_columnsarray<string>예측 대상 타깃 컬럼명 (default: "target") 첫번째 값만 사용하므로 1개만 입력할 것mandatory

응답 정보

분류

FieldTypeDescription
result_codenumberhttp status code
descriptionstring오류 상세 설명(result_code가 200일 경우 null)
data.target_columnsarray<string>타깃 컬럼명 목록
data.classesarray<array>string>>분류 전용 타깃별 클래스 목록 해당 task의 학습용 타깃값을 문자열로 변환하여 구성하며, 확률의 클래스 순서와 대응
data.labelsarray<array<string>>분류에서 output_type="class"일 때 반환 [예측 행][타깃] 순서의 예측 라벨
data.probabilitiesarray<array<array<number>>>분류에서 output_type="probability"일 때 반환 [예측 행][타깃][클래스] 순서의 확률

회귀

FieldTypeDescription
result_codenumberhttp status code
descriptionstring오류 상세 설명(result_code가 200일 경우 null)
data.target_columnsarray<string>타깃 컬럼명 목록
data.predictionsarray<array>number>>예측 대상 행의 수치형 점 예측값
data.quantilesarray<array<number>>예측 대상 행의 타깃별 예측 분포
data.quantile_levelsarray<array<number>>quantiles의 각 인덱스에 해당하는 누적 확률

예측 결과 해석

분류와 회귀 모두 각 task의 예측 대상 행에 대한 결과를 반환하며, 학습용 행의 예측값은 포함하지 않습니다.

task type출력 유형의미
Classificationclass각 예측 대상 행의 예측 클래스
Classificationprobability각 예측 대상 행의 클래스별 확률
Regressionpoint prediction각 예측 대상 행의 수치형 점 예측값
Regressiondistribution각 예측 대상 행의 타깃값에 대한 예측 분포

분류의 labels와 probabilities는 요청한 output_type에 따라 하나만 반환합니다.

현재 단일 타깃 기준으로 결과 크기는 다음과 같습니다. 분류에서 output_type = "probability"일 경우 확률은 classes에 나열된 순서로 반환하며, 소수점 여섯 자리로 반올림됩니다.

output_type결과 필드크기
classlabels(n_test_rows, 1)
probabilityprobabilities(n_test_rows, 1, n_classes)

회귀의 distribution은 분류의 클래스별 확률과 다른 출력입니다. 회귀는 output_type="point"일 때 점 예측값을 반환하고, output_type="full"일 때 분위수 기반의 예측 분포를 반환합니다.

출력 유형논리적 결과 단위구조 설명
point prediction예측 행·타깃별 숫자 한 개공통 타깃 축을 유지하면 단일 타깃의 크기는 (n_test_rows, 1)
distribution예측 행·타깃별 예측 분포분포의 표현 방식에 따라 자료형과 크기가 달라지므로 별도 명세 필요
output_type결과 필드크기
point(기본값)predictions(n_test_rows, 1)
fullquantiles(n_test_rows, 1, 999)
fullquantile_levels(1, 999)

quantiles: test_row의 예측 분포를 quantile_levels 길이의 값들로 나타냄

quantile_levels: quantiles의 각 인텍스에 해당하는 누적 확률(CDF)입니다. 즉, quantile_levels[target][i]는 target이 quantiles[row][target][i] 이하일 예측 확률입니다.

quantile_levels는 i/(N+1) (i = 1…N, N = 999이면 0.001 ~ 0.999)로 정해지기 때문에 quantiles 마지막 축의 크기만으로 구할 수 있습니다. 해당 필드는 응답의 완결성을 위해 포함하여 사용자가 level 값을 hard-code하지 않아도 되고, 추후 모델 checkpoint의 quantile 개수나 분포가 바뀌어도 같은 방식으로 동작할 수 있습니다.

사용 방법: quantile_levels[0]에서 원하는 누적 확률(예: 0.05, 0.95)의 index를 찾고, 같은 index로 quantiles[row][0]을 읽으면 그 행의 해당 quantile 값을 찾을 수 있습니다.


요청 예제 (분류)

curl 'https://api.exaone.ai/v1/tabular/classification' \
  -H "Authorization: Bearer $EXAONE_API_KEY" \
  -F 'train_file=@classification_train.csv;type=text/csv' \
  -F 'test_file=@classification_test.csv;type=text/csv' \
  -F 'mode=default' \
  -F 'output_type=class' \
  -F 'target_columns=churn'

응답 예제 (분류)

{
  "result_code": 200,
  "description": null,
  "data": {
    "target_columns": ["churn"],
    "classes": [["no", "yes"]],
    "labels": [
      ["yes"],
      ["yes"],
      ["no"],
      ["no"],
      ["yes"],
      ["no"],
      ["yes"],
      ["no"],
      ["no"],
      ["yes"],
      ["yes"],
      ["no"]
    ],
    "probabilities": null
  }
}

요청 예제 (회귀)

curl 'https://api.exaone.ai/v1/tabular/regression' \
  -H "Authorization: Bearer $EXAONE_API_KEY" \
  -F 'train_file=@regression_train.csv;type=text/csv' \
  -F 'test_file=@regression_test.csv;type=text/csv' \
  -F 'mode=default' \
  -F 'output_type=point' \
  -F 'target_columns=price'

응답 예제 (회귀)

{
  "result_code": 200,
  "description": null,
  "data": {
    "target_columns": ["price"],
    "predictions": [
      [240.70724487304688],
      [114.92210388183594],
      [263.53741455078125],
      [138.78909301757812],
      [242.1593475341797],
      [76.70890045166016],
      [160.2372589111328],
      [135.4267578125],
      [143.27110290527344],
      [191.79373168945312],
      [229.5113983154297],
      [130.65866088867188]
    ],
    "quantiles": null,
    "quantile_levels": null
  }
}