본문 바로가기
반응형

연구 노트/R Python76

pd.merge 에서 how='outer' 와 on = 'date' 차이 print(len(df)) date_data = pd.date_range(start='2016-01-01', end='2022-01-01', freq='H') dat = date_data.to_list() print(len(dat)-1) 52608 52608 tmp = pd.merge(asos, aaos, how="outer") print(len(tmp)) 52608 앞에서 만든 1시간 간격 날짜 데이터에 맞춰서 merge 됨. tmp = pd.merge(asos, aaos, on="Date") print(len(tmp)) 51385 #주의 !! on='Date'를 사용하면 Date 51385 로 자료 없는 곳은 생략하고 merge 됨. 2022. 7. 5.
MinMaxScaler 수치 원상복구 방법 https://www.inflearn.com/questions/224124 MinMaxScaler 수치 원상복구 방법 문의 - 인프런 | 질문 & 답변 안녕하세요. RNN, LSTM, GRU 파트 집중적으로 공부하고 있습니다. 수치의 단위를 맞추기 위해 MinMaxScaler를 사용하여 0~1사이의 값으로 보이는 결과 그래프까지 확인 하였습니다. 다만, 주가예측도, 주 www.inflearn.com 2022. 4. 22.
UserWarning: Scoring failed. The score on this train-test partition for these parameters will be set to nan. Details: 에러 XGBRegression 모델링 에서 발생 UserWarning: Scoring failed. The score on this train-test partition for these parameters will be set to nan. Details: 증상: nan 으로 나옴 def regression_model(model): scores = cross_val_score(model, X_train_std, y_train, scoring='neg_mean_squared_error', cv=kfold) # scores = cross_val_score(model, X, y, scoring='mean_squared_error', cv=kfold) rmse = (-scores)**0.5 return rms.. 2022. 4. 21.
Keras에서 fit() and fit_generator() 차이 * Keras에서 학습을 시킬 때 fit()과 fit_generator()의 차이점 - fit()은 sklearn의 fit method와 비슷하다. 전체 dataset을 한번에 fit method로 통과시킨다. 따라서 전체 dataset을 메모리에 로드할 수 있는, 작은 크기의 dataset으로 학습을 시킬때 사용한다. ​ - fit_generator()는 x와 y를 직접적으로 통과시키지 않고, generator를 통해 데이터를 불러온다. kears 공식 문서를 보면, generator는 Multiprocessing을 진행할 때 데이터 중복을 막기 위해서 사용한다. 이것은 practical purpose를 위한 것이며, 큰 크기의 dataset으로 학습을 시킬때 사용한다. ​ [출처] Keras에서 fi.. 2022. 4. 8.
파이썬의 enumerate() 내장 함수로 for 루프 돌리기 (펌) https://www.daleseo.com/python-enumerate/ 파이썬의 enumerate() 내장 함수로 for 루프 돌리기 Engineering Blog by Dale Seo www.daleseo.com 2022. 3. 31.
Series와 DataFrame의 사칙연산 https://truman.tistory.com/88 파이썬(Python) - Series와 DataFrame의 사칙연산 시리즈 사칙연산 인덱스를 기준으로 연산한다. obj1 = Series([1,2,3,4,5], index=['a','b','c','d','e']) obj2 = Series([2,4,6,8,10], index=['a','b','d','f','g']) 일때 1. 더하기 obj1 + obj2 obj1.add(o.. truman.tistory.com 2022. 3. 28.
리스트(배열) 각 요소들의 값 더하기 http://melonicedlatte.com/2021/03/14/181700.html 2022. 3. 28.
등간격 Time Series 자동으로 채워 넣는 방법 출처: https://yobbicorgi.tistory.com/3 [상엽’s Python 블로그] 2022. 3. 18.
WPS - SST 넣기 자료 Goes SST 6 km (0.05 x 0.05 도) ; 1, 3, 24 h 자료 있음. http://podaac.jpl.nasa.gov/dataset/GOES_L3_SST_6km_NRT_SST_24HOUR RTG SST 0.083 도 약 8~9 km. 6시간 간격 ftp://polar.ncep.noaa.gov/pub/history/sst/ophi OISST version 2 AVHRR SST Daily SST data (0.25 x 0.25 도); 24시간 간격 https://iridl.ldeo.columbia.edu/SOURCES/.NOAA/.NCDC/.OISST/.version2/.AVHRR/.sst/ https://www.ncdc.noaa.gov/thredds/oisst-catalog.htm.. 2022. 3. 17.
728x90