목적
데이터 양을 절대적으로 줄여 모델 적합 시간을 줄이되, 정보손실을 최소화할 수 있는 방법론을 탐색한다.
샘플링 분류
1. Probability Sampling: 랜덤하게 데이터를 추출하는 방법, 모집단의 모든 구성원이 선택될 가능성이 있는 추출
1) simple random sampling: 랜덤한 숫자를 줘서 무작위 추출
- python 함수: pandas.sample
2) systematic sampilng: 어떤 체계를 주어 무작위 추출 (예시: 6번째마다 추출, 문제점: 데이터의 순서에 따른 정보가 담겨 있으면 안됨)
- python 함수 (step size를 만들어 일정 구간의 데이터를 추출)
3) stratified sampling: 모집단을 n개의 그룹으로 나눠 임의로 k개의 데이터를 추출해서 합치는 방법
- python 함수: from sklearn.model_selection import StratifiedSuffleSplit
4) cluster sampling: 모집단을 여러개의 군집으로 나눠 군집 k개를 선택해 합치는 방법
- python 함수: cluster를 설정해 랜덤하게 추출
위의 표본추출을 python코드로 구현한 예시
simple-random-sampling | Kaggle
simple-random-sampling
Explore and run machine learning code with Kaggle Notebooks | Using data from Credit_data
www.kaggle.com
2. Non-Probability Sampling : 랜덤하지 않게 데이터를 추출하는 방법
1) convience sampling: 데이터를 수집하기 좋은 위치나 시기에 샘플링함 ( 통계적 추론 불가)
2) purposive sampling: 목적에 가장 적합한 데이터라고 생각하는 샘플 선택 (모집단의 대표성이 떨어짐)
3) quota sampling:
연구편향을 최소화하기 위해 샘플링 단계를 명확히 해야함. 대표 샘플이 부족한 경우 연구편향이 일어나거나 유효성에 영향을 미침.
유의할 점
1. 데이터 세트가 줄어든다고 잃어버린 정보량을 측정할 방법은 없음
1. k-최근접 이웃 알고리즘으로 다수의 clustering을 만든뒤 각 cluster별로 차이가 없다고 생각될때 하나의 cluster를 선택해서 학습
Prototype Reduction in Nearest Neighbor Classification: Prototype Selection and Prototype Generation | Soft Computing and Intell
sci2s.ugr.es
2. 밀도 보존 샘플링: 세트를 무작위로 선택하거나 층화된 그룹을 찾는 법
https://ieeexplore.ieee.org/stamp/stamp.jsp?arnumber=6360017
IEEE Xplore Full-Text PDF:
ieeexplore.ieee.org
3. 가장 간단한 무작위 샘플링
- 이해하기 쉽고 실수하기 어려우며 프로세스에 편향을 도입할 가능성이 없음.
- 여러 샘플들을 실험해보고 전체 데이터 세트에 대해 다시 실행하여 성능 향상을 추정해보면 됨
- 단순 샘플링으로 데이터 개수를 늘려가면서 robustness를 찾는 법도 괜찮음
교육 속도와 정확도 대 예제 수의 장단점을 보여주는 그래프는
https://github.com/szilard/benchm-ml
GitHub - szilard/benchm-ml: A minimal benchmark for scalability, speed and accuracy of commonly used open source implementations
A minimal benchmark for scalability, speed and accuracy of commonly used open source implementations (R packages, Python scikit-learn, H2O, xgboost, Spark MLlib etc.) of the top machine learning al...
github.com
Cleanlab Open-Sources ActiveLab: A Novel Active Learning Method For Data Labeling To Improve Machine Learning Models
Labeled data is essential for training supervised machine learning models, but mistakes made by data annotators can impact the model's accuracy. It is common to collect multiple annotations per data point to reduce annotation errors to establish a more rel
www.marktechpost.com
https://github.com/cleanlab/cleanlab
GitHub - cleanlab/cleanlab: The standard data-centric AI package for data quality and machine learning with messy, real-world da
The standard data-centric AI package for data quality and machine learning with messy, real-world data and labels. - GitHub - cleanlab/cleanlab: The standard data-centric AI package for data qualit...
github.com
GitHub - cleanlab/examples: Notebooks demonstrating example applications of the cleanlab library
Notebooks demonstrating example applications of the cleanlab library - GitHub - cleanlab/examples: Notebooks demonstrating example applications of the cleanlab library
github.com
데이터가 추가됨에 따라 성능의 robustness를 보인다면 cut-off를 하는 방법
ADP) 3-2. 파이썬으로 표본 추출: 단순랜덤 추출법, 계통추출법, 집락추출법, 층화추출법 (tistory.com)
ADP) 3-2. 파이썬으로 표본 추출: 단순랜덤 추출법, 계통추출법, 집락추출법, 층화추출법
파이썬으로 표본 추출 (Sampling) 하기 단순랜덤추출법 (simple random sampling) 각 샘플에 번호를 부여하여 임의의 n개를 추출하는 방법으로 각 샘플은 선택될 확률이 동일하다. 추출한 element를 다시 집
lovelydiary.tistory.com
논문
'데이터분석 > 머신러닝' 카테고리의 다른 글
Successive Halving Algorithm(SHA) 이해 (0) | 2023.05.02 |
---|---|
Multi-Armed Bandit(MAB) (0) | 2023.05.02 |
다이렉트 마케팅에 사용되는 Uplifting modeling (0) | 2023.03.30 |
자동화 시스템 구축을 위한 AutoML (0) | 2023.03.30 |
Decision tree (0) | 2022.06.29 |