Toggle navigation
Toggle navigation
This project
Loading...
Sign in
임호준
/
M.LClassPractice
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Snippets
Network
Create a new issue
Builds
Commits
Issue Boards
Authored by
임호준
2017-09-28 12:02:56 +0900
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
7f559008d3109933991a4fe02ce207fe2323f126
7f559008
0 parents
LinearRegression Practice file
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
180 additions
and
0 deletions
LinearRegression.ipynb
LinearRegression.ipynb
0 → 100644
View file @
7f55900
{
"cells"
:
[
{
"cell_type"
:
"code"
,
"execution_count"
:
3
,
"metadata"
:
{},
"outputs"
:
[],
"source"
:
[
"import tensorflow as tf
\n
"
,
"import numpy as np
\n
"
,
"import matplotlib.pyplot as plt"
]
},
{
"cell_type"
:
"code"
,
"execution_count"
:
26
,
"metadata"
:
{},
"outputs"
:
[
{
"data"
:
{
"text/plain"
:
[
"'
\\
nfig = plt.figure()
\\
nlinex = np.arange(1, 10)
\\
nliney = np.arange(1, 10)
\\
nsubplot = fig.add_subplot(1, 2, 1)
\\
nsubplot.scatter(linex, liney)
\\
nsubplot = fig.add_subplot(1,2 , 2)
\\
nsubplot.plot(linex, liney)
\\
n
\\
nplt.show()
\\
n'"
]
},
"execution_count"
:
26
,
"metadata"
:
{},
"output_type"
:
"execute_result"
}
],
"source"
:
[
"
\"\"\"\n
"
,
"fig = plt.figure()
\n
"
,
"linex = np.arange(1, 10)
\n
"
,
"liney = np.arange(1, 10)
\n
"
,
"subplot = fig.add_subplot(1, 2, 1)
\n
"
,
"subplot.scatter(linex, liney)
\n
"
,
"subplot = fig.add_subplot(1,2 , 2)
\n
"
,
"subplot.plot(linex, liney)
\n
"
,
"
\n
"
,
"plt.show()
\n
"
,
"
\"\"\"\n
"
]
},
{
"cell_type"
:
"code"
,
"execution_count"
:
27
,
"metadata"
:
{},
"outputs"
:
[],
"source"
:
[
"input_x = tf.placeholder(tf.float32, shape=[None,1])
\n
"
,
"input_y = tf.placeholder(tf.float32, shape=[None,1])
\n
"
,
"
\n
"
,
"weights = tf.Variable(tf.random_normal([1,1]))
\n
"
,
"bias = tf.Variable(tf.random_normal([1]))
\n
"
,
"
\n
"
,
"h = input_x*weights+bias
\n
"
,
"
\n
"
,
"cost = tf.reduce_mean(tf.square(h - input_y))
\n
"
,
"
\n
"
,
"train = tf.train.GradientDescentOptimizer(learning_rate=0.01).minimize(cost)"
]
},
{
"cell_type"
:
"code"
,
"execution_count"
:
28
,
"metadata"
:
{},
"outputs"
:
[
{
"name"
:
"stdout"
,
"output_type"
:
"stream"
,
"text"
:
[
"WARNING:tensorflow:From <ipython-input-28-d73f309817c0>:3: initialize_all_variables (from tensorflow.python.ops.variables) is deprecated and will be removed after 2017-03-02.
\n
"
,
"Instructions for updating:
\n
"
,
"Use `tf.global_variables_initializer` instead.
\n
"
]
}
],
"source"
:
[
"global result
\n
"
,
"with tf.Session() as sess:
\n
"
,
" sess.run(tf.initialize_all_variables())
\n
"
,
" x = [[10],[9],[3],[2]]
\n
"
,
" y = [[90],[80],[50],[30]]
\n
"
,
" for i in range(2000):
\n
"
,
" sess.run(train, feed_dict={input_x:x, input_y:y})
\n
"
,
" result = sess.run(h, feed_dict={input_x:x, input_y:y})
\n
"
,
" weights_variable = sess.run(weights)
\n
"
,
" bias_variable = sess.run(bias)
\n
"
,
" #print(sess.run(h, feed_dict={input_x:[50]}))
\n
"
,
"
\n
"
,
" #print(weights_variable*50+bias_variable)"
]
},
{
"cell_type"
:
"code"
,
"execution_count"
:
7
,
"metadata"
:
{},
"outputs"
:
[
{
"name"
:
"stdout"
,
"output_type"
:
"stream"
,
"text"
:
[
"공부한 시간을 입력해주세요50
\n
"
,
"예상성적은[[ 352.90423584]]입니다.
\n
"
]
}
],
"source"
:
[
"value = input(
\"
공부한 시간을 입력해주세요
\"
)
\n
"
,
"print(
\"
예상성적은
\"
+ str(weights_variable*float(value)+bias_variable)+
\"
입니다.
\"
)"
]
},
{
"cell_type"
:
"code"
,
"execution_count"
:
32
,
"metadata"
:
{},
"outputs"
:
[
{
"data"
:
{
"image/png"
:
"iVBORw0KGgoAAAANSUhEUgAAAXQAAAEICAYAAABPgw/pAAAABHNCSVQICAgIfAhkiAAAAAlwSFlz
\n
AAALEgAACxIB0t1+/AAAIABJREFUeJzt3Xl4VPXZ//H3zb6LrIKooCAoKqCRRdSnrlXbCu2voq0L
\n
VhC7W3ft00Wr7WP7qNWuSnFBRQHR1uWp1g1tBQUCKsgmieyyJGE1AbLdvz9mRmMMk0kyM+fMzOd1
\n
XbmSzCSZG/lye/I953Nuc3dERCTzNQu6ABERSQ41dBGRLKGGLiKSJdTQRUSyhBq6iEiWUEMXEckS
\n
augiIllCDT0NzGyNme0xs0/MbLOZPWJmHaLPPWJm5dHnYm/v1/r+DtHHX9zPzz4zXX8WyX611uuW
\n
2Ho1szfMbG/08WIze8bMetX4vlvNrKLWWt5R43k3s9Lo4yVm9pqZXVjrtd8ws4k1Pu9kZvea2bro
\n
9xVGP+9W63Wqa9T8iZldnJ7/WuGihp4+X3P3DsBQYBhwS43nfufuHWq8Dan1vf8P2AecZWYHpale
\n
yW2x9Xo8kAf8LPr4D6OP9wc6AHfV+r4ZtdZy51rPD4l+/0DgEeBPZvbLugows1bAa8Bg4BygEzAK
\n
KAGG13wdYF2s5ujbtKb98TOTGnqauftm4F9EGnuixgP3A4uBS1JRl0hd3H0j8CJwTK3HdwD/oGHr
\n
uOb3F7v7Y8D3gFvMrGsdX3YZcCjwdXdf5u7V7r7V3W9393825nWznRp6mplZH+BcoCDBrz8M+BIw
\n
Lfp2WcqKE6nFzA4BzgPerfV4V+AbJLiO43gWaAEMr+O5M4GX3P2TJr5GzlBDT59/mNluYD2wFaj5
\n
a+b1ZrajxtvUGs9dCix292XAdGCwmQ1LX9mSo/4R3f9+C3gT+E308T+Y2U6gGOgG/KjW942rtZZ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whsl7SFpU2syeBt4GBZrbBzCYAdwJnmdkqIkdZd6arngbS2q6b1japW9uK/ouIZImgj9BFRCRJ
\n
1NBFRLKEGrqISJZQQxcRyRJq6CIiWUINXUQkS6ihi4hkif8P3YM6KtxOY8YAAAAASUVORK5CYII=
\n
"
,
"text/plain"
:
[
"<matplotlib.figure.Figure at 0x20d8cbce208>"
]
},
"metadata"
:
{},
"output_type"
:
"display_data"
}
],
"source"
:
[
"linex= np.array(x)
\n
"
,
"linex= linex.reshape(-1)
\n
"
,
"
\n
"
,
"liney = np.array(y)
\n
"
,
"liney = liney.reshape(-1)
\n
"
,
"
\n
"
,
"predictY= np.array(result)
\n
"
,
"predictY = predictY.reshape(-1)
\n
"
,
"
\n
"
,
"fig = plt.figure()
\n
"
,
"subplot =fig.add_subplot(1,2,1)
\n
"
,
"subplot.plot(linex, liney)
\n
"
,
"subplot.set_title(
\"
REAL
\"
)
\n
"
,
"
\n
"
,
"subplot = fig.add_subplot(1,2,2)
\n
"
,
"subplot.plot(linex, predictY)
\n
"
,
"subplot.set_title(
\"
PREDICT
\"
)
\n
"
,
"
\n
"
,
"plt.show()"
]
},
{
"cell_type"
:
"code"
,
"execution_count"
:
null
,
"metadata"
:
{},
"outputs"
:
[],
"source"
:
[]
}
],
"metadata"
:
{
"kernelspec"
:
{
"display_name"
:
"Python 3"
,
"language"
:
"python"
,
"name"
:
"python3"
},
"language_info"
:
{
"codemirror_mode"
:
{
"name"
:
"ipython"
,
"version"
:
3
},
"file_extension"
:
".py"
,
"mimetype"
:
"text/x-python"
,
"name"
:
"python"
,
"nbconvert_exporter"
:
"python"
,
"pygments_lexer"
:
"ipython3"
,
"version"
:
"3.5.4"
}
},
"nbformat"
:
4
,
"nbformat_minor"
:
2
}
Please
register
or
login
to post a comment