ML&DL 이야기
-
[Graph] Graph Neural Networks 개론(개념정리)ML&DL 이야기/ML 2024. 3. 4. 23:10
GCN 논문 리딩을 진행하던 중, Graph에 관한 전반적인 지식이 부족하다고 느껴서, 간단히 개념 등을 정리하려고 한다. 자연어처리 관련 논문들을 읽었을 때도 느낀거지만, 전체적인 흐름을 알고 논문을 읽으면 훨씬 수훨하게 리딩이 되었기 때문에, 이번 정리를 통해 전반적인 개념과 흐름을 잡는 것을 목표로 하였다. 이번 내용정리는 "A comprehensive servey on Graph neural networks"와 이를 정리한 thejb.ai님과 glaceyes님의 블로그 whatsup의 velog을 참고, 왓챠 Medium의 글을 기반으로 정리하였고, 추가적인 출처들은 따로 기재하였다. Graph Graph는 wiki에 따르면 아래와 같다(이산수학에서의 graph) In discrete mathem..
-
[NLP processing] 자연어 데이터를 전처리해보자!ML&DL 이야기/ML 2024. 2. 23. 19:09
자연어 처리과정 자연어처리 과정은 아래의 단계를 거친다. 1. Preprocessing: 자연어를 정리하는 과정, token화가 포함됨 불용어 제거(Stopwords removing), 형태소 분석(Stemming), 표제어 추출(Lemmatization) 2. Vectorization: 정수 인코딩으로 변형하는 과정(임베딩 시키기 위한 전과정) One-hot Encoding, Count vectorization, Tfidf, Padding 3. Embedding(실제 측정 차원으로 임베딩 시키는 과정) Word2vec, Doc2vec, Glove, Fasttext 4. Modeling(자연어를 입력하고 원하는 task를 수행하는 과정) GRU, LSTM, Attention Preprocessing & ..
-
[NLP] BLEU Score(Bilingual Language Evaluation Understudy)ML&DL 이야기/ML 2024. 2. 16. 17:55
기계번역에서 자주사용되는 지표인 BLEU는 연속된 단어의 조합인 문장을 1:1 비교하지 않고, 연속된 단어의 정확도를 측정하고자 하는 방식이다. 그 전에 Precision과 Recall에 관해 알아보자. 본 내용은 https://amber-chaeeunk.tistory.com/94 을 바탕으로 작성하였습니다 Precision & Recall 우선 기본적인 Precision & Recall에 관한 정의를 보기 위해 2*2 matrix를 그려보자. 각 Case를 보면 True Positive(TP) : 실제 True인 정답을 True라고 예측 (정답) False Positive(FP) : 실제 False인 정답을 True라고 예측 (오답) False Negative(FN) : 실제 True인 정답을 Fals..
-
Beam Search in NLPML&DL 이야기/ML 2024. 2. 16. 16:46
Text 생성을 위한 Decoder에서 우리는 단어들을 연속적으로 생성하는 task를 수행해야한다(sequence data). 모델의 출력은 확률적으로 가장 가능성이 높은 확률을 띄는 조합의 단어 조합으로 결정된다. 즉, 언어 모델은 단어 시퀀스에 확률을 할당하는 모델이며, Decoder의 경우 다음에 나올 확률이 최대인 단어를 선택한다. 이를 수식으로 표현하면 아래와 같다. 무수히 많이 생성되는 후보들 중 어떤 sequence를 선택하라 지 정하는 방법 중 하나가 바로 Beam Search이다. Greedy Search(Decoding) Seq2Seq에서 가장 대표적으로 사용하는 방법으로, 해당 t시점에서 가장 확률이 높은, 가능성이 높은 단어를 고르는 방법이다. Complexity 관점이나 구현 관점..
-
[NLP] RNN, LSTM과 NLP 개론ML&DL 이야기/ML 2024. 2. 13. 20:46
허민석님의 자연어처리 유튜브 재생목록(https://youtu.be/meEchvkdB1U?si=KHEXvalYlF_RlkE9)과 LgAimers의 주재걸 교수님의 seq2seq with Attention 강의, 나동빈님의 seq2seq 영상을 바탕으로 작성하였습니다. Natural Lenguage = Sequence Data 우리는 자연어, 즉, 문장을 말할때, 문장은 단어의 연속된 집합으로 들어온다. 즉, 순차적인 단어의 구성이 바로 문장이다. 즉, 문장은 가장 최신의 과거 데이터(단어)를 바탕으로 업데이트 되는 시계열적인 특성을 지닌다. 이 점에서 sequence data라고 할 수 있을 것이다. 전통적인 NN의 경우 이러한 지속성을 지니는 데이터를 처리하기에 어려움이 있었는데, 이는 입력값들을 서로..
-
[PyTorchZerotoAll 내용정리] 11-2: ResNet [Deep Residual Learning for Image Recognition] CVPR 2016)ML&DL 이야기/Pytroch 2023. 11. 29. 21:04
Residual Learning(ResNet) Deep Residual Learning for Image Recogintion Identity Mappings in Deep Residual Networks Deep residual networks have emerged as a family of extremely deep architectures showing compelling accuracy and nice convergence behaviors. In this paper, we analyze the propagation formulations behind the residual building blocks, which suggest that the f arxiv.org 1. Abstract Is l..
-
[PyTorchZerotoAll 내용정리] 11-1: GoogleNet(Inception Moudle) [Going deeper with Convolution] ILSVRC14, CVPR 2015)ML&DL 이야기/Pytroch 2023. 10. 10. 02:49
CNN에 관한 몇몇 부분을 더 추가적으로 다루는 파트이다. Inception Module (https://gaussian37.github.io/dl-concept-inception/ 를 추가로 참고하여 작성했습니다) 논문 링크: https://arxiv.org/abs/1409.4842 2014년 ILSVRC에서 우승한 모델인 Inception Model, 혹은 GoogLeNet 모델에 관해 알아보자(좋은 모델이지만 이후에 나온 ResNet에 밀려 잘 안보이는 슬픈 모델...) 기본적인 아이디어는 CNN의 네트워크를 더 깊게 만드는 것이다. CNN의 네트워크가 깊어지면 깊어질수록 더 다양한 필터를 사용하기에 성능이 일반적으로 좋아지지만...! Overfitting, Vanishing Gradient Pro..
-
[PyTorchZerotoAll 내용정리] 10: Convolution Neural Network(CNN)ML&DL 이야기/Pytroch 2023. 10. 9. 10:55
Pytorch Zero To All 강의를 Base로 삼아서 내용을 작성 및 정리하였습니다 24.1.28: LGAimers강의 중 주재걸 교수님의 CNN 강의의 일부내용을 포함하였습니다 Basic Idea of CNN 기존의 이미지 기반 모델들의 경우, 여러 상이한 이미지 모델들에 관해서 잘 구분하거나, 파악하지 못하는 문제들이 있었다. 사람의 경우 이미지를 판단할 때 일부 특정패턴을 보고 그 중 전부가 아닌 일부가 이미지에 있다면 이를 보고 그 이미지를 판단한다. CNN의 경우에도 수많은 이미지 중 특정 패턴을 학습하여 이를 이용해 이미지를 확인하겠다는 것이 main Idea이다. 즉, 위의 이미지처럼, 여러 학습 데이터에서 특정한 패턴이 반복된다면, 이미지에서 해당 패턴이 존재하는 것을 학습한다. 이..