본문 바로가기

ML | 데이터과학3

[Kaggle] Biking Sharing Demand 데이터분석 연습 test In [ ]: import pandas as pd import numpy as np import matplotlib as mpl import matplotlib.pyplot as plt import seaborn as sns from scipy import stats %matplotlib inline plt.style.use('ggplot') mpl.rcParams['axes.unicode_minus'] = False In [10]: train = pd.read_csv('train.csv', parse_dates=['datetime']) train.shape Out[10]: (10886, 12) In [11]: train.info() RangeIndex: 10886 entries, 0 to 10.. 2018. 5. 24.
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.
반응형