반응형 Python with AI15 Python about Pickle & HDF5 format | 파이썬 pickle 과 HDF5 파일 저장 형식 * Python Data를 pickle format을 활용하여 저장할 경우 버젼별로 다르게 나오기 때문에 라이브러리 버젼의 차이로 Data무결성이 보장되지 않는다. * When saving Python data using pickle format, the data integrity is not guaranteed due to the difference in the library version * HDF5(Hierarchical Data Format) 형식 대량 과학 계산용 배열 Data 저장을 위하여 고안된 포맷 C, Java, Julia, Matlab, Python 인터페이스 제공 On the fly(실시간) 압축방식 제공 => Pattern 있는 Data를 더 효과적으로 저장한다. pandas를 활용.. 2023. 8. 10. create conda env by yml file in windows | 윈도우에서 yml파일로 아나콘다 환경설정 하기 책을 통하여 공부하신다거나 github에 있는 소스로 공부하실 경우 많은 분들이 해당 환경설정에 대해서 yml파일을 만들어 올려놓는 경우가 많습니다. If you study by book or GitHub source, the author or repository owner may provide yml file that includes the environment of the programming file. 간단하게 아래와 같이 "conda env create -f 파일명"을 타이핑하시면 환경설징이 완료됩니다~ If so, just type "conda env create -f FileName' simply~ FYI: 파일 안의 Name 으로 새로운 가상환경이 생성됩니다. According to the .. 2023. 7. 26. Gensim Phrases updated usage | Gensim 변경된 사용법 gensim의 자연어 처리 패키지 중 Phrases라는 함수가 있는데, 이는 개수 기반 구문을 감지하고 컨트롤할 수 있게 해 준다. (참조: https://radimrehurek.com/gensim/models/phrases.html) The phrases function in the NLP packages is detecting phrases based on collocation counts and supporting the NLP easily. (reference: https://radimrehurek.com/gensim/models/phrases.html) 하지만 버젼이 업그레이드되면서 과거의 사용 방법과 비교하여 약간의 변동사항이 있다. However, the usage of the functio.. 2023. 7. 6. Pandas resample for date control(W-MON or W-FRI) | 판다스 리샘플링 판다스 resample 함수는 유용하게 시계열 데이터를 샘플링할 수 있다. Pandas resample function is useful for sampling of the time series data 일반적으로 사용되어지는 옵션으로는 주 단위 샘플링은 W, 월 단위 샘플링은 M, 년 단위는 Y, 분단위나 초 단위도 가능하다. Available used options of pandas.resample are W for a week, M for a month, Y for a year, and possibly for minutes and seconds unit. 하지만 해당 샘플링의 일자가 변경돼야 할 경우가 있다. Sometimes, we need different dates for easier cont.. 2023. 7. 6. Error Message - Unexpected result of `train_function` (Empty logs) AI 학습하는 도중에 Unexpected result of `train_function` (Empty logs)와 같은 에러 메시지를 만나게 되는 경우가 있다. You may encounter this error message during AI training - "Unexpected result of `train_function` (Empty logs)" 문제 해결은 간단하다. 말 그대로 Empty logs. 위의 경우를 보면 X_train_padded의 데이터를 확인해 보면 데이터가 존재하지 않는 것을 발견할 수 있다. (간혹 파일을 불러와서 할 경우에 폴더명 오타? 또는 폴더에 데이터가 삭제됨) It's simple. Literally, it's empty. In the above capture i.. 2023. 7. 4. Error fix - int() argument must be a string, a bytes-like object or a number, not "'NaTType'" 아래와 같이 trading_calendars 패키지를 임포트 해서 사용시에 parameter 타입에러가 나는 경우가 발생한다.(Pandas 버젼에 따라 문제가 없는 경우도 있으나 최신버젼을 사용하면 발생) When importing trading_calendars packages, the error message for parameter type pops up. (Depending on Padnas version) from trading_calendars import get_calendar Trading_calendars > TradingCalendar > .calendar_helpers 6번째줄 근처를 아래와 같이 수정! Error fix like below in calendar_helpers.py (.. 2023. 7. 1. 이전 1 2 3 다음 728x90 반응형