딥러닝: 03. 다중 선형 회귀(Multi Variable linear regression)
In [6]: import numpy as np import tensorflow as tf In [14]: xy = np.loadtxt('./dataset/data-01-test-score.csv',delimiter=',' , dtype = np.float32 ) x = xy[:,0:-1] y = xy[:,[-1]] In [16]: print(x.shape, x, len(x)) print(y.shape, y, len(y)) (25, 3) [[ 73. 80. 75.] [ 93. 88. 93.] [ 89. 91. 90.] [ 96. 98. 100.] [ 73. 66. 70.] [ 53. 46. 55.] [ 69. 74. 77.] [ 47. 56. 60.] [ 87. 79. 90...
2019. 7. 30.
딥러닝 : 로지스틱 회귀 코딩
1.로지스틱 회귀의 정의¶참과 거짓 중 하나를 내놓는 과정. ex) 점수가 아닌 오직 합격과 불합격만 발표되는 시험의 경우 In [15]: import tensorflow as tf import numpy as np # 공부시간과 합격(0,1) 데이터 data = [[2,0], [4,0], [6,0], [8,1], [10,1], [12,1], [14,1]] x_data = [x_row[0] for x_row in data] y_data = [y_row[1] for y_row in data] In [16]: # a,b의 값을 임의로 정해준다. a = tf.Variable(tf.random_normal([1], dtype=tf.float64, seed = 0)) b = tf.Variable(tf.random..
2019. 7. 25.