분류 전체보기

    [논문리뷰/NLP] ELECTRA: PRE-TRAINING TEXT ENCODERS AS DISCRIMINATORS RATHER THAN GENERATORS

    ELECTRA: PRE-TRAINING TEXT ENCODERS AS DISCRIMINATORS RATHER THAN GENERATORS We call our approach ELECTRA for “Efficiently Learning an Encoder that Classifies Token Replacements Accurately.” 핵심요약 ELECTRA achieves higher accuracy on downstream tasks when fully trained. replaced token detection → pre-training GAN이랑 비슷한 구조. 하지만 generator를 maximum likelihood로 train. (기존GAN: adversarial하게 학습) 왜냐하면 te..

    [논문리뷰/NLP] ALBERT: A LITE BERT FOR SELF-SUPERVISEDLEARNING OF LANGUAGE REPRESENTATIONS

    https://arxiv.org/pdf/1909.11942.pdf Zhenzhong Lan, Mingda Chen, Sebastian Goodman, Kevin Gimpel, Piyush Sharma, Radu Soricut Abstract 논문선정이유 Introduction Related Work Scaling up Representation Learning for Natural Language Cross-Layer Parameter Sharing Sentence Ordering Objectives The Elements of ALBERT Factorized embedding parameterization. Cross-layer parameter sharing, Inter-sentence coheren..

    [논문리뷰/NLP] ERNIE 3.0: Large-scale Knowledge Enhanced Pre-training for Language Understanding and Generation

    ERNIE 3.0: LARGE-SCALE KNOWLEDGE ENHANCED PRE-TRAINING FOR LANGUAGE UNDERSTANDING AND GENERATION https://arxiv.org/abs/2107.02137 ERNIE 3.0: Large-scale Knowledge Enhanced Pre-training for Language Understanding and Generation Pre-trained models have achieved state-of-the-art results in various Natural Language Processing (NLP) tasks. Recent works such as T5 and GPT-3 have shown that scaling up ..

    [논문리뷰/NLP] ERNIE: Enhanced Language Representation with Informative Entities

    paper link: https://arxiv.org/pdf/1905.07129.pdf Abstract: Neural language representation models such as BERT pre-trained on large-scale corpora can well capture rich semantic patterns from plain text, and be fine-tuned to consistently improve the performance of various NLP tasks. However, the existing pre-trained language models rarely consider incorporating knowledge graphs (KGs), which can pr..

    [논문리뷰/NLP] Distilling the Knowledge in a Neural Network

    Distilling the Knowledge in a Neural Network Geoffrey Hinton, Oriol Vinyals, Jeff Dean #NIPS 2014 Deep Learning Workshop 논문선정이유 모델링 경량화 작업을 공부하기 위해 읽었던 사전의 DistilBERT 논문이 차용한 논문이다. Knowledge Distillation에 대해 처음으로 소개하는 논문이다. Teacher model과 Student model이라는 개념을 제시했다. Abstract A very simple way to improve the performance of almost any machine learning algorithm is to train many different models on ..

    [논문리뷰/NLP] DistilBERT, a distilled version of BERT: smaller, faster, cheaper and lighter

    Victor SANH, Lysandre DEBUT, Julien CHAUMOND, Thomas WOLF Hugging Face {victor,lysandre,julien,thomas}@huggingface.co 📎paper link: DistilBERT, a distilled version of BERT: smaller, faster, cheaper and lighter 논문 선정 이유 모델 경량화 관련하여 참고하고 공부하기 위해서 Abstract large-scale pre-trained 모델들로 Transfer Learning이 일반화된 NLP. 더 낮은 비용의 언어 모델링으로 사전학습을 하는 방법 제안. We reduce the size of a BERT model by 40%, while reta..

    [프로그래머스/알고리즘] 폰켓몬 [파이썬/해시]

    https://school.programmers.co.kr/learn/courses/30/lessons/1845 프로그래머스 코드 중심의 개발자 채용. 스택 기반의 포지션 매칭. 프로그래머스의 개발자 맞춤형 프로필을 등록하고, 나와 기술 궁합이 잘 맞는 기업들을 매칭 받으세요. programmers.co.kr 간단한 문제였다. 그런데 처음에 조합이랑 카운터를 사용했는데 시간초과가 났다. 보니까 set을 이용하면 반복문없이 길이 비교만 하면 됐다,, 시간초과 코드 from itertools import combinations from collections import Counter def solution(nums): answer = 0 take = int(len(nums)/2) for i in combin..

    [알고리즘/프로그래머스] 숫자 문자열과 영단어 [파이썬/구현/문자열]

    https://school.programmers.co.kr/learn/courses/30/lessons/81301 프로그래머스 코드 중심의 개발자 채용. 스택 기반의 포지션 매칭. 프로그래머스의 개발자 맞춤형 프로필을 등록하고, 나와 기술 궁합이 잘 맞는 기업들을 매칭 받으세요. programmers.co.kr 2021 카카오 채용연계형 인턴쉽 기출문제. 쉬운 문제인데 내 풀이가 테케 몇개 실패해서 왜인지 싶다. 아직도 이유를 잘 모르겠다. 파이썬 풀이 1) 리스트 두 개와 zip 활용 def solution(s): hangul = ['zero','one', 'two','three','four', 'five', 'six', 'seven', 'eight', 'nine'] arab = [i for i in ..

    [알고리즘/프로그래머스/카카오코테2021] 신규아이디추천 [문자열/파이썬/python]

    https://school.programmers.co.kr/learn/courses/30/lessons/72410 카카오 블라인드 채용 기출 문제다. 프로그래머스 코드 중심의 개발자 채용. 스택 기반의 포지션 매칭. 프로그래머스의 개발자 맞춤형 프로필을 등록하고, 나와 기술 궁합이 잘 맞는 기업들을 매칭 받으세요. programmers.co.kr 신규 아이디 추천 문제 설명 카카오에 입사한 신입 개발자 네오는 "카카오계정개발팀"에 배치되어, 카카오 서비스에 가입하는 유저들의 아이디를 생성하는 업무를 담당하게 되었습니다. "네오"에게 주어진 첫 업무는 새로 가입하는 유저들이 카카오 아이디 규칙에 맞지 않는 아이디를 입력했을 때, 입력된 아이디와 유사하면서 규칙에 맞는 아이디를 추천해주는 프로그램을 개발하는..

    [백준/BOJ]#4949:균형잡힌 세상[문자열/스택/파이썬/python]

    https://www.acmicpc.net/problem/4949 4949번: 균형잡힌 세상 하나 또는 여러줄에 걸쳐서 문자열이 주어진다. 각 문자열은 영문 알파벳, 공백, 소괄호("( )") 대괄호("[ ]")등으로 이루어져 있으며, 길이는 100글자보다 작거나 같다. 각 줄은 마침표(".")로 끝난다 www.acmicpc.net 내가 효율적으로 짠건지는 사실 잘 모르겠는데 내가 하는 코딩습관대로 체크플래그로 풀었다 left괄호는 플래그 1, 2 오류는 플래그 5 예제들이랑 반례들 다 통과하는데 20%쯤에서 통과가 안되서 30분정도를 애먹었는데 질문게시판에 있는 반례들이 한 6페이지까지도 다 잘 나와서 대체 뭐가 문제인지 개행문자가 문제인걸까 애를 먹고있었는데 딱 반례 '[([]])'가 no가 나와야하..

    [알고리즘/프로그래머스] 더 맵게 [힙/heap/파이썬/python]

    https://programmers.co.kr/learn/courses/30/lessons/42626# 코딩테스트 연습 - 더 맵게 매운 것을 좋아하는 Leo는 모든 음식의 스코빌 지수를 K 이상으로 만들고 싶습니다. 모든 음식의 스코빌 지수를 K 이상으로 만들기 위해 Leo는 스코빌 지수가 가장 낮은 두 개의 음식을 아래와 같 programmers.co.kr 매운 것을 좋아하는 Leo는 모든 음식의 스코빌 지수를 K 이상으로 만들고 싶습니다. 모든 음식의 스코빌 지수를 K 이상으로 만들기 위해 Leo는 스코빌 지수가 가장 낮은 두 개의 음식을 아래와 같이 특별한 방법으로 섞어 새로운 음식을 만듭니다. 섞은 음식의 스코빌 지수 = 가장 맵지 않은 음식의 스코빌 지수 + (두 번째로 맵지 않은 음식의 스코..

    [백준/BOJ]#13565:침투[DFS/그래프/깊이우선탐색/파이썬/python]

    https://www.acmicpc.net/problem/13565 13565번: 침투 첫째 줄에는 격자의 크기를 나타내는 M (2 ≤ M ≤ 1,000) 과 N (2 ≤ N ≤ 1,000) 이 주어진다. M줄에 걸쳐서, N개의 0 또는 1 이 공백 없이 주어진다. 0은 전류가 잘 통하는 흰색, 1은 전류가 통하지 않 www.acmicpc.net 메모리 초과의 늪에서 못 빠져나오게 한 문제,,, 대체 코드에 문제가 없는데 왜 이러는건가 재귀탐색제한을 줄여도 보고 30분을 헤매었는데,, 결국 컴파일러를 pypy3가 아닌 python3 으로 바꾸니 통과했다;;; 백준에서 이런 경우가 간혹 있는데 이럴때마다 시간이 아깝고 힘 빠진다^^;; 승부는 내야하니 정답은 내야겠고,, bfs보다는 dfs로 푸는 게 더 ..

    [백준/BOJ]#2078:무한이진트리[트리/수학/파이썬/python]

    https://www.acmicpc.net/problem/2078 2078번: 무한이진트리 첫째 줄에 두 정수 A, B(1 ≤ A, B ≤ 2,000,000,000)가 주어진다. 잘못된 입력은 주어지지 않는다고 가정한다. www.acmicpc.net 트리 문제라고 명시되어있지만 사실상 수학 문제다!! #2078_무한이진트리 a,b=map(int,input().split()) l=0 r=0 while a>1 and b>1: if a>b: l+=a//b a%=b else: r+=b//a b%=a l+=a-1 r+=b-1 print(l,r)

    [백준/BOJ]#1406:에디터[스택/파이썬/python]

    https://www.acmicpc.net/problem/1406 1406번: 에디터 첫째 줄에는 초기에 편집기에 입력되어 있는 문자열이 주어진다. 이 문자열은 길이가 N이고, 영어 소문자로만 이루어져 있으며, 길이는 100,000을 넘지 않는다. 둘째 줄에는 입력할 명령어의 개수 www.acmicpc.net 처음에 보고 문자열로 파싱하는게 가장 빠르다고 판단해서 풀었는데 시간초과가 떴다. 시간초과 코드 #1406_에디터 s=str(input()) num=int(input()) cursor=len(s) for _ in range(num): ctrl=list(map(str,input().split())) if cursor

    [백준/BOJ]#15805:트리 나라 관광 가이드[트리/파이썬/python]

    https://www.acmicpc.net/problem/15805 15805번: 트리 나라 관광 가이드 윤호는 K개의 도시들이 트리 형태로 연결되어 있는 트리 나라의 관광 가이드이다. 윤호가 새롭게 맡게 된 패키지는 트리 나라의 루트 도시에서 시작해서 모든 도시를 순회하고 오는 상품이다. www.acmicpc.net 파이썬 코드 #15805_트리나라관광가이드 from collections import Counter n=int(input()) city=list(map(int,input().split())) cntcity=Counter(city) visited=[0 for _ in range(len(cntcity.keys()))] parent=[0 for _ in range(len(cntcity.keys(..

    [통계학] Transformations and Expectations

    Random variable X로 cdf Fx(x)를 모델링한다. 이 X의 함수로 distribution of Y=g(x)를 구해보자. ex) X={1,2,3,4,5,6}이고 Y=g(x)=2X라고 하면 Y={2,4,6,8,10}이다. g(.)는 monotone increasing이다. ex2) X~Unif(0,2ㅠ), Y=g(x)=sin(X)이라면 X={x:0

    [통계학] Probability Theory

    S라는 set에서 B는 S의 subsets. P는 every event에 대한 probability, P(A)=A event의 probability. P를 probability distribution이나 probability measure이라 부른다. Axioms of Probability 그리고 을 만족하면 countable additivity 성질을 지닌다. Central limit theorem The central limit theorem (CLT) explains the ubiquitous occurrence of the normal distribution in nature, and this theorem, according to David Williams, "is one of the great..

    [AI/머신러닝] 머신러닝 분류모델 평가지표(Confusion Matrix, Accuracy, Precision, Recall, F1 Score)

    Confusion Matrix (오차행렬) 실제 참 실제 거짓 예측 참 True Positive False Postive 예측 거짓 False Negative True Negative Accuracy (정확도) \[\frac{TP+TN}{TP+FP+TN+FN} \] Precision (정밀도) 분류기가 참으로 분류한 결과(예측) 중에서 실제 참의 비율 'Precision'의 'P'를 따와서 positive이 분모라고 생각하면 쉽다. \[\frac{TP}{TP+FP} \] Recall (재현율) 실제 참 중에서 분류기가 참으로 분류한 비율 실제 참인 데이터에서 분류가 제대로 된 비율이다. 'Recall' -> 'R'eal Positive이 분모에 들어간다. \[\frac{TP}{TP+FN} \] F1 Sc..