일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | 6 | 7 |
8 | 9 | 10 | 11 | 12 | 13 | 14 |
15 | 16 | 17 | 18 | 19 | 20 | 21 |
22 | 23 | 24 | 25 | 26 | 27 | 28 |
29 | 30 | 31 |
- 프로그래머스
- 프로그래머스 파이썬
- 더현대서울 맛집
- AI 경진대회
- SW Expert Academy
- 우분투
- leetcode
- Real or Not? NLP with Disaster Tweets
- 코로나19
- 편스토랑
- 백준
- ubuntu
- gs25
- 데이콘
- 맥북
- programmers
- 캐치카페
- Kaggle
- github
- PYTHON
- Docker
- Git
- 편스토랑 우승상품
- Baekjoon
- hackerrank
- 파이썬
- dacon
- ChatGPT
- 자연어처리
- 금융문자분석경진대회
- Today
- Total
목록
반응형
2020/03 (72)
솜씨좋은장씨
Kaggle 대회 19회차 오늘은 Bi-LSTM 모델을 활용해 보았습니다. from keras import optimizers from tqdm import tqdm def getBestParams(params_list, lstm_hidden, embedding): count = 0 histories = [] my_accs = [] my_batch = [] my_lr = [] my_epoch = [] embeddings = [] lstm_hiddens = [] for i in tqdm(range(len(params_list['batch_size']))): for j in range(len(params_list['learning_rate'])): for k in range(len(params_list['e..
Given an array of integers, calculate the fractions of its elements that are positive, negative, and are zeros. Print the decimal value of each fraction on a new line. Note: This challenge introduces precision problems. The test cases are scaled to six decimal places, though answers with absolute error of up to 10^(-4) are acceptable. For example, given the array arr = [1, 1, 0, -1, -1 ] there a..
clear_text_list = list(test['clear_text']) X_test = [] for clear_text in clear_text_list: word_list = word_tokenize(clear_text) word_list = [word for word in word_list if len(word) > 2] word_list = [word for word in word_list if word not in stop_words] # word_list = [stemmer.stem(word) for word in word_list] word_list = [lemmatizer.lemmatize(word) for word in word_list] X_test.append(word_list) ..
Given a square matrix, calculate the absolute difference between the sums of its diagonals. For example, the square matrix arr is shown below: 1 2 3 4 5 6 9 8 9 The left-to-right diagonal = 1 + 5 + 9 = 15. The right to left diagonal = 3 + 5 + 9 = 17. Their absolute difference is | 15 - 17 | = 2. Function description Complete the diagonalDifference function in the editor below. It must return an ..
[Python] 공공api를 활용하여 내 주변 공적 마스크 판매처와 마스크 재고를 지도에 시각화해보자! 최근 코로나바이러스로 인하여 마스크 구입량이 수요가 급격히 늘어남에 따라 일반 온라인 / 오프라인 판매처에서 구매가 어려워져 급증하는 수요를 감당하기 위하여 정부에서는 마스크 5부제를 시행하고 있습니.. somjang.tistory.com 오늘은 어제 지도 시각화를 하면서 사용했던 마스크 데이터를 제공하는 공공 API와 텔레그램을 활용하여 나만의 텔레그램 마스크 재고 알리미를 만들어보고자 합니다. 2020년 9월 30일 업데이트 공적마스크 판매 중단으로 인하여 7월 8일 부로 API 지원이 종료 되었습니다. 공공데이터 포털 국가에서 보유하고 있는 다양한 데이터를『공공데이터의 제공 및 이용 활성화에 관한..
Kaggle 대회 17회차! 오늘은 기존의 데이터 전처리 방식에서 tokenizer를 word_tokenize에서 TreebankWordTokenizer로 변경하고 토큰화 후 stemmer를 사용하지 않고 lemmatizer를 사용하여 보았습니다. 기존의 방식보다 조금 더 원형의 형태를 보존해서 토큰화가 된 것을 볼 수 있었습니다. 모델은 16회차의 모델에 그대로 적용해보았습니다. 첫번째 제출 from keras import optimizers adam = optimizers.Adam(lr=0.05, decay=0.1) model_1 = Sequential() model_1.add(Embedding(vocab_size, 100)) model_1.add(GRU(32)) model_1.add(Dropout(..
최근 코로나바이러스로 인하여 마스크 구입량이 수요가 급격히 늘어남에 따라 일반 온라인 / 오프라인 판매처에서 구매가 어려워져 급증하는 수요를 감당하기 위하여 정부에서는 마스크 5부제를 시행하고 있습니다. 이에 카카오맵 / 네이버 지도 같은 서비스에서 약국을 검색하면 마스크 공적판매처인지 아닌지에 대한 정보와 남은 마스크 수량등을 알려주는 기능이 추가되고 있기도 합니다. 오늘은 정부에서 제공하는 공적마스크판매처 API와 지난 국토 데이터 분석 경진대회에서 사용하였던 folium 라이브러리를 통해 카카오맵이나 네이버 지도에서 서비스를 하고 있는 것처럼 직접 지도에 시각화 해보기로 했습니다. 2020년 9월 30일 업데이트 공적마스크 판매 중단으로 인하여 7월 8일 부로 API 지원이 종료 되었습니다. 공공데..
데이콘 온도추정 경진대회 도전 3회차 입니다. [공공] AI프렌즈 시즌1 온도 추정 경진대회 출처 : DACON - Data Science Competition dacon.io 오늘은 lightGBM 모델을 사용하여 제출해 보았습니다. [Ensemble] Colab에서 LightGBM 사용하기! 원자력 발전소 상태판단 알고리즘을 도전해보면서 머신러닝을 공부하며 Gradient Boosing알고리즘 중의 하나인 LightGBM 알고리즘을 알게되었고 DACON KB 금융문자분석경진대회에서도 수상자들이 사용했다는 것을.. somjang.tistory.com 먼저 Colab에 LightGBM을 설치해주었습니다. 데이터는 2회차와 동일하게 3일치의 기상청 측정데이터, Y18 센서 데이터를 사용하였습니다. 기상청 ..
Given two strings, determine if they share a common substring. A substring may be as small as one character. For example, the words "a", "and", "art" share the common substring a. The words "be" and "cat" do not share a substring. Function Description Complete the function twoStrings in the editor below. It should return a string, either YES or NO based on whether the strings share a common subs..
Kaggle 도전 16회차 오늘은 캐글에 공개되어있는 노트북 들 중에서 한분이 약어를 다시 풀어서 전처리한 것을 보고 저는 그 노트북에서 약어가 담겨있는 dictionary만 빼와서 전처리를 하여 도전해보았습니다. AdaptNLP (Easier BERT-based Models) Explore and run machine learning code with Kaggle Notebooks | Using data from Real or Not? NLP with Disaster Tweets www.kaggle.com 먼저 필요한 라이브러리를 import해주고 약어 부분을 가져왔습니다. import nltk nltk.download("punkt") nltk.download("stopwords") from nltk...
데이콘! 온도추정 경진대회! 도전 2회차입니다. [공공] AI프렌즈 시즌1 온도 추정 경진대회 출처 : DACON - Data Science Competition dacon.io 오늘은 사용하는 데이터를 늘려보고 다중 선형회귀 분석 방법도 활용해보았습니다. 먼저 어떤 데이터를 추가할까 고민해보면서 대회 설명으로가서 대회의 배경을 다시 읽어보았습니다. 저가의 센서로 온도를 측정하였고 우리는 그 저가의 센서들 중 하나의 결과를 예측해야합니다. 주어진 데이터는 다음과 같습니다. 대회 도전 전에 히트맵을 통해서 센서와 기온의 상관관계가 높다는 것을 알게되었고 Y18센서의 데이터가 있는 3일치의 기온데이터와 센서 데이터를 가지고 첫날 결과를 내고 제출을 해보았습니다. 먼저 상관 관계가 낮은 데이터도 예측에 많이 ..
Starting with a 1-indexed array of zeros and a list of operations, for each operation add a value to each of the array element between two given indices, inclusive. Once all operations have been performed, return the maximum value in your array. For example, the length of your array of zeros n = 10. Your list of queries is as follows: a b k 1 5 3 4 8 7 6 9 1 Add the values of k between the indic..
[공공] AI프렌즈 시즌1 온도 추정 경진대회 출처 : DACON - Data Science Competition dacon.io 데이콘! 온도추정 경진대회 도전 1회차! 오늘은 저번에 분석해본 결과를 바탕으로 한번 도전해보았습니다. DACON AI프렌즈 시즌1 온도 추정 경진대회 데이터 이해하고 분석해보기 (feat. DACON YOUTUBE) 3월 ! 이번 달은 지난 금융문자분석경진대회와 원자력 발전소 상태판단 알고리즘 경진대회에 이어 DACON과 AI프렌즈가 함께 개최한 AI프렌즈 시즌 1 온도 추정 경진대회에 참가해보려합니다. 이 대회는 시즌 3까.. somjang.tistory.com 지난 분석을 통해 센서 측정데이터와 기상청의 기온데이터의 상관관계가 높다는 것을 알게되었습니다. 오늘은 이를 바..
이번 2020년 3월은 코로나 바이러스로 밖으로 나가는 시간도 많이 줄어 집에있는 시간이 많아진 만큼 Kaggle에서 진행하는 NLP관련 대회인 Real or Not? NLP with Disaster Tweets 대회와 데이콘에서 진행하는 AI 프렌즈 시즌 1 온도 추정 경진대회 [공공] AI프렌즈 시즌1 온도 추정 경진대회 출처 : DACON - Data Science Competition dacon.io 그리고 스타크래프트 게임 플레이 데이터를 바탕으로 진행되는 데이콘 월간 데이콘 3 행동 데이터 분석 대회를 진행해보려고 합니다. [게임] 월간 데이콘 3 행동 데이터 분석 대회 출처 : DACON - Data Science Competition dacon.io 총 상금은 250만원! 하루에 최대 3번..
Kaggle 15회차 오늘은 GRU모델을 활용해보기로 했습니다. 첫번째 제출 model = Sequential() model.add(Embedding(vocab_size, 100)) model.add(GRU(100)) model.add(Dropout(0.5)) model.add(Dense(2, activation='sigmoid')) model.compile(loss='binary_crossentropy', optimizer='adam', metrics=['acc']) history = model.fit(x_train, y_train, batch_size=32, epochs=3, validation_split=0.1) 결과 두번째 제출 model3 = Sequential() model3.add(Embed..
Given a string s consists of upper/lower-case alphabets and empty space characters ' ', return the length of last word (last word means the last appearing word if we loop from left to right) in the string. If the last word does not exist, return 0. Note: A word is defined as a maximal substring consisting of non-space characters only. Example: Input: "Hello World" Output: 5 Solution class Soluti..
Kaggle 14회차! 오늘은 금융문자분석밋업때 수상자들이 사용했던 lightGBM모델을 활용해보았습니다. Google Colab에 LightGBM설치 [Ensemble] Colab에서 LightGBM 사용하기! 원자력 발전소 상태판단 알고리즘을 도전해보면서 머신러닝을 공부하며 Gradient Boosing알고리즘 중의 하나인 LightGBM 알고리즘을 알게되었고 DACON KB 금융문자분석경진대회에서도 수상자들이 사용했다는 것을.. somjang.tistory.com 먼저 저는 Colab환경에서 진행하려고하여 위의 링크 방법대로 lightGBM을 설치해주었습니다. !nvidia-smi 무료버전임에도 Tesla P100 GPU가 할당되어 놀랐습니다. 먼저 lightGBM모델을 사용하기위해서 데이터를 처리..
You are given an unordered array consisting of consecutive integers [1, 2, 3, ..., n] without any duplicates. You are allowed to swap any two elements. You need to find the minimum number of swaps required to sort the array in ascending order. For example, given the array arr = [ 7, 1, 3, 2, 4, 5, 6, ] we perform the following steps: i arr swap (indices) 0 [7, 1, 3, 2, 4, 5, 6] swap (0,3) 1 [2, ..
Kaggle 13회차! 오늘은 저번 12회차까지 데이터 전처리를 했던 방법과 Glove 임베딩 기법을 사용하고 attention모델과 CNN모델을 활용하여 학습하고 결과를 도출해 제출해보았습니다. X_train = [] alphabets = ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z'] god_list = ['buddha', 'allah', 'jesus'] train_text_list = list(train['text']) clear_text_list = [] for text in train_text_list: text..
Consider the following version of Bubble Sort: for (int i = 0; i a[j + 1]) { swap(a[j], a[j + 1]); } } } Given an array of integers, sort the array in ascending order using the Bubble Sort algorithm above. Once sorted, print the following three lines: Array is sorted in numSwaps swa..
3월 ! 이번 달은 지난 금융문자분석경진대회와 원자력 발전소 상태판단 알고리즘 경진대회에 이어 DACON과 AI프렌즈가 함께 개최한 AI프렌즈 시즌 1 온도 추정 경진대회에 참가해보려합니다. 이 대회는 시즌 3까지 나올 예정이라고 하여 앞으로 어떤 대회가 계속 개최될지 궁금해 더 기대가 되는 대회입니다. [공공] AI프렌즈 시즌1 온도 추정 경진대회 출처 : DACON - Data Science Competition dacon.io 오늘은 첫날로 데이터에 대해서 이해하고 분석해보고자 합니다. 위의 유튜브 내용을 보면서 이해한 내용과 그 후 분석해본 내용에 대해서 적어보았습니다. 대회 목적 기상청 데이터로 특정 지역 또는 지형지물의 온도를 추정하는 모델 생성 모델 생성을 위해 기상청에서 관측한 기상 데이터..
Kaggle 도전 12회차! 오늘은 11회차에서 데이터 전처리 시 잘못 설정했던 부분들을 수정하여 다시 도전해보았습니다. from tqdm import tqdm alphabets = ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z'] god_list = ['buddha', 'allah', 'jesus'] train_text_list = list(train['text']) text_list_corpus = '' for i in tqdm(range(len(train_text_list))): text_list_corpus = te..
Emma is playing a new mobile game that starts with consecutively numbered clouds. Some of the clouds are thunderheads and others are cumulus. She can jump on any cumulus cloud having a number that is equal to the number of the current cloud plus 1 or 2. She must avoid the thunderheads. Determine the minimum number of jumps it will take Emma to jump from her starting postion to the last cloud. It..
며칠 전 Google Analytics를 설치하고 3일째 티스토리 블로그의 방문 통계와 비교해보면서 두 결과가 정말 많이 다른 것을 알 수 있었습니다. Google Analytics를 설치하면서 같은 기능을 제공하는 네이버의 Naver Analytics를 알게되었고 Naver Analytics의 기능을 살펴보던 중 지역 쪽으로 더 자세한 내용을 제공해주는 것 같아 앞으로 차근차근 열심히 꾸며 각종 책, 맛집, 음식, 영화, 아르바이트 리뷰를 올리고자 개설준비중인 블로그에 적용하면 도움이 많이 될 것 같아 먼저 이 블로그에 설치하여 Google Analytics와는 어떤 점이 다른지 앞으로 어떻게 활용하면 좋을지 알아보고자 적용해보게 되었습니다. 솜씨좋은장씨의 일상이야기 somjang-yolo.tistor..
Kaggle 도전 11일차! 오늘은 어제 데이터 전처리했던 방식에서 조금 더 추가하여 전처리를 진행하고 학습 시킨 후 결과를 도출하여 제출해보았습니다. 먼저 추가로 어떤 데이터를 어떻게 전처리할지 보기위해서 워드클라우드도 그려보고 단어의 빈도수도 확인해보았습니다. 먼저 저번주에 워드클라우드를 그렸던 방법에서 길이가 3이상인 단어와 nltk의 불용어에 없는 단어만 남겨놓고 그려보았습니다. (이 글을 쓰면서 정말 큰 실수했다고 생각되는 부분은 stemmer.stem(word)하기 전에 불용어 처리를 했어야했는데 이미 stemming이 완료된 이후에 불용어 처리를 하다보니 the가 thi로 바뀌는 등 제대로 불용어 처리가 되지 않았던 것 같습니다.) word_list = word_tokenize(clear_t..
Lilah has a string, s, of lowercase English letters that she repeated infinitely many times. Given an integer, n, find and print the number of letter a's in the first n letters of Lilah's infinite string. For example, if the string s = 'abcac' and n = 10, the substring we consider is abcacabcac, the first 10 characters of her infinite string. There are 4 occurrences of a in the substring. Functi..
Kaggle 도전 10회차! 데이터를 가공하여 학습하고 결과를 도출해보았습니다. alphabets = ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z'] god_list = ['buddha', 'allah', 'jesus'] train_text_list = list(train['text']) text_list_corpus = '' for text in train_text_list: text_list_corpus = text_list_corpus + text text_list_corpus = text_list_corpus.lo..
Gary is an avid hiker. He tracks his hikes meticulously, paying close attention to small details like topography. During his last hike he took exactly n steps. For every step he took, he noted if it was an uphill, U , or a downhill, D step. Gary's hikes start and end at sea level and each step up or down represents a 1 unit change in altitude. We define the following terms: A mountain is a seque..
Kaggle 도전 9일차! 오늘은 한국인공지능 아카데미 실용교육에서 배운 BERT에 학습데이터를 있는 그대로 사용하여 결과를 내어 보았습니다. kimwoonggon/publicservant_AI Contribute to kimwoonggon/publicservant_AI development by creating an account on GitHub. github.com def get_bert_finetuning_model(model): inputs = model.inputs[:2] dense = model.layers[-3].output outputs = keras.layers.Dense(2, activation='sigmoid',kernel_initializer=keras.initializers.Tr..
John works at a clothing store. He has a large pile of socks that he must pair by color for sale. Given an array of integers representing the color of each sock, determine how many pairs of socks with matching colors there are. For example, there are n = 7 socks with colors ar = [1, 2, 1, 2, 1, 3, 2] . There is one pair of color 1 and one of color 2. There are three odd socks left, one of each c..