본문으로 건너뛰기
버전: docs v25.02

TCR Parameter

Updated 2025.04.29

experimental_plan.yaml 설명

내가 갖고 있는 데이터에 AI Contents를 적용하려면 데이터에 대한 정보와 사용할 Contents 기능들을 experimental_plan.yaml 파일에 기입해야 합니다. AI Contents를 solution 폴더에 설치하면 solution 폴더 아래에 contents 마다 기본으로 작성되어있는 experimental_plan.yaml 파일을 확인할 수 있습니다. 이 YAML 파일에 '데이터 정보'를 입력하고 function마다 제공하는 'user arugments'를 수정/추가하여 ALO를 실행하면, 원하는 세팅으로 데이터 분석 모델을 생성할 수 있습니다.

experimental_plan.yaml 구조

experimental_plan.yaml에는 ALO를 구동하는데 필요한 다양한 setting값이 작성되어 있습니다. 이 setting값 중 train/inference 항목의 'dataset_uri'와 'function'부분을 수정하면 AI Contents를 바로 사용할 수 있습니다.

데이터 경로 입력(dataset_uri)

  • train 혹은 inference의 parameter는 불러올 파일의 경로나 저장할 파일의 경로를 지정할 때 사용합니다.
train:
dataset_uri: [train_dataset/] # 데이터 폴더, 폴더 리스트 (파일 형식 불가)
# dataset_uri: s3://mellerikat-test/tmp/alo/ # 예제1) S3 key(prefix) 이하 경로 모든 폴더, 파일
artifact_uri: train_artifact/
pipeline: [input, readiness, preprocess, sampling, train] # 실행 대상 function 목록

inference:
dataset_uri: inference_dataset/
# model_uri: model_artifacts/n100_depth5.pkl # 이미 학습된 모델을 load
artifact_uri: inference_artifact/ # Optional) pipeline['artifact']['workspace'] 경로 이하에 저장된 파일에 대해 압축 및 업로드 경로 정의. default 경로 이하 inferenece.tar.gz으로 업로드 됨
pipeline: [input, readiness, preprocess, sampling, inference]
파라미터명DEFAULT설명 및 옵션
dataset_uri (train)[train_dataset/]학습 데이터가 위치한 폴더 경로를 입력합니다. (csv 파일 명 입력 X) 입력한 경로 하위에 있는 모든 csv를 가져와 concat 합니다.
dataset_uri (inference)inference_dataset추론 데이터가 위치한 폴더 경로를 입력합니다. (csv 파일 명 입력 X) 입력한 경로 하위에 있는 모든 csv를 가져와 concat 합니다.
artifact_uritrain(inference)_artifact/학습 및 추론 결과의 산출물이 저장되는 폴더 경로를 입력합니다.

*입력한 경로 하위 폴더 안에 있는 파일도 모두 가져와 합칩니다. *합칠 파일의 모든 컬럼 명은 동일해야 합니다.

사용자 파라미터(function)

  • function 아래 항목들은 함수 명을 의미합니다. 아래 function: input은 input step임을 의미합니다.
  • argument는 input function(function: input)의 user arguments를 의미합니다. user arguments는 각 function마다 제공하는 데이터 분석 관련 설정 파라미터입니다. 이에 대한 설명은 아래에 User arguments 설명을 확인해주세요.

function: # Required) 사용자 정의 함수
input:
def: pipeline.input # {python 파일 명}.{함수 이름} 형태로 구성
argument:
file_type: csv
encoding: utf-8
...

User arguments 설명

User arguments란?

User arguments는 각 asset 별 동작 설정을 위한 파라미터로 experimental_plan.yaml의 각 step의 args밑에 기입해 사용합니다. AI Contents의 pipeline을 구성하는 function마다 사용자가 다양한 기능을 데이터에 적용할 수 있도록 user arguments를 제공하고 있습니다. 사용자는 아래 가이드를 참고해서 user arguments를 변경, 추가하여 데이터에 맞는 모델링을 할 수 있습니다. User arguments는 experimental_plan.yaml에 미리 작성되어있는 '필수 arguments'와 사용자가 가이드를 보고 추가하는 'Custom arguments'로 구분됩니다.

필수 arguments

  • 필수 arguments는 experimental_plan.yaml에 바로 보여지는 기본 arguments 입니다. 대부분의 필수 arguments는 default 값이 YAML 파일에 세팅 되어있습니다.
  • experimental_plan.yaml의 필수 arguments중 데이터 관련 arguments는 유저가 필수로 값을 설정해주어야 합니다. (ex. x_columns, y_column)

Custom arguments

  • Custom arguments는 experimental_plan.yaml에 적혀있지 않지만, 각 function에서 제공하는 기능으로 사용자가 experimental_plan.yaml에 추가하여 사용할 수 있습니다. YAML 파일의 각 function 별 argument에 추가하여 사용합니다.

TCR의 pipeline은 Input - Readiness - Preprocess - Modeling(train/inference) function 순으로 구성되어 있으며 각 function의 기능에 맞추어 user arguments가 다르게 구성되어 있습니다. experimental_plan.yaml에 기입되어 있는 필수 arguments 세팅으로 먼저 모델링을 진행해보시고, user arguments를 추가하여 데이터에 딱 맞는 TCR 모델을 만들어보세요!

train:
...
pipeline: [input, readiness, preprocess, sampling, train] # 실행 대상 function 목록

inference:
...
pipeline: [input, readiness, preprocess, sampling, inference] # 실행 대상 function 목록

User arguments 요약

아래는 TCR의 user arguments 요약입니다. 'Argument 명'을 누르면 해당 arguments의 상세 설명으로 이동할 수 있습니다. 현재 TCR은 train pipeline의 user arguments만 제공하고 있습니다. inference pipeline에서는 train에서 사용한 arguments setting을 자동으로 가져와서 사용합니다. 따라서 train pipeline에만 user arguments를 작성하시면 됩니다.

Default

  • 'Default' 항목은 해당 user argument의 기본 값 입니다.
  • 기본 값이 없는 경우 '-' 로 표기하였습니다.
  • default에 로직이 있는 경우에는 '설명 참고'로 표기하였습니다. 'Argument 명'을 눌러 상세 설명을 확인해 주세요

ui_args

  • 아래 표의 'ui_args'는 AI Conductor의 UI에서 argument 값을 변경할 수 있는 ui_args기능 지원 여부를 나타냅니다.
  • O: experimental_plan.yaml의 ui_args밑에 해당 argument 명을 기입하면 AI Conductor UI에서 arguments 값을 변경할 수 있습니다.
  • X: ui_args 기능을 지원하지 않습니다.
  • ui_args에 대한 자세한 설명은 다음 가이드를 확인해 주세요. Write UI Parameter

사용자 설정 필수 여부

  • 아래 표의 '사용자 설정 필수 여부'는 AI Contents를 동작시키기 위해 사용자가 반드시 확인하고 변경해야 할 user arguments 입니다.
  • O: 일반적으로 과제, 데이터 관련 정보를 입력하는 arguments로 사용자가 모델링 전에 확인해야 합니다.
  • X: 사용자가 값을 변경하지 않으면 default 값으로 모델링이 진행됩니다.
Step명Argument typeArgument 명Default설명사용자 설정 필수 여부ui_args
Input필수file_typecsvinput data의 파일 확장자를 입력합니다.XO
Input필수encodingutf-8input data의 encoding type을 입력합니다.XO
Readiness필수x_columns-학습 대상 x 컬럼 명을 입력합니다.OO
Readiness필수y_column-y 컬럼 명을 입력합니다.OO
Readiness필수task_typeclassificationclassification/regression 여부를 입력합니다.OO
Readiness필수target_label_majorHPO시 metric 계산 기준이 되는 class 명을 입력합니다.XX
Readiness필수column_typesauto컬럼 유형(categorical/numeric) 정보를 입력합니다(컬럼 유형 자동 분류 기능 'auto' 제공)XX
Readiness필수reportTrueTrain/inference data에 대한 요약 csv를 출력합니다.XO
ReadinessCustomdrop_x_columns-입력할 컬럼 명이 많을 경우 x_columns 대신 사용합니다.XO
ReadinessCustomgroupkey_columns-입력한 컬럼의 value 값을 기준으로 dataframe을 grouping합니다XO
ReadinessCustommin_rows설명 참고학습 시 필요한 최소 row 수를 지정합니다.XX
ReadinessCustomcardinality50입력한 값을 기준으로 categorical 컬럼을 분류합니다.XX
ReadinessCustomnum_cat_split10컬럼 유형 자동 분류 시 사용하는 값으로, 분류 기준을 조정합니다.XX
ReadinessCustomignore_new_categoryFalseinference 시 새로운 카테고리 값이 들어왔을 때 동작을 처리합니다.XX
PreprocessCustomsave_original_columnsTrue원본 학습 컬럼(x_columns)을 preprocess asset 결과 dataframe에 남길지 결정합니다.XO
PreprocessCustomcategorical_encoding{binary: all}categorical 컬럼에 적용할 인코딩 방법론을 지정합니다.XX
PreprocessCustomhandle_missing설명 참고컬럼에 적용할 결측치 처리 방식을 지정합니다.XX
PreprocessCustomnumeric_outlier-numeric 컬럼에 적용할 outlier 제거 방법을 선택합니다.XX
PreprocessCustomnumeric_scaler-numeric 컬럼에 적용할 scaling 방법을 선택합니다.XX
Sampling필수data_split{method: cross_validation, options: 3}HPO시 train/validation set 분할 방법론을 선택합니다.XX
SamplingCustomover_sampling-y column의 label 별 over sampling 방법론을 적용합니다.XX
SamplingCustomunder_sampling-y column의 label 별 under sampling 방법론을 적용합니다.XX
SamplingCustomrandom_state-sampling 수행 시 동일한 결과를 얻기 위해 random seed를 지정합니다.XX
Train필수evaluation_metricautoHPO시 best 모델을 선택하기 위한 평가 metric을 결정합니다.XO
Train필수shapley_valueFalseshapley value를 계산하여 output.csv에 출력할지 결정합니다.XO
Train필수output_typealloutput.csv에 최소한의 컬럼(모델링 결과)만 출력할지 선택합니다.XO
TrainCustommodel_list[rf, gbm, lgbm, cb, xgb]HPO로 비교할 모델을 선택합니다.XX
TrainCustomhpo_settings설명 참고model_list의 모델에 대해 parameter를 변경합니다.XX
TrainCustomshapley_sampling10000shapley_value 값 추출 시 데이터 sampling 정도를 입력합니다.XX
TrainCustommultiprocessingFalsemultiprocessing 사용 여부를 입력합니다.XO
TrainCustomnum_cpu_core3multiprocessing시 사용할 CPU core 수를 입력합니다.XO

User arguments 상세 설명

Input asset

file_type

Input data의 파일 확장자를 입력합니다. 현재 AI Solution 개발은 csv 파일만 가능합니다.

  • Argument type: 필수
  • 입력 type
    • string
  • 입력 가능한 값
    • csv (default)
  • 사용법
    • file_type: csv  
  • ui_args: O

encoding

Input data의 encoding type을 입력합니다. 현재 AI Solution 개발은 utf-8 인코딩만 가능합니다.

  • Argument type: 필수
  • 입력 type
    • string
  • 입력 가능한 값
    • utf-8 (default)
  • 사용법
    • encoding: utf-8
  • ui_args: O

Readiness asset

x_columns

Dataframe에 있는 학습 대상 x 컬럼 명을 list 형태로 입력합니다. 사용자가 입력 데이터에 맞게 반드시 입력해야 합니다. 만약 입력할 컬럼 명이 많을 경우, custom argument인 drop_x_columns를 사용하면 dataframe 전체 컬럼을 학습 대상으로 지정할 수 있습니다. 단, x_columns와 drop_x_columns 중 하나만 사용해야 합니다(둘 중 사용하지 않는 arguments는 YAML 파일에서 제거하거나 주석처리 해야 함).  

  • Argument type: 필수
  • 입력 type
    • list
  • 입력 가능한 값
    • 컬럼 명 list
  • 사용법
    • x_columns: [col1, col2]
  • ui_args: O

y_column

Dataframe에 있는 y 컬럼 명 1개를 입력합니다. 사용자가 입력 데이터에 맞게 반드시 입력해야 합니다.

  • Argument type: 필수
  • 입력 type
    • string
  • 입력 가능한 값
    • 컬럼 명
  • 사용법
    • y_column: target
  • ui_args: O

task_type

Solution 과제의 유형(classification/regression)을 입력합니다. 사용자가 과제의 목적에 맞는 task_type으로 값이 설정 되었는지 확인해야 합니다.

  • Argument type: 필수
  • 입력 type
    • string
  • 입력 가능한 값
    • classification (default)
    • regression
  • 사용법
    • task_type: classification
  • ui_args: O

target_label

classification model을 train할 때, HPO시 모델 평가 metric을 계산할 때 기준이 되는 y_column의 class를 결정합니다. 예를 들어 evaluation_metric이 precision이고, target_label이 1일 때, 라벨 1의 precision값이 높은 모델을 best model로 선정합니다. task_type이 regression일 때는 동작하지 않습니다.    

  • Argument type: 필수
  • 입력 type
    • string
    • list
  • 입력 가능한 값
    • _major (default)
      • y_column에서 가장 개수가 많은 class를 선택합니다. (binary, multiclass 모두 가능)
    • _minor
      • y_column에서 가장 개수가 적은 class를 선택합니다. (binary, multiclass 모두 가능)
    • _all
      • y_column의 모든 class 명을 기준으로 합니다.(multiclass만 가능)
    • 라벨 값
      • y_column의 class 명 하나를 입력합니다. (binary, multiclass 모두 가능)
      • ex) target_label: setosa
    • 라벨 값 list
      • list: y_column의 class 명 여러개를 입력합니다. (multiclass만 가능)
      • ex) target_label: [setosa, versicolor]
  • 사용법
    • target_label: _major
  • ui_args: X

column_types

학습 컬럼(x_columns) 유형이 numeric 또는 categorical인지 입력합니다. default 값인 'auto'를 사용하면 readiness asset에서 자동으로 x_columns의 numeric/categorical 여부를 분류합니다. 특정 컬럼을 항상 numeric 또는 categorical 컬럼으로 지정해야 할 경우 column_type arguments를 아래와 같이 사용합니다.

  • ex) column_types: {categorical_columns: [col1, col2]}
  • ex) column_types: {numeric_columns: [col1, col2]}
  • ex) column_types: {categorical_columns: [col1], numeric_columns: [col2]}

column_types에 입력한 컬럼은 사용자가 지정한대로 categorical 또는 numeric 컬럼으로 무조건 분류되며, 입력하지 않은 컬럼들은 auto 로직을 통해 자동으로 numeric/categorical 컬럼으로 분류됩니다.

  • Argument type: 필수
  • 입력 type
    • string
    • dictionary
  • 입력 가능한 값
    • auto (default)
    • {categorical_columns: 컬럼 명 list, numeric_columns: 컬럼 명 list}
  • 사용법
    • column_types: auto
  • ui_args: X

report

input data(train/infernece)에 대한 요약 csv파일 생성 여부를 결정합니다. 데이터의 유형 (categorical/numeric), category 정보, cardinality, 통계량, 결측치 개수, 결측 비율이 기록됩니다. ignore_new_category: True일 때 inference에 학습에 사용하지 않은 category 데이터가 들어올 경우, 'new-categories' 컬럼이 생성됩니다.

  • Argument type: 필수
  • 입력 type
    • boolean
  • 입력 가능한 값
    • True (default)
      • {train/inference}_artifacts/extra_output/readiness/report.csv를 생성합니다.
    • False
      • report.csv를 생성하지 않습니다.
  • 사용법
    • report: True
  • ui_args: O

drop_x_columns

입력할 컬럼 명이 많은 경우, x_columns대신 drop_x_columns를 사용하면 dataframe의 전체 컬럼 명을 불러온 후 일부 컬럼만 삭제하여 학습 컬럼을 지정할 수 있습니다. x_columns와 drop_x_columns 중 하나만 사용해야 합니다(둘 중 사용하지 않는 arguments는 YAML 파일에서 제거하거나 주석처리 해야 함). drop_x_columns가 []일 때 dataframe 컬럼 전체를 학습 컬럼으로 사용합니다(학습 컬럼: groupkey_columns, y_column을 제외한 나머지 컬럼). drop_x_columns에 학습에 제외할 컬럼 명 list를 입력할 경우 drop_x_columns에 기입한 컬럼을 제외한 나머지 컬럼을 학습 컬럼으로 사용합니다(학습 컬럼: groupkey_columns, y_column, drop_x_columns를 제외한 나머지 컬럼). ex) 전체 컬럼: x0,x1,x2,x3,x4,y 일 때, drop_x_columns=[x0], groupkey_columns=[x1], y_column=y 일 경우, 학습 대상 컬럼은 x2,x3,x4가 됩니다.

  • Argument type: Custom
  • 입력 type
    • list
  • 입력 가능한 값
    • []
      • 빈 list를 입력하는 경우, dataframe 전체 컬럼 중 groupkey_columns, y_column을 제외한 나머지 컬럼 전체를 학습 컬럼으로 사용합니다.
    • 컬럼 명 list
      • dataframe 전체 컬럼 중 groupkey_columns, y_column, 컬럼 명 list를 제외한 나머지 컬럼을 학습 컬럼으로 사용합니다.
  • 사용법
    • drop_x_columns: []
  • ui_args: O

groupkey_columns

groupkey 기능은 특정 컬럼의 값 기준으로 데이터를 grouping하여 분석하는 방식입니다. 아래와 같은 표가 있을 때, 'groupkey col'을 그룹키 컬럼으로 지정하면 'groupkey col' 컬럼 값이 A인 데이터와 B인 데이터 각각 모델링이 진행됩니다. 이때, 'groupkey col'은 groupkey column, A,B는 groupkey가 됩니다. groupkey_columns argument를 사용하면 groupkey 기능을 사용할 수 있습니다.

x0...x10groupkey col
......A
......A
......B
......B
......A

groupkey_columns에 여러 컬럼 명을 list로 입력한 경우, readiness asset은 groupkey_columns의 각 값을 concat한 하나의 통합 groupkey 컬럼을 생성합니다. 예를 들어 groupkey_columns: \[Gender, Pclass]를 입력할 경우, 'Gender_Pclass' 라는 새로운 groupkey 컬럼이 input dataframe에 추가 됩니다. 단, classification일 경우, groupkey마다 y_column의 class 종류는 동일해야 합니다. y_column의 class 종류가 다른 그룹(groupkey)은 학습에서 제외됩니다. 즉, y_column 값이 A,B,C로 구성될 때, 특정 그룹의 y_column이 A,B로만 구성되어 있을 경우 해당 그룹은 학습에서 제외 됩니다. 그 외 readiness asset에서 학습 조건을 만족하지 않는 그룹(groupkey)은 학습에서 제외됩니다.

  • Argument type: Custom
  • 입력 type
    • list
  • 입력 가능한 값
    • 컬럼 명 list
  • 사용법
    • groupkey_columns: [col1, col2]
  • ui_args: O

min_rows

학습 시 필요한 최소 row 수를 지정합니다. 학습 데이터가 최소 row 수를 만족하지 못하면 error를 일으킵니다. Default 값으로 task_type: classification시 30, regression시 100 값이 설정되어 있습니다. default 값을 사용하면 classification시 y 라벨 별 30개 이상 데이터 존재해야 하며, regression시 전체 데이터 수가 100개 이상이어야 학습이 가능합니다. min_rows 값을 사용자가 입력하면 classification의 경우 y 라벨 별로 데이터 수가 입력한 min_rows 만큼 존재해야 하며, regression의 경우 전체 데이터 수가 입력한 min_rows 이상 존재해야 학습이 가능합니다. 예를 들어 default 값을 사용하지 않고 min_rows: 50으로 사용자가 experimental_plan.yaml에 argument를 추가하면 classification의 경우 y 라벨 마다 50개 이상의 데이터가 필요하며, regression의 경우 전체 데이터에 대해 50개 이상일 경우에만 학습이 진행됩니다.

groupkey 기능을 사용한다면(groupkey_columns) 특정 groupkey가 min_rows 조건을 만족하지 못할 때, 해당 groupkey는 학습 대상 groupkey에서 제외됩니다. groupkey 기능을 사용할 경우에는 모든 groupkey가 min_row 조건을 만족하지 못할 경우 error를 일으킵니다.

  • Argument type: Custom
  • 입력 type
    • int
  • 입력 가능한 값
    • default
      • 30 (classification, y_column의 class 별 데이터 수가 30개 이상이어야 함)
      • 100 (regression, 전체 데이터 수가 100개 이상이어야 함)
    • 숫자 값
  • 사용법
    • min_rows: 50
  • ui_args: X

cardinality

categorical/numeric 컬럼 자동 분류 기능을 사용할 때 categorical_columns가 갖추어야 하는 cardinality 조건입니다. categorical 컬럼의 값의 종류(unique 값)가 지정된 cardinality argument 값 보다 같거나 작아야 categorical 컬럼으로 최종 분류합니다. 만약 특정 컬럼의 unique 값의 수가 cardinality argument보다 클 경우, 해당 컬럼은 categorical 컬럼으로 분류되지 않고 학습 컬럼에서 제외됩니다.  

  • Argument type: Custom
  • 입력 type
    • int
  • 입력가능한 값
    • 50 (default)
    • 숫자 값
  • 사용법
    • cardinality: 50
  • ui_args: X

num_cat_split

categorical/numeric 컬럼 자동 분류 기능을 사용할 때(column_types: auto), 자주 등장하는 top N 데이터의 numeric/object 여부를 검사하여 numeric/categorical 컬럼을 분류합니다. num_cat_split은 N값을 지정합니다.

  • Argument type: Custom
  • 입력 type
    • int
  • 입력 가능한 값
    • 10 (default)
    • 숫자 값
  • 사용법
    • num_cat_split: 10
  • ui_args: X

ignore_new_category

inference시 categorical 컬럼에 학습에 사용되지 않은 값이 들어왔을 때 동작을 제어합니다. 예를 들어 train시 categorical 컬럼에 onehot encoding을 적용한 경우, 모델은 train 데이터를 기준으로 onehot encoding된 컬럼을 학습합니다. inference시 categorical 컬럼에 학습에 사용되지 않은 새로운 카테고리 값이 들어올 경우, 해당 카테고리 값은 기존에 학습한 onehot encoding 컬럼으로 처리할 수 없게 됩니다. 따라서 inference 시 학습에 사용되지 않은 카테고리 컬럼이 들어올 가능성이 크다면, ignore_new_category argument를 사용하여 동작을 제어하는 것이 좋습니다.

  • Argument type: Custom
  • 입력 type
    • boolean
    • float
  • 입력 가능한 값
    • False (default)
      • inference시 학습에 사용하지 않은 카테고리 값이 들어오면 Error가 발생합니다.
    • True
      • inference시 학습에 사용하지 않은 카테고리 값이 들어오면 해당 값에 결측치를 채워 inference를 진행합니다. (preprocess asset의 결측치 처리 로직에 따라 결측치를 처리합니다.)
      • catboost encoding을 사용하면 학습에 사용하지 않은 카테고리 데이터에 대해 결측치 처리를 하지 않고도 인코딩이 가능합니다.categorical_encoding
    • 0-1사이 float 값
      • ex) 0.3
      • 전체 데이터에서 학습에 사용되지 않은 카테고리 값이 있는 행의 비율이 0.3 이하일 경우에는 해당 값에 결측치를 채워 inference를 진행합니다.
      • 전체 데이터에서 학습에 사용되지 않은 카테고리 값이 있는 행의 비율이 0.3 초과일 경우에는 error가 발생합니다.(groupkey컬럼이 있을 경우 해당 그룹을 학습에서 제외)
  • 사용법
    • ignore_new_category: False
  • ui_args: X

Preprocess asset

save_original_columns

Preprocess asset에서는 학습 대상 컬럼(x_columns)에 다양한 전처리 방법론을 적용합니다. save_original_columns는 preprocess asset의 결과 dataframe에 학습 대상 컬럼인 x_columns의 원본을 붙여 다음 asset으로 전달할지 선택합니다. save_original_columns 여부와 상관 없이 다음 asset에서 사용하는 학습 대상 컬럼은 preprocess asset에서 전처리 된 학습 컬럼으로 대체됩니다.

  • Argument type: Custom
  • 입력 type
    • boolean
  • 입력 가능한 값
    • True (default)
      • 학습에 쓰이지 않은 컬럼 + 학습 대상 컬럼(x_columns) + 전처리 된 학습 컬럼을 다음 asset으로 전달합니다.
      • y컬럼과 전처리 된 y컬럼이 dataframe에 포함됩니다.
    • False
      • 학습에 쓰이지 않은 컬럼 + 전처리 된 학습 컬럼을 다음 asset으로 전달합니다. (x_columns 원본 삭제)
      • y컬럼과 전처리 된 y컬럼이 dataframe에 포함됩니다.
  • 사용법
    • save_original_columns: True
  • ui_args: O

categorical_encoding

categorical_encoding은 category 컬럼에 적용할 인코딩 방법론을 지정합니다. {방법론: 값}의 dictionary형태로 입력합니다. {방법론: 값}의 '값'에는 방법론을 적용할 '컬럼 list' 또는 'all'을 입력할 수 있습니다. 이 때, all은 categorical 컬럼 전체입니다. 현재 지원하는 categorical encoding은 아래와 같습니다. categorical_eocnding은 학습 대상 컬럼인 x_columns에 대해서 만 동작합니다. x_columns의 categorical 컬럼을 넣어주세요. y 컬럼은 task_type: classification의 경우 label encoding이 적용되며 변경할 수 없습니다.

  • binary: binary encoding
  • catboost: catboost encoding
  • onehot: onehot encoding
  • label: label encoding

현재 default로 모든 학습 대상 categorical 컬럼에 binary encoding을 적용합니다. categorical_encoding을 사용할 때, 일부 컬럼을 지정하면 나머지 컬럼은 자동으로 default rule(binary)이 적용됩니다. ex) categorical_encoding: {label: [col1]}일 경우, col1을 제외한 나머지 categorical 컬럼에는 binary encoding이 적용됩니다.

  • Argument type: Custom
  • 입력 type
    • dictionary
  • 입력 가능한 값
    • default
      • x_columns
        • {binary: all}
      • y_column
        • label encoding 적용
    • {방법론1: 컬럼 list, 방법론2: 컬럼 list}
  • 사용법
    • categorical_encoding: {binary: [col1], catboost: [col2]}
  • ui_args: X

handle_missing

handle_missing은 categorical, numeric 컬럼에 적용할 결측치 처리 방식을 지정합니다. {방법론: 값}의 dictionary형태로 입력합니다. categorical/numeric 컬럼 유형에 따라 적용할 수 있는 방법론이 다릅니다. '값'에는 '컬럼 list' 및 'categorical_all', 'numeric_all', 'all'을 사용할 수 있습니다. handle_missing은 사용자가 별도로 방법론을 지정하지 않으면 학습 대상 컬럼의 결측치에 default 로직이 적용됩니다. handle_missing에 일부 컬럼을 입력하면 나머지 학습 대상 컬럼에는 자동으로 default rule이 적용됩니다. handle_missing은 학습 대상 컬럼인 x_columns에 대해서 만 동작합니다. x_columns의 컬럼을 넣어주세요. train pipeline시 y 컬럼의 결측치 행은 자동으로 삭제됩니다.

  • categorical 컬럼만 적용 가능
    • {방법론: 값} 값에 'categorical 컬럼 list' 또는 'categorical_all'을 입력할 수 있습니다. (categorical_all 입력 시 categorical 컬럼 전체)
    • frequent: 컬럼 내 가장 많이 등장한 값으로 결측치를 채웁니다.
  • numeric 컬럼만 적용 가능
    • {방법론: 값} 값에 'numeric 컬럼 list' 및 'numeric_all'을 입력할 수 있습니다. (numeric_all 입력 시 numeric 컬럼 전체)
    • mean: 컬럼의 평균 값으로 결측치를 채웁니다.
    • median: 컬럼의 중앙값을 기준으로 결측치를 채웁니다.
    • interpolation: 컬럼의 결측치 row 주변 값의 평균으로 값을 채웁니다.
  • 모든 컬럼 유형에 적용 가능한 방법론
    • {방법론: 값} 값에 '컬럼 list' 및 'all', 'categorical_all', 'numeric_all'을 입력할 수 있습니다. (all 입력 시 컬럼 전체)
    • drop: 컬럼 내 결측치가 있는 행을 제거합니다.
    • fill_값: '값'에 입력한 값으로 컬럼의 결측치를 채웁니다.

categorical_all, numeric_all, all 타입 사용 에시는 아래와 같습니다.

  • handle_missing: {frequent: categorical_all, fill_0: numeric_all}
    • categorical 컬럼에는 frequent(categorical 방법론에만 사용 가능)를, numeric 컬럼에는 결측치를 0으로 채웁니다.
  • handle_missing: {fill_0: categorical_all, fill_1: numeric_all}
    • categorical 컬럼에는 결측치를 0로, numeric 컬럼에는 결측치를 1로 채웁니다.
  • handle_missing: {fill_0: all}
    • 모든 컬럼의 결측치에 0을 채웁니다.
  • handle_missing: {fill_0: numeric_all}
    • numeric 컬럼의 결측치에는 0을 채우고, categorical 컬럼의 결측치에는 default 로직이 적용됩니다.

categorical_all과 numeric_all은 함께 쓰일 수 있으나 categorical_all과 all, numeric_all과 all은 함께 쓰일 수 없습니다.

  • Argument type: Custom
  • 입력 type
    • dictionary
  • 입력 가능한 값
    • default
      • x_columns
        • {frequent: categorical_all, median: numeric_all}
      • y_column
        • drop 적용
    • {방법론1: 컬럼 list, 방법론2: 컬럼 list}
  • 사용법
    • handle_missing: {fill_1: [col1], fill_2: [col2]}
  • ui_args: X

numeric_outlier

numeric 컬럼에 적용할 outlier 제거 방법을 선택합니다. {방법론: 값}의 dictionary형태로 입력합니다. {방법론: 값}의 '값'에는 방법론을 적용할 '컬럼 list' 또는 'all'을 입력할 수 있습니다. 이 때, all은 numeric 컬럼 전체입니다. 현재 지원하는 outlier 제거 방법론은 아래와 같습니다. numeric_outlier는 학습 대상 컬럼인 x_columns에 대해서 만 동작합니다. x_columns의 numeric 컬럼을 넣어주세요

  • normal: 현재 데이터 분포에서 3sigma 넘는 이상치를 제거

numeric_outlier는 default값이 없습니다. 즉, 사용자가 experimental_plan.yaml에 등록하지 않으면 어떠한 방법론도 적용되지 않습니다.

  • Argument type: Custom
  • 입력 type
    • dictionary
  • 입력 가능한 값
    • default X
    • {방법론: 컬럼 list}
  • 사용법
    • numeric_outlier: {normal: [col1, col2]}
  • ui_args: X

numeric_scaler

numeric 컬럼에 적용할 scaling 방법을 선택합니다. {방법론: 값}의 dictionary형태로 입력합니다. {방법론: 값}의 '값'에는 방법론을 적용할 '컬럼 list' 또는 'all'을 입력할 수 있습니다. 이 때, all은 numeric 컬럼 전체입니다. 현재 지원하는 scaling 방법론은 아래와 같습니다. numeric_scaler는 학습 대상 컬럼인 x_columns에 대해서 만 동작합니다. x_columns의 numeric 컬럼을 넣어주세요

  • standard: 평균과 표준편차를 사용한 scaling. z=(x-u)/s (u: mean, s: std)
  • minmax: 최대값이 1, 최소값이 0이 되도록 분포를 유지하며 scaling.
  • robust: 평균과 분산 대신 중간값과 사분위값 사용하여 scaling.
  • maxabs: 데이터의 최대 절댓값이 1, 0값은 0이 되도록 scaling
  • normalizer: 컬럼 기준이 아닌 행마다 정규화가 진행. 한 행의 모든 feature 사이의 유클리드 거리가 1이 되도록 scaling

numeric_scaler는 default값이 없습니다. 즉, 사용자가 experimental_plan.yaml에 등록하지 않으면 어떠한 방법론도 적용되지 않습니다.

  • Argument type: Custom
  • 입력 type
    • dictionary
  • 입력 가능한 값
    • default X
    • {방법론: 컬럼 list}
  • 사용법
    • numeric_outlier: {standard: [col1], minmax: [col2]}
  • ui_args: X  

Sampling asset

data_split

HPO시 train/validation set을 구성하는 방법론을 선택합니다. {method: 방법론, options: 값}의 dictionary형태로 입력합니다. 입력할 수 있는 '방법론 - 값' 조합은 아래와 같습니다.

  • cross validation
    • {method: cross_validation, options: 3}
    • cross-validation 방법론을 사용하며, options는 kfold를 의미하고 위는 kfold 3로 세팅 된 case입니다.
  • train/test split
    • {method: train_test, options: 0.3}
    • 데이터를 train/validation set으로 sampling하여 나눕니다. options에 validation set의 비율을 입력합니다. 위 예시는 train:validation = 7:3으로 샘플링하여 학습됩니다.

데이터가 몇 번째 cross_validation set이었는지, train 또는 validation set으로 사용되었는지 여부는 output.csv의 'data_split' 컬럼에서 확인할 수 있습니다.

  • Argument type: 필수
  • 입력 type
    • dictionary
  • 입력 가능한 값
    • {method: cross_validation, options: 3} (default)
    • {method: 방법론, options: 값}
  • 사용법
    • data_split: {method: cross_validation, options: 3}
  • ui_args: X        

over_sampling

y_column의 label 기준으로 over sampling 방법론을 적용합니다. over_sampling argument는 sampling할 데이터 수 계산 방법에 따라 2가지 유형으로 나뉩니다.

  1. ratio: y_column의 label이 ratio 비율이 되도록 sampling
over_sampling: {
method: random,
label: B,
ratio: 2
}
# label B가 2배 되도록 random over sampling
  1. compare: y_column의 label이 compare target label의 multiply 배가 되도록 sampling
over_sampling: {
method: random,
label: B,
compare: {
target: A,
multiply: 10
}
}
# label B가 A의 10배가 되도록 sampling

dictionary 형태로 기입하며 각 key값과 value 값은 아래와 같이 작성합니다.

key: method

  • over sampling 방법론을 입력합니다. 사용 가능한 방법론은 아래와 같습니다.
    • random: random over sampling을 적용합니다.
    • smote: smote 방법론을 적용하여 over sampling 합니다.

key: label

  • sampling 방법론을 적용할 y_column의 label을 입력합니다.
    • label 값 1개. ex) A
    • sampling을 적용할 label 값이 여러 개일 경우 list로 작성. ex) [A, B]

key: ratio(type1)

  • 각 'label'을 입력한 비율이 되도록 sampling 합니다.
    • float 값을 입력합니다. ex) 2.5
    • 1 이하의 수를 적을 경우 sampling을 적용하지 않습니다.

key: compare(type2)

  • target label의 n배가 되도록 sampling합니다. 하위 dictionary를 작성합니다. ex) compare: {target: C, multiply: 10}
    • sub_key: target
      • sampling 할 데이터 수 결정에 기준이 되는 label을 입력합니다.
      • label 값 1개. ex) compare: {target: C ...}
    • sub_key: multiply
      • target값의 multiply배 만큼 label에 sampling을 적용합니다.
      • float 값을 입력합니다. ex) label: [A,B], compare: {target: C, multiply: 10} - A,B가 C의 10배가 되도록 over sampling 합니다.
      • 'label'을 list로 작성했을 때, multiply도 list로 작성하면, 각 label에 multiply값이 적용됩니다. ex) label: [A, B], compare: {target: C, multiply: [2, 3]}: A는 C의 2배, B는 C의 3배 over sampling 합니다.
      • 입력한 데이터 수 보다 label에 더 많은 데이터가 들어있으면 over sampling을 하지 않습니다. 즉, over sampling하여 데이터 수를 100개 만들고자 할 때, 이미 데이터가 200개 있으면 over sampling을 적용하지 않습니다.    

over_sampling는 default값이 없습니다. 즉, 사용자가 experimental_plan.yaml에 등록하지 않으면 어떠한 방법론도 적용되지 않습니다.  

  • Argument type: Custom
  • 입력 type
    • dictionary
  • 입력 가능한 값
    • 위 dictionary 포맷에 맞게 작성합니다.
    • ratio type
      • {method: 방법론, label: 라벨 명, ratio: 1 초과 float}
      • ex) {method: smote, label: A, ratio: 10} - y_column의 label A를 10배 smote over sampling 합니다.
      • ex) {method: random, label: [A,B], ratio: 10} - y_column의 label A를 10배, B를 10배 random over sampling 합니다.
      • ex) {method: smote, label: [A,B], ratio: [10,12]} - y_column의 label A를 10배, B를 12배 smote over sampling 합니다.
    • compare type
      • {method: 방법론, label: 라벨 명, compare: {target: 라벨 명, multiply: float}}
      • ex) {method: random, label: A, compare: {target: C, multiply: 5}} - y_column의 label A를 label C의 5배가 되도록 random over sampling 합니다.
      • ex) {method: random, label: [A,B], compare: {target: C, multiply: 5}} - y_column의 label A, B를 label C의 5배가 되도록 random over sampling 합니다.
      • ex) {method: random, label: [A,B], compare: {target: C, multiply: [5,10]}} - y_column의 label A를 label C의 5배, B를 label C의 10배가 되도록 random over sampling 합니다.
  • 사용법
    • over_sampling: {method: smote, label: A, ratio: 10}
  • ui_args: X

under_sampling

y_column의 label 기준으로 under sampling 방법론을 적용합니다. under_sampling argument는 sampling할 데이터 수 계산 방법에 따라 2가지 유형으로 나뉩니다.

  1. ratio: y_column의 label이 ratio 비율이 되도록 sampling
under_sampling: {
method: random,
label: B,
ratio: 0.5
}
# label B가 0.5배 되도록 random under sampling
  1. compare: y_column의 label이 compare target label의 multiply 배가 되도록 sampling
over_sampling: {
method: random,
label: B,
compare: {
target: A,
multiply: 2
}
}
# label B가 A의 2배가 되도록 sampling
# 이때, A의 2배가 B 데이터 수 보다 작아야 under sampling 적용

dictionary 형태로 기입하며 각 key값과 value 값은 아래와 같이 작성합니다.

key: method

  • under sampling 방법론을 입력합니다. 사용 가능한 방법론은 아래와 같습니다.
    • random: random under sampling을 적용합니다.
    • nearmiss: 소수 클래스와 다수 클래스 간 구분이 어려운 데이터(거리가 가까운 데이터)를 sampling합니다.

key: label

  • sampling 방법론을 적용할 y_column의 label을 입력합니다.
    • label 값 1개. ex) A
    • sampling을 적용할 label 값이 여러 개일 경우 list로 작성. ex) [A, B]

key: ratio(type1)

  • 각 'label'을 입력한 비율이 되도록 sampling 합니다.
    • float 값을 입력합니다. ex) 0.7
    • 1 이상의 수를 적을 경우 sampling을 적용하지 않습니다.

key: compare(type2)

  • target label의 n배가 되도록 sampling합니다. 하위 dictionary를 작성합니다. ex) compare: {target: C, multiply: 0.5}
    • sub_key: target
      • sampling 할 데이터 수 결정에 기준이 되는 label을 입력합니다.
      • label 값 1개. ex) compare: {target: C ...}
    • sub_key: multiply
      • target값의 multiply배 만큼 label에 sampling을 적용합니다.
      • float 값을 입력합니다. ex) label: [A,B], compare: {target: C, multiply: 0.5} - A,B가 C의 0.5배가 되도록 under sampling 합니다.
      • 'label'을 list로 작성했을 때, multiply도 list로 작성하면, 각 label에 multiply값이 적용됩니다. ex) label: [A, B], compare: {target: C, multiply: [0.2, 0.3]}: A는 C의 0.2배, B는 C의 0.3배 under sampling 합니다.
      • 입력한 데이터 수 보다 label에 더 적은 데이터가 들어있으면 under sampling을 하지 않습니다. 즉, under sampling하여 데이터 수를 100개 만들고자 할 때, 이미 데이터가 90개 있으면 under sampling을 적용하지 않습니다.    

under_sampling는 default값이 없습니다. 즉, 사용자가 experimental_plan.yaml에 등록하지 않으면 어떠한 방법론도 적용되지 않습니다.

  • Argument type: Custom
  • 입력 type
    • dictionary
  • 입력 가능한 값
    • 위 dictionary 포맷에 맞게 작성합니다.
    • ratio type
      • {method: 방법론, label: 라벨 명, ratio: 1 미만 float}
      • ex) {method: nearmiss, label: A, ratio: 0.5} - y_column의 label A를 0.5배 nearmiss under sampling 합니다.
      • ex) {method: random, label: [A,B], ratio: 0.5} - y_column의 label A를 0.5배, B를 0.5배 random under sampling 합니다.
      • ex) {method: random, label: [A,B], ratio: [0.5,0.3]} - y_column의 label A를 0.5배, B를 0.3배 random under sampling 합니다.
    • compare type
      • {method: 방법론, label: 라벨 명, compare: {target: 라벨 명, multiply: float}}
      • ex) {method: random, label: A, compare: {target: C, multiply: 0.5}} - y_column의 label A를 label C의 0.5배가 되도록 random under sampling 합니다.
      • ex) {method: random, label: [A,B], compare: {target: C, multiply: 0.5}} - y_column의 label A, B를 label C의 0.5배가 되도록 random under sampling 합니다.
      • ex) {method: random, label: [A,B], compare: {target: C, multiply: [0.5,0.2]}} - y_column의 label A를 label C의 0.5배, B를 label C의 0.2배가 되도록 random under sampling 합니다.
  • 사용법
    • under_sampling: {method: nearmiss, label: A, ratio: 0.5}
  • ui_args: X

random_state

random_state 값을 지정하면 sampling 수행 마다 동일한 결과 값을 얻을 수 있습니다.

  • Argument type: Custom
  • 입력 type
    • int
  • 입력 가능한 값
    • 양의 정수
  • 사용법
    • random_state: 123
  • ui_args: X

Train asset

evaluation_metric

HPO시 best 모델을 선정하기 위한 평가 metric을 선택합니다. Default 값인 'auto'를 사용하면 task_type이 classification일 경우 accuracy, regression일 경우 mse를 선택합니다. 만약, HPO과정에서 evaluation_metric 값이 같은 모델이 여러개 등장하면, 다음과 같은 우선순위로 모델 우선순위를 정하게 됩니다.

  • evaluation_metric 값이 동일할 떄:
    • classificaiton의 경우 accuracy, f1, recall, precision 순으로 evaluation_metric을 제외한 나머지 metric을 모델별로 비교합니다. (accuracy를 선택하면, f1, recall, precision 순으로 값 비교)
    • regression의 경우 r2, mse, mae, rmse 순으로 evaluation_metric을 제외한 나머지 metric을 모델별로 비교합니다.
  • 모든 평가 지표 값이 동일할 때:
    • 모델의 사이즈가 작을 수록, 모델 사이즈가 유사할 때는 rf, lgbm, gbm, xgb, cb 모델 순으로 선택합니다.

단 모든 평가 지표 값이 동일할 때, 사용자가 모델을 직접 추가한 경우 사용자가 추가한 모델이 가장 우선순위가 높습니다.

  • Argument type: 필수
  • 입력 type
    • string
  • 입력 가능한 값
    • auto (default)
      • task_type이 classification일 때: accuracy
      • task_type이 regression일 때: mse
    • task_type: classification일 때
      • accuracy
      • f1
      • recall
      • precision
    • task_type: regression일 때
      • mse
      • r2
      • mae
      • rmse
  • 사용법
    • evaluation_metric: auto
  • ui_args: O

shapley_value

shapley value를 계산하여 output.csv에 함께 출력할지 결정합니다. shapley_value를 계산하면(shapley_value: True) 산출물로 shap value 요약 plot이 {결과물 폴더}/extra_output/train/summary_plot.png경로에 저장됩니다. summary plot을 통해 feature 마다 어떤 class에 영향을 주고 있는지 확인할 수 있습니다.

  • Argument type: 필수
  • 입력 type
    • boolean
  • 입력 가능한 값
    • False (default)
      • shapley value를 계산하지 않습니다.
    • True
      • shapley value를 계산합니다.
  • 사용법
    • shapley_value: False
  • ui_args: O

output_type

모델링 결과 컬럼 만 output.csv에 남길지, 전체 컬럼을 output.csv에 남길지 결정합니다. 모델링 결과 컬럼은 아래와 같습니다.

  • prob_{y class 명},...
    • 모델이 해당 데이터를 특정 class로 분류할 확률 값입니다. class 수 만큼 컬럼이 생성 됩니다.
  • pred_{y 컬럼 명}
    • 모델이 예측한 y 값 컬럼입니다.
  • shap_{학습 컬럼 명}
    • shapley_value가 True일 때 shapley value 컬럼이 출력됩니다. 학습 컬럼(x_columns) 수 만큼 생성됩니다.

output_type을 'all'로 설정하면, train/inference asset에 들어온 전체 데이터와 모델링 결과 컬럼을 output.csv에 저장합니다. output_type을 'simple'로 기입할 경우, 모델링 결과 컬럼 만 output.csv에 저장합니다. 분석에 사용하는 데이터의 크기가 크다면 output_type을 'simple'로 설정해 output.csv 파일 사이즈를 줄일 수 있습니다.

  • Argument type: 필수
  • 입력 type
    • string
  • 입력 가능한 값
    • all (default)
      • asset에 들어온 데이터와 모델링 결과 컬럼 모두 output.csv에 저장합니다.
    • simple
      • 모델링 결과 컬럼만 output.csv에 저장합니다.
  • 사용법
    • output_type: all
  • ui_args: O

model_list

HPO로 비교할 모델을 list 형태로 입력합니다. 현재 TCR에는 5종의 Tree계열 모델이 탑재되어 있으며, 별도로 사용자가 model_list argument를 추가하지 않으면 5종 모델 전체에 대해 HPO가 진행됩니다. 현재 사용가능한 TCR의 default 모델 list는 아래와 같습니다.

  • rf: random forest
  • gbm: gradient boosting machine
  • lgbm: light gradient boosting machine
  • cb: catoost
  • xgb: Extreme Gradient Boosting

model_list에 빈 list([])를 입력하면 default([rf, gbm, lgbm, cb, xgb])로 반영됩니다. hpo_settings에 값을 입력하더라도, model_list에 해당 모델 명이 없으면 HPO에 추가되지 않습니다. 솔루션 개발 시 모델 탬플릿을 작성하여 새롭게 추가한 모델을 HPO 리스트에 추가하기 위해서는, 모델의 요약어를 model_list에 추가해야 합니다.

  • Argument type: Custom
  • 입력 type
    • list
  • 입력 가능한 값
    • [rf, gbm, lgbm, cb, xgb] (default. []로 입력해도 동일한 동작)
  • 사용법
    • model_list: [rf, gbm, lgbm, cb, xgb]
  • ui_args: X

hpo_settings

model_list의 모델에 대해 parameter를 변경합니다. {모델명: {parameter1: search list, tcr_param_mix: 'one_to_one'}}의 형태로 입력합니다.

{rf: {max_depth: [100, 300, 500], n_estimators: [300, 400, 500], min_sample_leaf: 3, tcr_param_mix: one_to_one}}

위 예시의 경우, max_depth의 경우에는 100,300,500, n_estimators에 대해서는 300,400,500이 검사 조건입니다. mean_sample_leaf은 3이 입력되어 있는데 parameter에 list가 아닌 숫자 값이 들어가면 해당 값으로 parameter를 고정합니다. 'tcr_param_mix'에 입력 가능한 값과 기능은 아래와 같습니다.

  • one_to_one
    • 각 element끼리 1:1 대응하여 HPO를 진행합니다. parameter value가 list인 경우에는 elements 수 가 동일해야 합니다.
    • one_to_one일 때, 위 예시는 {max_depth: 100, n_estimators: 300, min_sample_leaf: 3}, {max_depth: 300, n_estimators: 400, min_sample_leaf: 3}, {max_depth: 500, n_estimators: 500, min_sample_leaf: 3}가 됩니다.
  • all
    • 입력한 parameter list의 모든 조합으로 HPO를 진행합니다.
    • all일 때, 위 예시는 {max_depth: 100, n_estimators: 300, min_sample_leaf: 3}, {max_depth: 100, n_estimators: 400, min_sample_leaf: 3},...,{max_depth: 500, n_estimators: 500, min_sample_leaf: 3}와 같이 max_depth: [100,300,500], n_estimators: [300,400,500]의 모든 조합에 대해 계산합니다.

model_list에는 있지만 hpo_settings에 기입하지 않은 모델의 경우, 모델 파일 내 기재된 default parameter를 사용합니다. 즉, model_list는 default(5종 모델)이며 {rf: {max_depth: [100, 300, 500], n_estimators: [300, 400, 500], min_sample_leaf: 3, tcr_param_mix: one_to_one}}를 입력하면 rf를 제외한 나머지 4종의 모델은 모델 파일 내 default parameter를 사용합니다.

  • Argument type: Custom
  • 입력 type
    • dictionary
  • 입력 가능한 값
    • 모델 파일의 default parameter set 사용 (default)
    • {모델명: {parameter1: search list, tcr_param_mix: one_to_one 또는 all}}
  • 사용법
    • hpo_settings: {rf: {max_depth: [100, 300], n_estimators: 300, tcr_param_mix: one_to_one}}
  • ui_args: X      

shapley_sampling

shapley_value 값이 True일 때, 모든 데이터에 대해 sampling하지 않고 일부 만 sampilng 하여 shapley value를 출력할 수 있습니다. 데이터가 많을 때 모든 값에 대해 shapley value 값을 구할 시 학습 시간이 오래 걸리기 때문에, 일부 데이터를 샘플링 하여 shapley value를 계산하면 학습 시간을 줄일 수 있습니다.

  • Argument type: Custom
  • 입력 type
    • float
    • int
  • 입력 가능한 값
    • 10000 (default)
    • 0-1 사이의 float
      • 해당 비율 만큼 sampling 합니다.
    • 1
      • 모든 값에 대해 sampling 합니다
    • 1보다 큰 int
      • 입력 값 만큼 sampling 합니다.
  • 사용법
    • shapley_sampling: 10000
  • ui_args: X

multiprocessing

Multiprocessing 사용 여부를 입력합니다. Default 값은 multiprocessing을 사용하지 않음을 의미하는 False이며, 현재 Melleriakt에서는 multiproessing 사용을 권장하지 않습니다.

  • Argument type: Custom
  • 입력 type
    • Boolean
  • 입력 가능한 값
    • False (default)
    • True
  • 사용법
    • multiprocessing: False
  • ui_args: O

num_cpu_core

Multiprocessing시 사용할 CPU core 수를 입력합니다.

  • Argument type: Custom
  • 입력 type
    • int
  • 입력 가능한 값
    • 3 (default)
    • 0 보다 큰 int
  • 사용법
    • num_cpu_core: 3
  • ui_args: O

TCR Version: 3.0.0