Tag: artificial-intelligence
Posts
Bayes' Nets
$$ % latex command here \gdef\independent{\perp\kern-5pt \perp} \gdef\ConditionallyIndependent#1#2#3{#1 \perp\kern-5pt \perp #2 \mid #3} $$
Probability Marginal Distribution Conditional Probabilities Normalization Trick Inference Inference by Enumeration Inference with Bayes’ Rules Bayes’ Nets Independence: $X \independent Y \iff \forall x, y: P(x, y) = P(x)P(y)$ $\forall x, y: P(x|y) = P(x)$ Conditional Independence: $\ConditionallyIndependent{X}{Y}{Z} \iff \forall x, y, z: P(x, y |z)= P(x|z)P(y|z)$ $\forall x, y, z: P(x|z,y) = P(x |z)$ D-Separation Query: $\ConditionallyIndependent{X_i}{X_j}{{X_{k_1}, \dots, X_{k_n}}}$?
Posts
Reinforcement Learning
don’t know $T$ or $R$ model-based -> get $T$ and $R$ model-free passive: learn state values temporal difference(TD) learning $sample = R(s, \pi(s), s’) + \gamma V^{\pi}(s’)$ $V^\pi(s) \gets (1 - \alpha)V^\pi (s) + (\alpha) sample$ or $V^\pi(s) \gets V^\pi (s) + \alpha (sample - V^\pi(s))$ limit: make new policy?? active: Q-learning $Q_{k+1}(s, a) \gets \sum_{s’}T(s, a, s’)[R(s, a, s’) + \gamma \max_{a’} Q_k(s’, a’)]$ from sample (s, a, s’,
Posts
MDP (Markov Decision Process)
random known environment non-deterministic search problems solve w/ expectimax find optimal policy $\pi^*: S \rightarrow A$ discounting: make short solution less cost value iteration time: $O(S^2 A)$ will coverage to unique optimal values init $V_0(s) = 0$ $V_{k+1}(s) \gets \max_a \sum_{s’} T(s, a, s’) [R(s, a, s’) + \gamma V_k(s’)]$ policy iteration policy evaluation $V_0^\pi(s) = 0$ $V_{k+1}^\pi(s) \gets \sum_{s’}T(s, \pi(s), s’)[R(s, \pi(s), s’) + \gamma V_{k}^\pi (s’)]$ time: $O(S^2)$ per iteration extraction: $\pi^*(s) = \arg\max_a\sum_{s’}T(s, a, s’)[R(s, a, s’) + \gamma V^*(s’)]$ extraction: $\pi^*(s) = \arg\max_a Q^*(s, a)$ policy improvement update with one-step look-ahead
Posts
Game Tree
Game Trees: Adversarial Search zero-sum: maximize, minimize 현재 상태에서 최선을 다하기: w/ evaluation functions depth matters minimax pruning time: $O(b^m)$, space: $O(bm)$ alpha-beta pruning time: $O(b^{m/2})$ exact solution: impossible Uncertainty & Utilities expectimax random agent
Posts
CSP (Constraint Satisfaction Problem)
ex) map coloring constraint graphs constraints unary constraints binary constraints high-order constraints: involve ≥3 variables (cryptarithmetic column constraints) preferences(soft constraints): cost search backtracking search DFS one variables at a time, check constraints as you go improve ordering: of variables, of values filter: detect inevitable failure early structure: exploit problem structure filtering: forward checking keep domains for unassigned variables filtering: arc consistency check all arc($X \rightarrow Y$) consistent $\iff$ $\forall x, \exists y P$ ordering: MRV (minimum remaining values) choose variable with fewest values remain fail-fast ordering, most constrained variable ordering: LCV (least constraining value) structure: nearly tree-structured CSP conditioning: instantiate variable, prune its neighbors’ domains cutset conditioning: make remaining constraint graph a tree time: $O(d^c (n-c)d^2)$ hill climbing start wherever repeat: best neighboring state beam search like greedy hill climbing search, but keep $K$ states at all times
Posts
Search
graph vs tree algorithms DFS (Depth-First Search) strategy: expand deepest node first fringe: LIFO stack for $m$ tiers (depth), $b$ nodes (children) time: $O(b^m)$ space: $O(bm)$ $m$ infinite -> non-complete non-optimal: leftmost solution BFS (Breath-First Search) strategy: expand shallowest node first fringe: FIFO queue for $s$ shallowest tiers (depth), $b$ nodes (children) time: $O(b^s)$ space: $O(b^s)$ complete (for given $s$) optimal: only if costs all 1 UCS (Uniform Cost Search) strategy: expand cheapest node first fringe: priority queue (w/ cumulative cost) for solution cost $C^*$, minimum arc cost $\varepsilon$ => effective depth $C^* / \varepsilon$ (tiers) time: $O(b^{C^* / \varepsilon})$ space: $O(b^{C^* / \varepsilon})$ complete / optimal Greedy Search strategy: expand node that (think is) closest to a goal state A* uniform-cost: orders by path cost / backward cost $g(n) greedy: orders by goal proximity / forward cost $h(n)$ A*: orders by the sum: $f(n) = g(n) + h(n)$ admissible heuristics $\iff 0 \le h(n) \le h^*(n) \quad $where $h^*(n)$ is the true cost to nearest goal -> make problem simpler consistent heuristics
Tag: react-native
Posts
Til
오늘부터 React Native를 다루게 되었다. 때문에 React Native에서 일어나는 troubleshooting 관련 글이 많을 예정이다. 특히나 pnpm monorepo 환경에서 RN을 사용하고 있기 때문에 더욱
Tag: CNTDA
Posts
Network Layer: Control Plane
per-router control plane: 각 라우팅 각고리즘은 각각의 라우터에 좬한다. Software-Defined Networking(SDN) control plane: 리모트 컨트롤러 컴퓨터에 의해 라우터에 포워딩 테이블이 설치된다. Routing protocols 보내는 호스트에서 받는 호스
Posts
Network Layer: Data Plane
IP, NAT, middlebox 등이 이에 속한다. 이에 해당하는 장비로는 라우터가 있다. Services and Protocols transport layer가 특정 장비에만 존재하는 것과 달리 network layer는 호스트, 라우터 등 모든 장
Posts
Transport Layer
UDP: User Datagram Protocol connectionless한 프로토콜이고, TCP와 다르게 handshake과정이 없다. 각 UDP segment는 독립적으로 처리된다. 장점
Tag: ISL
Posts
Multiple Testing
여기에서는 multiple hypothesis testing, 다중 가설 검정을 다룰 것이다. 이전에 null hypothesis(귀무 가설)은 $H_0: \beta_0 = 0$, 즉 control group과 treatment group의 혈압 차이가 없다는 등
Posts
Deep Learning
Neural Network는 1980년대에 유행하기 시작했는데, 1990년대에 SVM, RF, Boosting 등의 기법이 나오면서 살짝 수그러들었다. 이는 2010년대에 Deep Learni
Posts
Unsupervised Learning
지금까지 supervised learning에 대해서ㅏ배웠다 여기에서는 features뿐만 아니라 그에 따른 종속 변수(response, outcome variable)도 주어
Posts
Survival Analysis
Survival Analysis는 특정 이벤트가 일어나기 전까지의 시간이라는 feature를 가지고 있다 regression 문제로 보일 수 있지만, 문제는 censored된 데이터가 있
Posts
Support Vector Machine
Support Vector Machine 이때까지 이진 분류는 feature space를 가르는 하나의 plane(hyperplane)을 찾는 문제로 생각해왔다. 하지만 place으로 분리하는 것이
Tag: IANA
Posts
IDNA Prefix에 관한 이야기
OpenID Provider 배경지식 글을 쓰던 중 URI Fragment에 대해 찾아보다가 URL 위키피디아 문서를 보게 되었고, 그곳에서 언급 된 Internationalized URL을 보다가 IDNA Prefix가 눈에 띄였
Tag: IDNA
Posts
IDNA Prefix에 관한 이야기
OpenID Provider 배경지식 글을 쓰던 중 URI Fragment에 대해 찾아보다가 URL 위키피디아 문서를 보게 되었고, 그곳에서 언급 된 Internationalized URL을 보다가 IDNA Prefix가 눈에 띄였
Tag: RFC
Posts
IDNA Prefix에 관한 이야기
OpenID Provider 배경지식 글을 쓰던 중 URI Fragment에 대해 찾아보다가 URL 위키피디아 문서를 보게 되었고, 그곳에서 언급 된 Internationalized URL을 보다가 IDNA Prefix가 눈에 띄였
Tag: URL
Posts
IDNA Prefix에 관한 이야기
OpenID Provider 배경지식 글을 쓰던 중 URI Fragment에 대해 찾아보다가 URL 위키피디아 문서를 보게 되었고, 그곳에서 언급 된 Internationalized URL을 보다가 IDNA Prefix가 눈에 띄였
Tag: jwt
Posts
ID Token
JWT OpenID Connect에 대한 글을 읽거나 OpenID Provider를 사용하면 ID Token이라는 녀석을 만날 수 있다. ID Token의 모양을 보면 JWT랑 닮았지만,
Tag: OpenID Connect
Posts
ID Token
JWT OpenID Connect에 대한 글을 읽거나 OpenID Provider를 사용하면 ID Token이라는 녀석을 만날 수 있다. ID Token의 모양을 보면 JWT랑 닮았지만,
Posts
Make Own OpenID Provider
만들어야 할 것 OpenID Provider를 만드는데 필요한 요구 사항을 간단하게 정리하면 아래와 같다. OAuth 2.0 Authorization Server authorize endpoint (web) token endpoint (server) revoke endpoint (server, RFC7009) OpenID Connect Provider discovery document jwks_uri userinfo endpoint 클라이언트 관
Posts
Make Own OpenID Provider - 사전지식
학내 개발팀에서 이미 만든 인증 서버가 있었는데, OpenID Connect는 물론, OAuth 2.0 표준도 만족하지 않고 있었다. OAuth 2.0 표준과 함께 OpenID Connect를 만족하게끔 개
Tag: nestjs
Posts
Make Own OpenID Provider
만들어야 할 것 OpenID Provider를 만드는데 필요한 요구 사항을 간단하게 정리하면 아래와 같다. OAuth 2.0 Authorization Server authorize endpoint (web) token endpoint (server) revoke endpoint (server, RFC7009) OpenID Connect Provider discovery document jwks_uri userinfo endpoint 클라이언트 관
Tag: Flutter
Posts
내가 사용하는 Flutter 개발 환경
지금은 Flutter를 사용해서 앱 개발에 많이 활용하고 있다. Flutter는 multi-platform framework로 하나의 코드 베이스로 여러가지 OS (iOS, Android, Web 등)에서 동작
Tag: GitHub
Posts
GitHub의 숨은 UX - mail
GitHub에서는 이메일을 통해서 알림을 받을 수 있다. 나는 GitHub에서 누가 Review Request를 보냈을 때나, 댓글이 달렸을 때, 관심을 가지고 있는 이슈
Tag: UX
Posts
GitHub의 숨은 UX - mail
GitHub에서는 이메일을 통해서 알림을 받을 수 있다. 나는 GitHub에서 누가 Review Request를 보냈을 때나, 댓글이 달렸을 때, 관심을 가지고 있는 이슈
Tag: FE
Posts
코드를 안전하게 전달하는 방법
2023년 4월 7일, 동아리에서 발표한 자료를 기반으로 작성한 글입니다. 들어가며 서버, 웹, 앱 이것저것 가리지 않고 개발을 하다보니 보안에 관심이 많아졌다.
Tag: security
Posts
코드를 안전하게 전달하는 방법
2023년 4월 7일, 동아리에서 발표한 자료를 기반으로 작성한 글입니다. 들어가며 서버, 웹, 앱 이것저것 가리지 않고 개발을 하다보니 보안에 관심이 많아졌다.
Tag: hugo
Posts
Hello, Blog
그동안 마음속으로만 다짐하고 있었던 블로그를 만들었다. 몇년간 많은 프로젝트를 거쳐가면서 속으로는 배운 점이 많았는데, 이걸 정리하지 않으니 예전에 익혔던 것이