'neuralnetworks'에 해당되는 글 1건
- 2019.02.24 :: 분류분석 - 신경망 모형
2. 신경망 모형
- 인공신경망(artificial neural networks) 모형은 동물의 뇌신경계를 모방하여 분류(또는 예측)를 위해 만들어진 모형
- 입력은 스냅스에 해당하며 개발신호의 강도에 따라 가중(weight)되며, 활성함수(activation function)는 인공신경망의 출력(outputs)을 계산
- 많은 데이터에 대해 학습을 거쳐, 원하는 결과가 나오도록(오차가 작아지는 방향) 가중치가 조정
> data("infert", package = "datasets")
> str(infert)
'data.frame': 248 obs. of 8 variables:
$ education : Factor w/ 3 levels "0-5yrs","6-11yrs",..: 1 1 1 1 2 2 2 2 2 2 ...
$ age : num 26 42 39 34 35 36 23 32 21 28 ...
$ parity : num 6 1 6 4 3 4 1 2 1 2 ...
$ induced : num 1 1 2 2 1 2 0 0 0 0 ...
$ case : num 1 1 1 1 1 1 1 1 1 1 ...
$ spontaneous : num 2 0 0 0 1 1 0 0 1 0 ...
$ stratum : int 1 2 3 4 5 6 7 8 9 10 ...
$ pooled.stratum: num 3 1 4 2 32 36 6 22 5 19 ...
> #install.packages("neuralnet")
> library(neuralnet)
> net.infert <- neuralnet(case~age+parity+induced+spontaneous, data=infert, hidden=2, err.fct = "ce", linear.output = F, likelihood = T)
> #net.infert
> plot(net.infert)
'Data 분석' 카테고리의 다른 글
[kaggle] House Price competition data 전처리 (0) | 2020.01.04 |
---|---|
포아송 분포 (Poisson distribution) (0) | 2019.09.16 |
분류분석 - 로지스틱 회귀모형 (0) | 2019.02.24 |
정형 데이터 마이닝 (0) | 2019.02.24 |
시계열분석 (0) | 2019.02.24 |