[Statistics] coefficient of determination (결정계수 ~ R squared)
·
Programming/ML
Coefficient of Determination데이터에 대한 현재 regression 모델의 성능(or 적합도)를 평가함 ▷ 1에 가까울수록 좋은 모델임: [0,1]통계 (linear model)에서 사용되는 경우에는 최소값이 0이 보장되나,ML등에서 regression model의 성능 평가에서는 음수도 나올 수 있음(non-linear model인 경우)ML 등에서 regression model이 얼마나 정확하게 data에 fitting 되었는지를 나타냄 (mean만을 사용하는 모델 대비).mean만을 사용하는 단순한 모델 대비 얼마나 우수한지를 Linear model 을 사용하는 Regression Analysis 에서 중요하게 다루는 지표.Squared Correlaton Coefficient..
[DIP] functional plot and image plot.
·
Programming/DIP
functional plot and image plot.Functional plot $f(x,y)$라는  function으로 image를 모델링할 수 있음.2개의 독립변수 $x,y$의 함수로 볼 경우, 3D graphics로 그릴 수 있음.2개의 독립변수에 의해  intensity 또는 brightness가 결정됨.(color 의 경우엔 dependent variable이 여러개로 vector라고 볼 수 있음) 다음은 matplotlib 로 functinal plot 을 수행하는 code snippet 임.from scipy import datasetsimport cv2import numpy as npimport matplotlib.pyplot as pltimg = datasets.face()img_gr..
[ML] Gradient Descent Method: 경사하강법
·
Programming
Gradient Descent Method (경사하강법) : 1. 정의 및 수식Steepest Gradient Descent Method로도 불리는Gradient Descent Method(경사하강법)는 여러 Optimization 방법 중 가장 많이 사용되는 방법들 중 하나임.training set $X$와 현재 $t$에서의 모델의 parameters $\boldsymbol{\omega}_t$의Loss function $L(\boldsymbol{\omega}_t, X)$에서모델의 parameters $\boldsymbol{\omega}_t$에 대한 Gradient vector $\nabla_{\boldsymbol{\omega}} L(\boldsymbol{\omega}_t,X)$를 구하고,이 Grad..
[DIP] Image Quality 관련 정량화 지표들: Resolution, Contrast, SNR
·
Programming/DIP
Image Quality 관련 정량화 지표들: 다음은 Image Restoration등에서 사용되는 Image Quality를 나타내는 정량적 지표들에 대한 간략한 소개임.(image acquisition에 사용된 장비의 성능의 비교에도 사용됨) 참고로 이 문서에서 다룬 지표들과 달리 ideal image가 존재하는 경우엔 해당 ideal image와의 비교를 통해 얼마나 차이가 나는지를 정량화하는 경우도 있음. 이들 지표들에 대해선 다음 URL를 참고.https://dsaint31.me/mkdocs_site/DIP/cv2/etc/dip_metrics/ BME228Metrics for Image Quality Image restoration의 경우, image degradation의 원인을 modelin..
[DIP] Function plot and Image display
·
Programming/DIP
Image는 수학적으로 independent variable이 2개인 multi-variable function $f(x,y)$로 표시할 수 있음. gray-scale image일 때는 multi-variable scalar-valued function (또는 multi-variate function이라도 부른다) color image라면 multi-variable vector-valued function color image 의 경우, 함숫값이 RGB와 같이 3개의 component를 가진 vector임 용어관련 참고 : https://dsaint31.tistory.com/389 [Math] Multi-variable vs. Multi-variate and Multiple Regression 1. Mu..
[DIP] Radial distortion : barrel and pincushion distortions
·
Programming/DIP
0. Remappingmatrix equation으로 표현할 수 없는 형태(non-linear)의 이미지 모양 변환을 위한 기능.OpenCV에서 cv2.remap() 함수를 통해 제공되며,lens distortion 및radial distortion등을모델링하거나 제거하는데 사용가능함.dst = cv2.remap(src, mapx, mapy, interpolation, dst, borderMode, borderValue)src: 입력 이미지mapx, mapy: x축과 y축으로 이동할 좌표, src와 동일한 크기, dtype=float32 임.dst : 결과 이미지, optional그 외 : cv2.warpAffine()과 동일mapx[0][0] = 9.0, mapy[0][0] = 3.0 인 경우,입력 i..