LinearRegression.ipynb 17.9 KB
{
 "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\nAAALEgAACxIB0t1+/AAAIABJREFUeJzt3Xl4VPXZ//H3zb6LrIKooCAoKqCRRdSnrlXbCu2voq0L\nVhC7W3ft00Wr7WP7qNWuSnFBRQHR1uWp1g1tBQUCKsgmieyyJGE1AbLdvz9mRmMMk0kyM+fMzOd1\nXbmSzCSZG/lye/I953Nuc3dERCTzNQu6ABERSQ41dBGRLKGGLiKSJdTQRUSyhBq6iEiWUEMXEckS\naugiIllCDT0NzGyNme0xs0/MbLOZPWJmHaLPPWJm5dHnYm/v1/r+DtHHX9zPzz4zXX8WyX611uuW\n2Ho1szfMbG/08WIze8bMetX4vlvNrKLWWt5R43k3s9Lo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7/7HdfTOw3swGRh86A1iW7jqi1gEjzaxd9O/qDII/sfYc\nkaHkEOLh5GFZ22FZ19FatLbja/LaDvoIfTRwKZGjhveib+cFXFMY/AiYZmaLgaHAb4IoInokNQtY\nBCwhsl7SFpU2syeBt4GBZrbBzCYAdwJnmdkqIkdZd6arngbS2q6b1japW9uK/ouIZImgj9BFRCRJ\n1NBFRLKEGrqISJZQQxcRyRJq6CIiWUINXUQkS6ihi4hkif8P3YM6KtxOY8YAAAAASUVORK5CYII=\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
}