범주형 데이터: 일반적인 문제
컬렉션을 사용해 정리하기
내 환경설정을 기준으로 콘텐츠를 저장하고 분류하세요.
숫자 데이터는 과학 기기나 자동 측정으로 기록되는 경우가 많습니다. 반면 범주형 데이터는 사람 또는 머신러닝 (ML) 모델로 분류되는 경우가 많습니다. 누가 카테고리와 라벨을 결정하고 이러한 결정을 내리는 방법은 데이터의 신뢰성과 유용성에 영향을 미칩니다.
인간 평가자
사람이 수동으로 라벨을 지정한 데이터를 골드 라벨이라고 하며, 학습 모델에서는 비교적 우수한 데이터 품질로 인해 머신으로 라벨을 지정한 데이터보다 더 바람직하다고 간주됩니다.
그렇다고 해서 사람이 라벨을 지정한 데이터 세트가 반드시 고품질이라는 의미는 아닙니다. 인간의 실수, 편향, 악의는 데이터 수집 시점이나 데이터 정리 및 처리 중에 발생할 수 있습니다. 학습 전에 확인하세요
두 사람이 동일한 예시를 다르게 라벨링할 수 있습니다. 인간 평가자의 결정 간의 차이를 평가자 간 동의라고 합니다.
예시당 여러 평가자를 사용하고 평가자 간 동의 여부를 측정하면 평가자 의견의 차이를 파악할 수 있습니다.
클릭하여 상호 평가자 일치도 측정항목에 대해 알아보기
다음은 평가자 간 동의를 측정하는 방법입니다.
- 코헨의 카파 및 변형
- 내적클래스 상관(ICC)
- Krippendorff의 알파
코헨 카파 및 집단 내 상관에 관한 자세한 내용은 Hallgren 2012를 참고하세요. Krippendorff의 알파에 관한 자세한 내용은
Krippendorff 2011을 참고하세요.
머신 평가자
하나 이상의 분류 모델에 의해 카테고리가 자동으로 결정되는 머신 라벨 데이터는 실버 라벨이라고도 합니다.
머신 라벨이 지정된 데이터의 품질은 매우 다양할 수 있습니다. 정확성과 편향뿐만 아니라 상식, 현실, 의도를 위반하는지 여부도 확인하세요. 예를 들어 컴퓨터 비전 모델이 치와와 사진에 머핀 라벨을 지정하거나 머핀 사진에 치와와 라벨을 지정하면 라벨이 지정된 데이터로 학습된 모델의 품질이 떨어집니다.
마찬가지로 중립적인 단어의 점수를 -0.25로 매기는 감정 분석 도구는 0.0이 중립적 값일 때 데이터에 실제로 존재하지 않는 추가 부정적인 편향으로 모든 단어를 채점할 수 있습니다. 지나치게 민감한 유해성 감지기는 많은 중립적인 진술을 악의적이라고 잘못 신고할 수 있습니다. 데이터를 학습하기 전에 데이터에 있는 머신 라벨과 주석의 품질과 편향을 파악해 보세요.
고차원성
범주형 데이터는 고차원 특성 벡터, 즉 요소가 많은 특성 벡터를 생성하는 경향이 있습니다.
차원이 높을수록 학습 비용이 증가하고 학습이 더 어려워집니다. 이러한 이유로 ML 전문가는 종종 학습 전에 측정기준 수를 줄이는 방법을 모색합니다.
자연 언어 데이터의 경우 차원 수를 줄이는 기본 방법은 특징 벡터를 임베딩 벡터로 변환하는 것입니다. 이 내용은 이 과정의 뒷부분에 나오는 임베딩 모듈에서 설명합니다.
달리 명시되지 않는 한 이 페이지의 콘텐츠에는 Creative Commons Attribution 4.0 라이선스에 따라 라이선스가 부여되며, 코드 샘플에는 Apache 2.0 라이선스에 따라 라이선스가 부여됩니다. 자세한 내용은 Google Developers 사이트 정책을 참조하세요. 자바는 Oracle 및/또는 Oracle 계열사의 등록 상표입니다.
최종 업데이트: 2024-11-06(UTC)
[null,null,["최종 업데이트: 2024-11-06(UTC)"],[[["\u003cp\u003eCategorical data quality hinges on how categories are defined and labeled, impacting data reliability.\u003c/p\u003e\n"],["\u003cp\u003eHuman-labeled data, known as "gold labels," is generally preferred for training due to its higher quality, but it's essential to check for human errors and biases.\u003c/p\u003e\n"],["\u003cp\u003eMachine-labeled data, or "silver labels," can introduce biases or inaccuracies, necessitating careful quality checks and awareness of potential common-sense violations.\u003c/p\u003e\n"],["\u003cp\u003eHigh-dimensionality in categorical data increases training complexity and costs, leading to techniques like embeddings for dimensionality reduction.\u003c/p\u003e\n"]]],[],null,["# Categorical data: Common issues\n\nNumerical data is often recorded by scientific instruments or\nautomated measurements. Categorical data, on the other hand, is often\ncategorized by human beings or by machine learning (ML) models. *Who* decides\non categories and labels, and *how* they make those decisions, affects the\nreliability and usefulness of that data.\n\nHuman raters\n------------\n\nData manually labeled by human beings is often referred to as *gold labels*,\nand is considered more desirable than machine-labeled data for training models,\ndue to relatively better data quality.\n\nThis doesn't necessarily mean that any set of human-labeled data is of high\nquality. Human errors, bias, and malice can be introduced at the point\nof data collection or during data cleaning and processing. Check for them\nbefore training.\n\n\nAny two human beings may label the same example differently. The difference\nbetween human raters' decisions is called\n[**inter-rater\nagreement**](/machine-learning/glossary#inter-rater-agreement).\nYou can get a sense of the variance in raters' opinions by using\nmultiple raters per example and measuring inter-rater agreement.\n\n**Click to learn about inter-rater agreement metrics** \nThe following are ways to measure inter-rater agreement:\n\n- Cohen's kappa and variants\n- Intra-class correlation (ICC)\n- Krippendorff's alpha\n\nFor details on Cohen's kappa and intra-class correlation, see\n[Hallgren\n2012](https://www.ncbi.nlm.nih.gov/pmc/articles/PMC3402032/). For details on Krippendorff's alpha, see\n[Krippendorff 2011](https://www.asc.upenn.edu/sites/default/files/2021-03/Computing%20Krippendorff%27s%20Alpha-Reliability.pdf).\n\nMachine raters\n--------------\n\nMachine-labeled data, where categories are automatically determined by one or\nmore classification models, is often referred to as *silver labels* .\nMachine-labeled data can vary widely in quality. Check it not only for accuracy\nand biases but also for violations of common sense, reality, and intention. For\nexample, if a computer-vision model mislabels a photo of a\n[chihuahua as a muffin](https://www.freecodecamp.org/news/chihuahua-or-muffin-my-search-for-the-best-computer-vision-api-cbda4d6b425d/),\nor a photo of a muffin as a chihuahua, models trained on that labeled data will\nbe of lower quality.\n\nSimilarly, a sentiment analyzer that scores neutral words as -0.25, when 0.0 is\nthe neutral value, might be scoring all words with an additional negative bias\nthat is not actually present in the data. An oversensitive toxicity detector\nmay falsely flag many neutral statements as toxic. Try to get a sense of the\nquality and biases of machine labels and annotations in your data before\ntraining on it.\n\nHigh dimensionality\n-------------------\n\nCategorical data tends to produce high-dimensional feature vectors; that is,\nfeature vectors having a large number of elements.\nHigh dimensionality increases training costs and makes training more\ndifficult. For these reasons, ML experts often seek ways to reduce the number\nof dimensions prior to training.\n\nFor natural-language data, the main method of reducing dimensionality is\nto convert feature vectors to embedding vectors. This is discussed in the\n[Embeddings module](/machine-learning/crash-course/embeddings) later in\nthis course.\n| **Key terms:**\n|\n- [Inter-rater agreement](/machine-learning/glossary#inter-rater-agreement) \n[Help Center](https://support.google.com/machinelearningeducation)"]]