전체 글
-
2. RNN & LSTM & GRUNLP/1주차 2021. 9. 7. 11:44
sequential data와 이전 hidden state를 입력으로 현재 time step의 출력을 내는 구조. $ h_(t-1) $ : old hidden state vector $ x_t $ : input vector at some time step $ h_t $ : new hidden state vector $ f_W $ : RNN function with params W $ y_t $ : output vector at time step t Types of RNNs one-to-one one-to-many: image captioning many-to-one: sentiment classification many-to-many: machine translation, video classificat..
-
1. NLP intro & BOW & Word EmbeddingNLP/1주차 2021. 9. 6. 14:42
NLP: Natural Language Understanding + Natural Language Generating (major conferences: ACL, EMNLP, NAACL) NLP tasks Low-Level Tokenization, Parsing Word and Phrase Level NER, POS tagging, noun-phrase chunking, dependency parsing, coreference resolution Sentence Level Sentiment analysis, Machine Translation Multi-sentence and paragraph level Entailment prediction: 두 문장간의 논리적 내포를 예측 QA, dialog syst..
-
Pstage - Image ClassificationAI/5주차 2021. 9. 3. 10:28
현재 문제점 class imbalance가 심하다 validation accuracy와 제출 시 accuracy가 차이가 많이 난다 모델이 잘 예측하지 못하는 구간이 존재한다 (나이의 경계값) 데이터셋을 분석한 결과 비슷한 class에 배경이 비슷한 경우가 있다 class들이 상호 배타적이지 않다. 문제 원인 분석 class imbalance의 경우 기본적으로 주어지는 dataset이 원인 data leakage 발생: 학습할 때 사용되는 인물이 validation에 존재하여 validation이 제 역할을 수행하지 못한다 / overfitting 데이터가 부족 / 사람이 하기도 어려운 task 모델에게 원치 않는 feature를 학습 시킬 수 있다. class간 연관성이 있다. 해결 방안 1. clas..
-
5. Ensemble & Hyperparameter Optimization & ExperimentAI/4주차 2021. 8. 27. 18:05
Model Averaging soft voting이 더 좋을 확률이 있다. TTA (Test Time Augmentation) 테스트 이미지를 augmentation 후 모델 추론, 출력된 여러 결과를 앙상블한다. 앙상블 기법에는 성능-효율 trade off가 존재한다. Hyperparameter Tuning Grid Search Random Search Bayseian Optimization (성능 좋음) https://brunch.co.kr/@tristanmhhd/19 Bayesian Optimization Hyperparameter tuning | Optimization Optimization은 어떤 임의의 함수 f(x)의 값을 가장 크게(또는 작게)하는 해를 구하는 것이다. 이 f(x)는 머신러닝..
-
4. Training & InferenceAI/4주차 2021. 8. 27. 18:05
Loss Loss도 nn.Module에 포함된다. loss.backward()를 통해 gradient 가 update된다. Focal Loss: Class Imbalance 문제가 있는 경우, 맞춘 확률이 높은 Class는 조금의 loss를, 맞춘 확률이 낮은 Class는 loss를 크게 부여 Label Smoothing Loss: class target label을 one-hot으로 표현하는 것이 아닌, soft 하게 표현해서 일반화 성능을 높임 ex) [0,1 0, 0] -> [0.2, 0.7, 0.05, 0.05] Metric 모델을 평가하기 위한 지표. 데이터에 따라서 잘 선택하는 것이 필요. Class Imbalance가 큰 경우 F1-Score, 아니면 Accuracy Pytorch Light..
-
3. ModelAI/4주차 2021. 8. 26. 16:44
Pytorch low level, pythonic, flexibility Modules pytorch의 모든 레이어는 nn.Module 클래스를 따른다 nn.module family: nn.module을 상속받은 모든 클래스의 공통점 -> forward() 함수를 가진다, parameter https://pytorch.org/docs/stable/generated/torch.nn.Module.html Module — PyTorch 1.9.0 documentation Shortcuts pytorch.org Pretrained Model 일반적으로 모델을 처음부터 학습시키는 것은 비효율적. 따라서 좋은 품질, 데이터로 미리 학습한 모델을 내 목적에 맞게 다듬어서 사용하는 pretrain 모델을 이용하는 방식..
-
2. Data FeedingAI/4주차 2021. 8. 26. 15:57
데이터 사이언스에서는 전처리 과정이 중요하다. 경진대회용 데이터는 품질이 양호하다. 전처리 방법은 도메인, 데이터 형식에 따라 다양한 case가 존재한다. 다양한 data augmentation 기법과, 이를 위한 albumentation 라이브러리가 있다. https://github.com/albumentations-team/albumentations GitHub - albumentations-team/albumentations: Fast image augmentation library and an easy-to-use wrapper around other libraries. Fast image augmentation library and an easy-to-use wrapper around other..
-
1. Competition & SeabornAI/4주차 2021. 8. 26. 15:39
1. Overview 숙지하기 Problem Definition: 내가 풀어야 할 문제, input output 파악 등 2. Data Description 데이터의 형태와 의미를 파악하기 EDA (Exploratory Data Analysis) Seaborn은 Matplotlib 기반 통계 시각화 라이브러리. Matplotlib으로 커스텀 가능 깔끔하고 쉬운 문법 pip install seaborn==0.11 import seaborn as sns 5가지 기본적인 API 제공 Categorical Distribution Relational Regression Matrix Categorical countplot이 대표적이며 범주를 이산적으로 카운팅하여 막대그래프를 그림 x, y, data, hue, pa..