일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | ||||||
2 | 3 | 4 | 5 | 6 | 7 | 8 |
9 | 10 | 11 | 12 | 13 | 14 | 15 |
16 | 17 | 18 | 19 | 20 | 21 | 22 |
23 | 24 | 25 | 26 | 27 | 28 | 29 |
30 | 31 |
- self-supervision
- SVM hard margin
- DeepLearning
- TCP
- 논문분석
- RCNN
- yolov3
- pytorch c++
- pytorch
- svdd
- computervision
- EfficientNet
- pytorch project
- support vector machine 리뷰
- Faster R-CNN
- Deep Learning
- Computer Vision
- darknet
- SVM margin
- cnn 역사
- libtorch
- CNN
- Object Detection
- cs231n lecture5
- yolo
- 데이터 전처리
- SVM 이란
- fast r-cnn
- CS231n
- 서포트벡터머신이란
- Today
- Total
목록study/Machine Learning (12)
아롱이 탐험대

CODE (1) main.py import numpy as np import warnings from dataloader import DataLoader from model import get_GaussianNBC, predict, get_ACC warnings.filterwarnings("ignore", category=RuntimeWarning) if __name__ == "__main__": train_path = './data/train/' test_path = './data/test/' train_setting = DataLoader(train_path, 'train') # 60000 * 28 * 28 * 3 test_setting = DataLoader(test_path, 'test') # 1..

Gaussian models Multivariate Gaussian 또는 MVN (Multivariate Normal)은 연속적인 데이터에 대한 joint probability density function에서 사용하며, D 차원의 MVN에 대한 PDF는 다음과 같이 정의한다. $$ \mathcal N(x|{\mu,\Sigma})\triangleq\frac{1}{(2\pi)^{D/2}|\Sigma|^{1/2}}\exp\left[-\frac{1}{2}(x-\mu)^T\Sigma^{-1}(x-\mu)\right] $$ exponential 안 수식은 featrue $x$와 mean vector $\mu$ 사이의 차이를 나타내는 mahalanobis distance로, $\Sigma$에 대해 eigen dec..
Naive Bayes Classifiers 이제부터는 discrete-valued feature인 $x\in\{1,\dots,K\}^D$를 어떻게 분류할 것인지 알아보자. 어기서 $K$는 각 feature의 value 개수이고, $D$는 feature의 개수이다. 우리는 generative approach를 사용할 것이고, 이를 위해 class conditional distribution인 $p(x|y=c)$를 지정해야 한다. 가장 간단한 approach는 feature들이 주어진 class label에 대해 conditionally independent라고 가정하는 것이다. 이를 통해 class conditional density를 다음과 같이 1-D density의 곱으로 쓸 수 있다. $$ p(x|..
Online Learning Machine learning에는 크게 batch learning과 online learning이 존재한다. 만약 데이터 1000만 개가 존재할 때 batch learning은 이를 한 번에 넣어서 학습을 진행하는 반면, online learning은 1~5000, 5001 ~ 10000 이런 식으로 나누어 학습을 진행한다. online learning에서 고려해야하는 점은 항상 결과가 같은지 다른지 이다. batch learning의 posteior는 위에서 정의한 수식과 같다. 하지만 online learning의 경우에는 약간의 차이가 있다. 데이터가 $D_{a}, D_{b}$로 나뉘었다고 가정을 하면 posterior는 아래 수식으로 표현된다. $$ p(\theta \..

Introduction Discrete classification은 크게 Discriminative approach와 Generative approach로 나뉜다. Discrimitive approach $$ p(y = c \mid x, \theta) $$ 어떠한 model $\theta$가 주어졌을 때, feature vector $x$를 통해 $y=c$인 class를 추론하는 것으로 대표적으로 Linear regression과 Logistic regression이 있다. Generative approach $$ p(y=c|x,\theta)\propto p(x|y=c,\theta)p(y=c|\theta) $$ 수식은 discrimitive approach와 같지만, 해당 식을 이용하여 바로 추론하는 것..

Data load를 제외한 모든 Linear Regression의 과정들을 python과 numpy만을 사용하여 구현해보았습니다. 개념에 대한 전체적인 내용은 아래 포스트를 참고하시기 바랍니다. https://ys-cs17.tistory.com/73 Code implementation Normalization weight-height.csv 파일을 DataFrame으로 만든 후 해당 함수를 통해 normalization을 진행합니다. 1. Min max normalization def min_max_normalize(df): x = (df['Weight'] - min(df['Weight'])) / (max(df['Weight']) - min(df['Weight'])) y = (df['Height'] - ..

Introduction Probabilistic classifier의 목적은 어떠한 label에 대해 확률 적으로 추론하는 것이다. Generative approach는 $p(y,x)$의 joint model을 찾은 후, vector $x$의 조건에 따라 $p(y \mid x)$를 구했다. Discriminative approach는 $p(y \mid x)$를 바로 구하기 위해 model을 fitting 하는 과정이다. 이번 챕터에서는 parameter인 $w^{T}, x$가 linear한 discrimitive model이라는 것을 가정할 것이다. 이렇게 하면 model fitting 과정을 단순화할 수 있다. Model specification 본격적으로 logistic regression formu..

Linear regression은 supervised learning에서 많이 사용되고, 앞에서 살펴보았던 kernel이나 basis expansion 등을 이용해 Non-linear relationship을 가진 model을 만들 수 있었다. 우리는 아래 수식과 같이 parameter들을 주로 Gaussian을 사용하여 modeling을 진행했었다. $$ \text{Linear regression model:}\ \ p(y\mid {x}, {\theta}) = \mathcal{N}(y\mid w^{T}x, \sigma^{2}) $$ $$ \text{Non-linear regression model:}\ \ p(y\mid {x}, {\theta}) = \mathcal{N}(y\mid w^{T}x\phi(..