데이터 컨텍스트 생성

Great Expectations로 배우는 데이터 품질 입문

Davina Moossazadeh

Data Scientist

데이터 품질이란?

의도한 목적에 맞는 데이터셋의 적합도

  • 완전성
  • 정확성
  • 유효성
  • 유일성
  • 적시성
  • 무결성
  • 일관성

값 군집과 이상치를 보이는 산점도,

1 https://nitin9809.medium.com/outlier-detection-and-treatment-part-1-aa0b09f60e50
Great Expectations로 배우는 데이터 품질 입문

왜 데이터 품질이 중요한가?

쓰레기가 들어감.

훌륭한 모델이 쓰레기를 입력으로 받음.

쓰레기가 나옴.

모델의 성능은 입력 데이터만큼만 좋습니다!

Great Expectations로 배우는 데이터 품질 입문

Great Expectations란?

Great Expectations 로고.

Great Expectations (GX) - 데이터 품질 관리 플랫폼

  • GX Cloud - 웹 기반 UI
  • GX Core - Python 패키지
Great Expectations로 배우는 데이터 품질 입문

기대사항

기대사항(Expectation) - 데이터에 대한 검증 가능한 주장

  • 데이터셋 형태
  • 결측값
  • 중복
  • 값 집합/범위
  • 문자열 형식
  • 데이터 분포
  • 데이터 품질 이슈

images-1.png

1 https://docs.greatexpectations.io/docs/core/define_expectations/create_an_expectation/ https://mathbitsnotebook.com/Algebra2/Statistics/STnormalDistribution.html
Great Expectations로 배우는 데이터 품질 입문

데이터 컨텍스트

데이터 컨텍스트 - GX 배포의 주요 진입점

  • 모든 GX 구성요소의 설정 및 메서드
    • 데이터 소스
    • 기대사항 스위트
    • 체크포인트
    • 데이터 문서(Data Docs)
    • 검증 결과
    • 메트릭
1 https://docs.greatexpectations.io/docs/core/set_up_a_gx_environment/create_a_data_context/
Great Expectations로 배우는 데이터 품질 입문

GX 임포트

gx 별칭으로 Great Expectations 임포트:

import great_expectations as gx
Great Expectations로 배우는 데이터 품질 입문

데이터 컨텍스트 생성

get_context()로 데이터 컨텍스트 생성:

context = gx.get_context()

print(context)
{ "analytics_enabled": true,
  "checkpoint_store_name": "default_checkpoint_store",
  "config_variables_file_path": "uncommitted/config_variables.yml",
  "config_version": 4.0,
  "data_context_id": "5b407294-b17c-43e3-aa5f-4f8a4741e772",
  "expectations_store_name": "default_expectations_store",
  "fluent_datasources": {},
  "plugins_directory": "plugins/",
  "stores": {},
  "validation_results_store_name": "default_validations_store" }
Great Expectations로 배우는 데이터 품질 입문

연습해 봅시다!

Great Expectations로 배우는 데이터 품질 입문

Preparing Video For Download...