분류
-
[기계학습]합성곱 신경망(CNN : Convolutional Nerual Network) (Part 2/2)코딩(Coding)/기계학습 2022. 2. 18. 12:03
합성곱 신경망(CNN :Convolutional Nerual Network) (Part 2/3) 기존의 Fully-Connected 모델은 1차원의 데이터 말고 2차원 이상의 데이터를 사용하게 된다면, 해당 입력 데이터를 Flatten시켜 한 줄의 데이터로 만들어야 한다. 이 과정에서 데이터의 손상이 발생하게 된다. 이미지의 경우에는 상하좌우 이웃 픽셀의 정보가 손실된다. 위 문제를 해결하기 위해 고안한 해결책이 바로 CNN이다. CNN 장점 단순 Fully-connected 보다 학습시킬 weight가 적다. 학습과 연산에 속도가 빠르며, 효율적이다. 이미지나 영상데이터를 처리할 때 사용한다. CNN의 접근 이미지 표현 => Matrix 해당 실습에서 사용된 데이터와 코드(.ipynb)는 아래 링크에서..
-
[기계학습] 로지스틱 회귀(분류 Classification)(Logistic Regression) (Part 2/2)코딩(Coding)/기계학습 2022. 1. 25. 22:17
이전 포스팅의 개념적인 부분을 python의 pytorch 패키지를 통해 구현하는 포스팅입니다. 이전 포스팅을 보고오세요~ :D (https://jsy-coding-blog.tistory.com/47) 포스팅에서 사용하는 PPT 자료는 제 Github에서 pdf 형식으로 받을 수 있습니다. (https://github.com/JoSangYeon/Machine_Learning_Project/blob/master/PPT/01.%20Machine%20Learning.pdf) Logistic Regression 분류 문제 지난 포스팅 복습 코드 실습(With Pytorch) 패키지 Import import numpy as np import pandas as pd import torch import torch.n..
-
[기계학습] 로지스틱 회귀(분류 Classification)(Logistic Regression) (Part 1/2)코딩(Coding)/기계학습 2022. 1. 21. 11:29
로지스틱 회귀(분류) 앞서 포스팅했던 선형회귀는 학습한 데이터를 기반으로 새로운 데이터에 대한 Output을 예측하는 문제라고 설명할 수 있겠다. 하지만, 로지스틱 회귀는 반대로 좌표평면상의 데이터를 각 그룹(class)으로 분류(classification)하는 것이다. 다음과 같은 데이터에 대해서 선형회귀를 적용한다고 가정한다면, 위 그림처럼 직선이 그려질 것이다. 이 직선을 토대로 x가 5를 기준으로 성공/실패를 분류 할 수 있을 것이다. 하지만, 문제는 아래에서 발생한다. 만약 새로운 데이터 (20, 성공)이 있다면, x가 10을 기준으로 성공/실패를 분류할 것인데, 예외로 (9, 성공)이 분류에 실패하게 될 것이다. 따라서 해결방법으로 새로운 함수를 도입한다. 바로 시그모이드(Sigmoid) 함수..
-
[기계학습] 선형회귀(Linear Regression) (Part 2/2)코딩(Coding)/기계학습 2022. 1. 18. 12:49
이전 포스팅의 개념적인 부분을 python의 pytorch 패키지를 통해 구현하는 포스팅입니다. 이전 포스팅을 보고오세요~ :D (https://jsy-coding-blog.tistory.com/45) 포스팅에서 사용하는 PPT 자료는 제 Github에서 pdf 형식으로 받을 수 있습니다. (https://github.com/JoSangYeon/Machine_Learning_Project/blob/master/PPT/01.%20Machine%20Learning.pdf) 선형회귀 구현(with Pytorch) 이전 포스팅에서 다뤘던 선형회귀의 개념을 Pytorch를 통해 구현해보자! 사용할 라이브러리를 import 한다. import numpy as np import pandas as pd import m..
-
[기계학습] 기계학습(Machine Learning) 기본 개념코딩(Coding)/기계학습 2022. 1. 10. 21:43
Machine Learning 기계학습의 정의를 퍼셉트론과 연결지어 설명해야겠지만, 앞으로 2개의 포스팅(선형회귀, 분류 기본 기술)을 설명하기에 쉽게 "내가" 공부하면서 정의한 기계학습에 대해서 설명하려고 한다. 추후 포스팅은 선형회귀부터 CNN, RNN, Transformer까지 다룰 예정이다. 기계학습이란 어떠한 데이터로부터 스스로 "학습"하여 작동하는 것이다. 지도학습(Supervised Learning) Label(정답)이 정해져있는(알고 있는) 데이터로 부터 학습을 진행한다. Label을 보고 학습 -> Training Datasets 종류 Predicting(예측) Classification(분류) 비지도 학습(Unsupervised Learning) 지도학습과 반대로 Label이 정해져있지..