728x90

전체 글 452

Lecture 3 - Autoregressive Models

위 3가지 조건을 만족하는 model distribution을 찾고 싶다.in order to use chain rule you need to pick order, and there is no ground rule for this.seperate probability distribution using chain rule.first one is conditional probability table(CPT) because it is the very first pixel and doesn't rely on anythingfrom second pixel we use logisitic regressionautoregressive = trying to predict parts of each data point, g..

Lecture 2 - Background

represent 하는 state는 2^n 개이지만 joint pdf 를 나타내기위한 필요한 parameter 개수는 2^n-1 이다.마지막 1개는 1- (the other parameter's probabilty)를 해서 계산할 수 있으니까but when assuming RV are indepdent variable. we can calculate joint distribution by mulitpling each pdand then we only need N parameters , since we know how to calculate joint distribution.before example we didn't know how to calculate joint distrubiton so we lit..

[4.4장 메모이제이션 훅]

useMemo는 일종의 캐시역할을 하는 훅이다. function useMemo(nextCreate, deps) { console.log("deps = ", deps); if (!memorizedStates[cursor]) { const nextValue = nextCreate(); memorizedStates[cursor] = [nextValue, deps]; cursor = cursor + 1; return nextValue; } const nextDeps = deps; const [prevValue, prevDeps] = memorizedStates[cursor]; if (prevDeps.every((prev, index) => prev === nextDeps[index])) { cursor = cu..

[4.3 리듀서 훅]

관리해야할 state가 많아질 수록 리듀서 훅을 사용할 때가 온다. function useRegisterForm() { const [state, setState] = useState({ value: { nickname: "", password: "" }, error: { nickname: "", password: "" }, }); const handleChange = (e) => { setState({ ...state, value: { ...state.value, [e.target.name]: e.target.value, }, }); }; const handleReset = (e) => { setState({ value: { nickname: "", password: "" }, error: { nickn..

[4.1장 레프 훅][4.2장 레프 훅]

function useRef(initialValue) { if (!isInitialized[cursor]) { memorizedStates[cursor] = { current: initialValue }; isInitialized[cursor] = true; } const memorizedState = memorizedStates[cursor]; cursor = cursor + 1; return memorizedState; } closure를 사용해서 useRef를 사용하는 function componenet가 re render되더라도 주어진 값을 보존할 수 있도록 하였다. https://www.inflearn.com/questions/1211434/4-1%EC%9E%A5-%EB%A0%88%ED%94%8..

07 rep LTI 01 (선형 시불변 시스템 표현)

G(s) 를 보고 2차 미분 방정식으로 이루어진 LTI system임을 알 수 있어야 한다. 기존에는 x(t) 가 input 이였다. 하지만 state space에서는 X(s)를 state 으로 쓰기 때문에 U 를 input으로 notation이 바뀐것이다. 그래도 햇갈린다. x(t) 를 L transform 한것이 X(s) 이긴한데.. X(s) == U(s) 는 아닌데.. X(s)는 state에 따른 값이고 U(s) state에 다른 input인데 (초기값과 비슷한역할인것 같은데) transfer function을 구할 때는 초기 값을 0이라고 가정한다. 순수하게 input에 대한 output만을 구하고 싶기 때문에 system이 stable하다면 Ce^At가 0에 수렴한다. stable 하면 A가 음..

[3.2장 상태 훅]

순수함수는 2가지 특징을 가진다. 입력이 같으면 결과도 같다. 부작용이 없다. 몇번을 실행하더라도 자신의 일만 할 뿐, 함수 바깥 공간을 건드려서는 안된다. 컴포넌트의 render 함수는 순수해야한다. 즉 , 컴포넌트의 state를 변경하지 않고 호출될 때마다 동일한 결과를 반환해야하고 브라우저와 직접적으로 상호작용하지 않는다. const Counter = () => { const [count, setCount] = React.useState(0) document.title = `count: ${count}` const handleClick = () => setCount(count + 1) return plus } export default Counter 1) document api를 직접 함수 컴포넌트..

[3.1장 클래스/함수 컴포넌트][3.2장 상태훅]

class Contract { constructor(name) { this.name = name; } sign() { const capturedName = this.name; setTimeout(() => console.log("서명인: ", capturedName), 3000); } } // const contract = new Contract("user"); contract.sign(); contract.name = "user2"; function createContract(name) { const sign = () => { setTimeout(() => console.log("서명인: ", name), 3000); }; return { sign, }; } const contract = createC..

728x90