전체 글 17

r, python 다차원 데이터 다루기

R을 python과 비교했을 때, R의 장점은 save, load함수로 거의 대부분의 객체를 저장할 수 있다는 장점이 아닐까 싶다. python은 pickle 버전에 따라서 pickle로 저장했어도 못불러오는 경우도 존재하니 말이다. 예제를 위해 R에서 iris 자료를 저장해보자. save(iris, file='iris.rda') 자 이제 이 iris를 python에서 불러보자. import rpy2.robjects as robjects robjects.r['load']('iris.rda') iris = robjects.r['iris'] iris iris자료가 잘 불러와지는 것을 확인할 수 있다. 이제 python에서 다차원 자료를 다룰 때 많이 쓰는 numpy 자료를 저장해보자. import rpy2...

R의 객체 2021.09.30

Symbolic Regression in R

최근에 검색을 하다가 기호적회귀분석이란 것을 알게 되었다. 이를 적용함에 있어 R패키지 보다 python 패키지가 좀 더 유용해 보였다. 따라서 python을 R에서 쓰는 식으로 예제코드를 생성하였다. 세팅하는 부분은 아래 블로그를 참고하기 바란다. https://rcj92.tistory.com/10 R tensorflow-gpu 설정하기 오늘은 R쓰시는 분들이 딥러닝 할 때 GPU세팅을 힘들어해서 R에서 tensorflow를 gpu로 돌리기 위한 세팅을 해보겠다. 지금은 tensorflow라이브러리에서 install_tensorflow()를 활용하면 쉽게 가능하다고 하 rcj92.tistory.com https://pycj92.tistory.com/23 기호적회귀분석(Symbolic Regression..

[tensorflow]attention model

https://diane-space.tistory.com/318?category=882603 [시계열] 케라스에서 Luong 어텐션을 활용한 seq2seq2 LSTM 모델 만들기 (번역) 원문 Building Seq2Seq LSTM with Luong Attention in Keras for Time Series Forecasting | by Huangwei Wieniawska | Level Up Coding (gitconnected.com) Building Seq2Seq LSTM with Luong Attention in Keras.. diane-space.tistory.com https://rcj92.tistory.com/18 [tensorflow]Seq2Seq regression in R https..

[tensorflow]Seq2Seq regression in R

https://diane-space.tistory.com/318?category=882603 [시계열] 케라스에서 Luong 어텐션을 활용한 seq2seq2 LSTM 모델 만들기 (번역) 원문 Building Seq2Seq LSTM with Luong Attention in Keras for Time Series Forecasting | by Huangwei Wieniawska | Level Up Coding (gitconnected.com) Building Seq2Seq LSTM with Luong Attention in Keras.. diane-space.tistory.com 회귀 모델로 Seq2Seq 모델을 활용한 연구 사례가 있어 적용해 보려했으나, 난이도가 너무 높아서 다소 힘들었다. 그래서 활..

2 행렬에 대한 함수 적용

최근에 특정 지점과 위도에 대한 100by 100 행렬, 경도에 대한 100 by 100행렬에 대해 거리를 구하여 100 by 100의 행렬로 만들어야 하는 상황이 발생 했다. 처음에는 자료를 matrix를 펼쳐서 연산을 하려 했으나, matrix 구조를 유지한 채 3차원끼리의 연산을 해보고 싶었다. 적용방식은 의외로 간단했는데 다음과 같이 적용을 하니 3차원에 대해 거리가 주어졌었다. library(geosphere) library(abind) station=data.frame(lon=126,lat=37) df=abind(lon,lat,along=3) o1=apply(df,c(1,2),function(x){distGeo(c(station$lon,station$lat),c(x))}) https://sta..

카테고리 없음 2021.06.10

WaveNet in R

Wavenet은 2016년에 DeepMind에서 만들어낸 모형으로, 음성의 파형을 모형으로 사용하여 실제 사람과 같은 음성을 생성하는 알고리즘이다. en.wikipedia.org/wiki/WaveNet WaveNet - Wikipedia From Wikipedia, the free encyclopedia Jump to navigation Jump to search Deep neural network for generating raw audio WaveNet is a deep neural network for generating raw audio. It was created by researchers at London-based artificial intelligence firm DeepM en.wikip..

1D-CNN & Multi input Multi output Model in R

lstm 모형은 아래 링크를 참고하기 바란다. rcj92.tistory.com/11 R tensorflow LSTM 예제 코드(GPU 사용) lstm 모형 구축을 하기 앞서 딥러닝 코드 구현도 충분히 중요하지만, 이론을 모르는 상황에서 모델을 개선 시킬 수는 없다고 생각한다. 그런 의미에서 아래 링크를 공유한다. ducj.tistory.com/227 순환 rcj92.tistory.com 아래는 환경을 구축하는 링크다. rcj92.tistory.com/10 R tensorflow-gpu 설정하기 오늘은 R쓰시는 분들이 딥러닝 할 때 GPU세팅을 힘들어해서 R에서 tensorflow를 gpu로 돌리기 위한 세팅을 해보겠다. 지금은 tensorflow라이브러리에서 install_tensorflow()를 활용하..

R에서 ELMO 모형 사용하기

우선 본 내용은 아래의 링크를 참조하였다. wikidocs.net/33930 위키독스 온라인 책을 제작 공유하는 플랫폼 서비스 wikidocs.net 환경을 구축하는 것은 아래를 참조하자. rcj92.tistory.com/10 R tensorflow-gpu 설정하기 오늘은 R쓰시는 분들이 딥러닝 할 때 GPU세팅을 힘들어해서 R에서 tensorflow를 gpu로 돌리기 위한 세팅을 해보겠다. 지금은 tensorflow라이브러리에서 install_tensorflow()를 활용하면 쉽게 가능하다고 하 rcj92.tistory.com 우선 elmo는 tensorflow1을 사용하기 때문에 기존의 tensorflow2를 사용할 수 없다. 그래서 tensorflow1 가상환경을 만들어 보자. conda_creat..

rTorch LSTM 예제 코드(GPU 사용)

시작하기에 앞서 rTorch GPU설정은 아래 링크를 참조하기 바란다. rcj92.tistory.com/10 R tensorflow-gpu 설정하기 오늘은 R쓰시는 분들이 딥러닝 할 때 GPU세팅을 힘들어해서 R에서 tensorflow를 gpu로 돌리기 위한 세팅을 해보겠다. 지금은 tensorflow라이브러리에서 install_tensorflow()를 활용하면 쉽게 가능하다고 하 rcj92.tistory.com 아래는 R에서 tensorflow GPU로 사용한 같은 데이터 예제이다. rcj92.tistory.com/11 R tensorflow LSTM 예제 코드 lstm 모형 구축을 하기 앞서 딥러닝 코드 구현도 충분히 중요하지만, 이론을 모르는 상황에서 모델을 개선 시킬 수는 없다고 생각한다. 그런 ..

R tensorflow LSTM 예제 코드(GPU 사용)

lstm 모형 구축을 하기 앞서 딥러닝 코드 구현도 충분히 중요하지만, 이론을 모르는 상황에서 모델을 개선 시킬 수는 없다고 생각한다. 그런 의미에서 아래 링크를 공유한다. ducj.tistory.com/227 순환신경망(1/3) ducj.tistory.com 아래는 환경을 구축하는 링크다. rcj92.tistory.com/10 R tensorflow-gpu 설정하기 오늘은 R쓰시는 분들이 딥러닝 할 때 GPU세팅을 힘들어해서 R에서 tensorflow를 gpu로 돌리기 위한 세팅을 해보겠다. 지금은 tensorflow라이브러리에서 install_tensorflow()를 활용하면 쉽게 가능하다고 하 rcj92.tistory.com 자, 이제 본격적으로 시계열 예측을 시작해보자. 아래 자료는 시계열 예측 ..