본문 바로가기

분류 전체보기136

안드로이드 Firebase Welcome file 안드로이드 Firebase 아이디와 비밀번호 등록하는 예제 후에 잊어버렸을 때를 위해 메모해둔다 MainActivity package test.roharon.com.myapplication; import android.support.v7.app.AppCompatActivity; import android.os.Bundle; import android.view.View; import android.widget.Button; import android.widget.TextView; import com.google.firebase.database.DatabaseError; import com.google.firebase.database.DatabaseReference; import co.. 2018. 2. 17.
Cost Function for Logistic regression linear regression, cost, logistic Cost function for logistic logistic hyphothesis H(x)=11+e−xH(x)=\frac{1}{1+e^{-x}}H(x)=1+e−x1​ cost(W)=1m∑c(H(x),y)cost(W)=\frac{1}{m}\sum{c(H(x),y)} cost(W)=m1​∑c(H(x),y) c(H(x),y){−log(H(x))y=1−log(1−H(x))y=0c(H(x),y)\begin{cases} -log(H(x)) & \text{y=1} \\ -log(1-H(x)) & \text{y=0} \end{cases}c(H(x),y){−log(H(x))−log(1−H(x))​y=1y=0​ tensorflow에서 구현할때 if문을 달아야.. 2018. 1. 26.
Linear regrssion, cost func. , Logistic linear regression, cost, logistic Linear Regression 정리Hypothesis H(x)=W∗x+bH(x)=W*x+b H(x)=W∗x+b H(x1,x2,x3)=w1x1+w2x+w3x3+bH(x1,x2,x3)=w_{1}x_{1}+w_{2}x+w_{3}x_{3}+bH(x1,x2,x3)=w1​x1​+w2​x+w3​x3​+b 실제 구현시 H(x)=XH (매트릭스를 사용한다) bias는 간략히 하기위해 생략 Cost Function cost(W,b)=1m∑i=1m(H(x)i−yi)2)cost(W,b) = \frac{1}{m}\sum_{i=1}^{m}(H(x)^i-y^i)^2)cost(W,b)=m1​i=1∑m​(H(x)i−yi)2) cost(W,b)=1m∑i=1m(H(x1,x2,.. 2018. 1. 26.
큐를 통한 미로찾기(최단거리) 큐 구현 큐를 통한 미로찾기(최단거리) 하나의 큐를 만든다. 위치 (0,0)은 이미 방문한 위치임을 표시 큐가 빌 때까지 4를 반복한다. 1. 큐에서 하나의 위치p를 꺼낸다. 2. p에서 한 칸 떨어진 위치들 중에서 이동 가능하면서 아직 방문하지 않은 모든 위치들을 방문된 위치임을 표시하고 큐에 넣는다. 3. 만약 그 위치가 출구라면 종료한다. Queue queue = create(); Position cur; cur.x=0; cur.y=0; enqueue(queue,cur); maze[0][0]=-1; bool found=false; while(!is_empty(queue)) { Position cur=dequeue(queue); for(int dir=0;dir 2018. 1. 17.
반응형