본문 바로가기
  • Let's go grab a data
반응형

Data97

인공신경망ANN (단일, 다중 계층 퍼셉트론) 인공신경망 ANN (Artificial Neural Network) 생물학적 신경회로와 작동원리에서 영감을 얻은 정보처리 체계 각 유닛과 노드는 뉴런의 역할을 흉내낸다각 노드는 인공뉴런으로써 매우 간단한 기능을 갖는다 - 시그널의 총 양이 임계치를 초과되도록 수신되면 활성화 상태가 되는 것 - 노드가 활성화 되면 시그널을 전달 경로에 따라 연결된 다른 노드로 전달 각 연결지점은 생물학적인 시냅스를 흉내낸다- 각 연결 지점은 메시지를 각각의 특징에 따라 강도를 증가하거나 감소시켜 억제 시그널, 흥분 시그널로 변경시키는 필터 역할- 연결에 대한 가중치와 곱함으로써 전송된 시그널의 강도를 증가시키는 기능 단일 계층 퍼셉트론 SLP: Single Layer Perceptron (로젠블렛 퍼셉트론) 퍼셉트론: 학.. 2017. 5. 23.
딥러닝과 머신러닝의 차이는? 딥러닝은 learning 구조(방법)에 따른 분류를 보통 한다.딥러닝의 반대말은 shallow learning (Input -> Output)딥러닝은 (Input -> 가공된 Input -> 가공된 Input ... -> Output)딥러닝의 유사어는 end-to-end learning, representation learning(중간과정을 자동생성), deep neural network(대부분 신경망 사용) 머신러닝의 분류 는 label 이용에 따른 분류(Supervised, Unsupervised, reinforcement) Input은 고기, 양파, 마늘, 간장이라면 Feature는 재운고기 다진 야채Input이 이미지 파일의 픽셀정보라면 Feature는 모서리 검출, 눈 검출, 입 검출 등머신러닝.. 2017. 4. 26.
k-means clustering 군집화 k-means clustering 군집화 [패키지 다운로드]pip install pandas #k-means 알고리즘# 1.초기 랜덤하게 k개 점 선택# 2. 모든 점을 가장 가까운 선택점에 할당해 k개 군집 구성# 3. 각 군집에서 다시 평균을 구해 k개의 중심점을 계산# 4. 중심점이 변하지 않을 때 까지 2~3단계 반복 import matplotlib.pyplot as pltimport numpy as npimport tensorflow as tfimport pandas as pd#pip3.6 install pandas num_vectors = 1000num_clusters = 4num_steps=100#초기 입력 데이터 구조체 초기화x_values=[]y_values=[]vector_values=.. 2017. 4. 17.
MNIST 데이터로 KNN 분류기, 성능 측정 MNIST 데이터로 KNN 분류기, 성능 측정 MNIST 데이터는 머신 러닝 분야에서 광범위하게 사용되는 손글씨 숫자 0~9가 흑백으로 저장된 이미지 [데이터 다운로드]http://yann.lecun.com/exdb/mnist/ ( train-images-idx3-ubyte.gz, train-labels-idx1-ubyte.gz, t10k-images-idx3-ubyte.gz, t10k-labels-idx1-ubyte.gz) [입력을 도와주는 스크립트 다운로드]https://github.com/tensorflow/tensorflow/blob/master/tensorflow/examples/tutorials/mnist/input_data.py Python 스크립트와 동일한 폴더에 input_data.py .. 2017. 4. 17.
html 파싱하기 rvest 패키지 html 파싱하기 rvest 패키지 install.packages("rvest")library(rvest)url = "http://music.naver.com/listen/top100.nhn?domain=DOMESTIC&duration=1h";download.file(url,destfile = "navermusic.html",quiet = T);naver_music % html_text() %>% as.numeric() ranking gap % html_nodes("._tracklist_move .change") %>% html_text() %>% gsub(pattern="\r\n||\t||\n", replacement="") gap title % html_nodes("._tracklist_move ._.. 2017. 4. 14.
MNIST 데이터 집합 읽어오기, 이미지로 나타내기 MNIST 데이터 집합 읽어오기, 이미지로 나타내기 MNIST 데이터는 머신 러닝 분야에서 광범위하게 사용되는 손글씨 숫자 0~9가 흑백으로 저장된 이미지 [데이터 다운로드]http://yann.lecun.com/exdb/mnist/ ( train-images-idx3-ubyte.gz, train-labels-idx1-ubyte.gz, t10k-images-idx3-ubyte.gz, t10k-labels-idx1-ubyte.gz) [입력을 도와주는 스크립트 다운로드]https://github.com/tensorflow/tensorflow/blob/master/tensorflow/examples/tutorials/mnist/input_data.py Python 스크립트와 동일한 폴더에 input_data... 2017. 4. 14.
선형 회귀 알고리즘 구현, 비용함수, 경사하강법 선형 회귀 알고리즘 구현, 비용함수, 경사하강법 import numpy as npnumber_of_points = 500; x_point=[]y_point=[]a=0.22 #선형관계 지수b=0.78 for i in range(number_of_points): x=np.random.normal(0.0,0.5) y=a*x+b+np.random.normal(0.0,0.1) x_point.append([x]); y_point.append([y]); import matplotlib.pyplot as pltplt.plot(x_point,y_point,'o',label='Input Data')plt.legend()plt.show() #비용함수와 경사하강법import tensorflow as tfA = tf.Varia.. 2017. 4. 14.
David Barber의 Machine Learning 분류 https://www.facebook.com/terryum.io/photos/pcb.518577148267476/518576694934188/?type=3&theaterhttp://web4.cs.ucl.ac.uk/staff/D.Barber/pmwiki/pmwiki.php?n=Brml.Online [Machine Learning 분류] - Supervised Learning - Regression 회귀 ㄴ Gaussian Process (non-parametric) 함수 정의 없이 ㄴ linear ㄴ Parametric 함수를 정의 ㄴ linear ㄴ non-linear - Classification 분류 ㄴ Discriminative 그냥 나눠줘 ㄴ Support Vector Machine ㄴ Logis.. 2017. 3. 28.
Bias-Variance Tradeoff / Andrew Ng의 데이터셋 나누기 [Bias-Variance Tradeoff] 2가지 종류의 에러- Bias: 잘 모여있긴 한데 중앙에서 멀어짐- Variance: 평균은 정답에 가깝지만 값별로 차이가 큼 에러는 Bias+Variance+noise Variance - Overfitting이 일어날 수록 커짐Bias - Underfitting일 수록 커질 수 있음두 가지는 Trade off 관계 Train이 진행될 수록(함수가 복잡해질 수록) Bias가 내려가고 Variance가 올라가기 때문에두 가지 에러의 합이 최저가 되는 점을 찾는 것이 Overfitting을 피하는 방법 [Andrew Ng의 데이터 셋 나누기]기존의 Train - Validation - Test데이터로 나누던 것을Train - Train_Validation - Te.. 2017. 3. 27.
반응형