일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
- yolov3
- TCP
- DeepLearning
- pytorch
- 서포트벡터머신이란
- EfficientNet
- SVM 이란
- support vector machine 리뷰
- Computer Vision
- fast r-cnn
- SVM hard margin
- CNN
- CS231n
- pytorch c++
- SVM margin
- darknet
- 논문분석
- libtorch
- Object Detection
- yolo
- pytorch project
- 데이터 전처리
- Deep Learning
- cnn 역사
- Faster R-CNN
- svdd
- cs231n lecture5
- self-supervision
- RCNN
- computervision
- 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는 다음과 같이 정의한다. N(x|μ,Σ)≜1(2π)D/2|Σ|1/2exp[−12(x−μ)TΣ−1(x−μ)] exponential 안 수식은 featrue x와 mean vector μ 사이의 차이를 나타내는 mahalanobis distance로, Σ에 대해 eigen dec..
Naive Bayes Classifiers 이제부터는 discrete-valued feature인 x∈{1,…,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의 경우에는 약간의 차이가 있다. 데이터가 Da,Db로 나뉘었다고 가정을 하면 posterior는 아래 수식으로 표현된다. $$ p(\theta \..

Introduction Discrete classification은 크게 Discriminative approach와 Generative approach로 나뉜다. Discrimitive approach p(y=c∣x,θ) 어떠한 model θ가 주어졌을 때, feature vector x를 통해 y=c인 class를 추론하는 것으로 대표적으로 Linear regression과 Logistic regression이 있다. Generative approach p(y=c|x,θ)∝p(x|y=c,θ)p(y=c|θ) 수식은 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∣x)를 구했다. Discriminative approach는 p(y∣x)를 바로 구하기 위해 model을 fitting 하는 과정이다. 이번 챕터에서는 parameter인 wT,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을 진행했었다. Linear regression model: p(y∣x,θ)=N(y∣wTx,σ2) $$ \text{Non-linear regression model:}\ \ p(y\mid {x}, {\theta}) = \mathcal{N}(y\mid w^{T}x\phi(..