{"id":674,"date":"2022-02-05T16:22:16","date_gmt":"2022-02-05T07:22:16","guid":{"rendered":"http:\/\/epro.fun\/epro\/?page_id=674"},"modified":"2025-01-17T19:48:15","modified_gmt":"2025-01-17T10:48:15","slug":"py1010-%e3%82%a2%e3%82%a4%e3%82%b9%e3%81%a8%e6%b0%97%e6%b8%a9%e3%81%ae%e9%96%a2%e4%bf%82","status":"publish","type":"page","link":"http:\/\/epro.fun\/epro\/python\/py1010-%e3%82%a2%e3%82%a4%e3%82%b9%e3%81%a8%e6%b0%97%e6%b8%a9%e3%81%ae%e9%96%a2%e4%bf%82\/","title":{"rendered":"py1010 &#8211; \u30a2\u30a4\u30b9\u3068\u6c17\u6e29\u306e\u95a2\u4fc2\uff08\u5358\u56de\u5e30\u5206\u6790\uff09"},"content":{"rendered":"\n<p>\u3014\u6982\u8981\u3015\u30a2\u30a4\u30b9\u3068\u6c17\u6e29\u306e\u95a2\u4fc2\u306e\u8868\u793a\u3092\u884c\u3046\u30d7\u30ed\u30b0\u30e9\u30e0\u3067\u3059\u3002<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>\u53c2\u8003\u6587\u732e\n<ul class=\"wp-block-list\">\n<li>\u4e00\u822c\u793e\u56e3\u6cd5\u4eba \u65e5\u672c\u30a2\u30a4\u30b9\u30af\u30ea\u30fc\u30e0\u5354\u4f1a\u3001<a href=\"https:\/\/www.icecream.or.jp\/biz\/data\/expenditures.html\">\u30a2\u30a4\u30b9\u30af\u30ea\u30fc\u30e0BIZ<\/a><\/li>\n\n\n\n<li>\u6c17\u8c61\u5e81\u3001<a href=\"http:\/\/www.data.jma.go.jp\/gmd\/risk\/obsdl\/index.php\">\u904e\u53bb\u306e\u6c17\u8c61\u30c7\u30fc\u30bf\u30fb\u30c0\u30a6\u30f3\u30ed\u30fc\u30c9<\/a><\/li>\n<\/ul>\n<\/li>\n<\/ul>\n\n\n\n<ul class=\"wp-block-list\">\n<li>\u4f7f\u7528\u30c7\u30fc\u30bf\n<ul class=\"wp-block-list\">\n<li><a href=\"https:\/\/www.icecream.or.jp\/iceworld\/data\/expenditures.html#:~:text=1.%E3%82%A2%E3%82%A4%E3%82%B9%E3%82%AF%E3%83%AA%E3%83%BC%E3%83%A0%E5%B9%B4%E9%96%93%E6%94%AF%E5%87%BA%E9%87%91%E9%A1%8D&amp;text=%E7%B7%8F%E5%8B%99%E7%9C%81%E7%B5%B1%E8%A8%88%E5%B1%80%E3%81%AE,%E4%B8%87%E5%86%86%E3%82%92%E8%B6%85%E3%81%88%E3%81%9F%E3%80%82\">2020\u5e74\u306e\u4e00\u4e16\u5e2f\u306e\u30a2\u30a4\u30b9\u30af\u30ea\u30fc\u30e0\u6708\u5225\u652f\u51fa\u91d1\u984d<\/a><\/li>\n\n\n\n<li><a href=\"https:\/\/www.data.jma.go.jp\/obd\/stats\/etrn\/view\/monthly_s1.php?prec_no=44&amp;block_no=47662&amp;year=2020&amp;month=&amp;day=&amp;view=a2\">2020\u5e74\u306e\u6771\u4eac\u306e\u6708\u5225\u6700\u9ad8\u6c17\u6e29<\/a><\/li>\n<\/ul>\n<\/li>\n<\/ul>\n\n\n\n<p>\u3014\u53c2\u8003\u3015<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><a href=\"https:\/\/www.soumu.go.jp\/toukei_toukatsu\/info\/guide\/stkankyo.htm\">\u7d71\u8a08\u306e\u8abf\u67fb\u74b0\u5883\u306e\u6574\u5099<\/a>\n<ul class=\"wp-block-list\">\n<li><a href=\"https:\/\/www.soumu.go.jp\/main_content\/000608022.pdf\">\u7b2c7\u90e8\u3000\u7d71\u8a08\u7684\u601d\u8003\u306b\u3088\u3063\u3066\u5927\u5b66\u5165\u8a66\u30fb\u7d71\u8a08\u691c\u5b9a\u3092\u4e57\u308a\u5207\u308d\u3046\uff01<\/a><\/li>\n<\/ul>\n<\/li>\n\n\n\n<li><a href=\"https:\/\/www.stat.go.jp\/teacher\/index.html\">\u7d71\u8a08\u5b66\u7fd2\u306e\u6307\u5c0e\u306e\u305f\u3081\u306b<\/a>&nbsp;\uff1e \u88dc\u52a9\u6559\u6750 \uff1e \u7dcf\u5408\u5b66\u7fd2\u306e\u305f\u3081\u306e\u88dc\u52a9\u6559\u6750 \uff1e<a href=\"https:\/\/www.stat.go.jp\/teacher\/comp-learn-03.html\">\u300c\u9ad8\u6821\u751f\u306e\u305f\u3081\u306e\u7d71\u8a08\u5b66\u7fd2\u6559\u6750\u300d<\/a><\/li>\n<\/ul>\n\n\n\n<p>\u3014\u6280\u6cd5\u3015\u6563\u5e03\u56f3\u3001\u5358\u56de\u5e30\u5206\u6790\uff08sklearn \uff09\u3001\u30ed\u30fc\u30ab\u30eb\u30d5\u30a1\u30a4\u30eb\uff08CSV\uff09\u306e\u8aad\u307f\u8fbc\u307f\u3001pandas<\/p>\n\n\n\n<p>\u30c7\u30fc\u30bf\u306e\u4f8b\uff1a<a href=\"http:\/\/epro.fun\/epro\/wp-content\/uploads\/2022\/02\/ice_temperature.csv\">ice_temperature.csv<\/a><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>x,y\n18.6,510\n18.2,482\n24.6,610\n24.2,689\n28.7,1040\n32.6,1123\n32.5,1155\n37.3,1658\n35.1,1025\n26.7,649\n24.9,573\n17.2,599\n<\/code><\/pre>\n\n\n\n<p>\u3010Excel\u3067\u8a66\u3059\u3011<\/p>\n\n\n\n<p>\u3000\u306f\u3058\u3081\u306bExcel\u3067\u8a66\u3057\u3066\u307f\u307e\u3059\u3002<\/p>\n\n\n\n<p>(1) \u300c<a href=\"http:\/\/epro.fun\/epro\/wp-content\/uploads\/2022\/02\/ice_temperature.csv\">ice_temperature.csv<\/a>\u300d\u3092Excel\u5f62\u5f0f\u3067\u4fdd\u5b58<\/p>\n\n\n\n<figure class=\"wp-block-image size-full is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"876\" height=\"742\" src=\"http:\/\/epro.fun\/epro\/wp-content\/uploads\/2022\/02\/image-19.png\" alt=\"\" class=\"wp-image-906\" style=\"width:549px;height:465px\" srcset=\"http:\/\/epro.fun\/epro\/wp-content\/uploads\/2022\/02\/image-19.png 876w, http:\/\/epro.fun\/epro\/wp-content\/uploads\/2022\/02\/image-19-300x254.png 300w, http:\/\/epro.fun\/epro\/wp-content\/uploads\/2022\/02\/image-19-768x651.png 768w\" sizes=\"auto, (max-width: 876px) 100vw, 876px\" \/><\/figure>\n\n\n\n<p>(2) \u30e1\u30cb\u30e5\u30fc\u304b\u3089[\u633f\u5165]\u2192[\u6563\u5e03\u56f3]\u3092\u9078\u629e\u3057\u3066\u3001\u30b0\u30e9\u30d5\u3092\u4f5c\u6210\u3059\u308b\u3002<\/p>\n\n\n\n<figure class=\"wp-block-image size-full is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"876\" height=\"742\" src=\"http:\/\/epro.fun\/epro\/wp-content\/uploads\/2022\/02\/image-20.png\" alt=\"\" class=\"wp-image-907\" style=\"width:551px;height:466px\" srcset=\"http:\/\/epro.fun\/epro\/wp-content\/uploads\/2022\/02\/image-20.png 876w, http:\/\/epro.fun\/epro\/wp-content\/uploads\/2022\/02\/image-20-300x254.png 300w, http:\/\/epro.fun\/epro\/wp-content\/uploads\/2022\/02\/image-20-768x651.png 768w\" sizes=\"auto, (max-width: 876px) 100vw, 876px\" \/><\/figure>\n\n\n\n<p>(3) \u30e1\u30cb\u30e5\u30fc\u304b\u3089[\u30b0\u30e9\u30d5\u306e\u30c7\u30b6\u30a4\u30f3]\u2192[\u30b0\u30e9\u30d5\u8981\u7d20\u3092\u8ffd\u52a0]\u2192[\u8fd1\u4f3c\u66f2\u7dda]\u2192[\u7dda\u5f62]\u3092\u9078\u629e\u3057\u3066\u3001\u56de\u5e30\u76f4\u7dda\u3092\u8868\u793a\u3059\u308b\u3002<\/p>\n\n\n\n<p>(4) \u30e1\u30cb\u30e5\u30fc\u304b\u3089[\u30b0\u30e9\u30d5\u306e\u30c7\u30b6\u30a4\u30f3]\u2192[\u30b0\u30e9\u30d5\u8981\u7d20\u3092\u8ffd\u52a0]\u2192[\u8fd1\u4f3c\u66f2\u7dda]\u2192[\u305d\u306e\u4ed6\u306e\u8fd1\u4f3c\u66f2\u7dda\u30aa\u30d7\u30b7\u30e7\u30f3]\u2192[\u30b0\u30e9\u30d5\u306b\u6570\u5f0f\u3092\u8868\u793a\u3059\u308b]\u3092\u9078\u629e\u3057\u3066\u3001\u56de\u5e30\u5f0f\u3092\u8868\u793a\u3059\u308b\u3002<\/p>\n\n\n\n<figure class=\"wp-block-image size-full is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"876\" height=\"759\" src=\"http:\/\/epro.fun\/epro\/wp-content\/uploads\/2022\/02\/image-21.png\" alt=\"\" class=\"wp-image-908\" style=\"width:541px;height:468px\" srcset=\"http:\/\/epro.fun\/epro\/wp-content\/uploads\/2022\/02\/image-21.png 876w, http:\/\/epro.fun\/epro\/wp-content\/uploads\/2022\/02\/image-21-300x260.png 300w, http:\/\/epro.fun\/epro\/wp-content\/uploads\/2022\/02\/image-21-768x665.png 768w\" sizes=\"auto, (max-width: 876px) 100vw, 876px\" \/><\/figure>\n\n\n\n<p>(5) \u56de\u5e30\u5f0f\u304c\u300cy = 47.183x &#8211; 417.81\u300d\u3068\u8868\u793a\u3055\u308c\u307e\u3057\u305f\u3002<\/p>\n\n\n\n<p>\u3010Python\u3011<\/p>\n\n\n\n<p>\u3000\u6b21\u306bPython\u3067\u540c\u69d8\u306e\u51e6\u7406\u3092\u884c\u3044\u307e\u3059\u3002<\/p>\n\n\n\n<p>\u3014\u5b9f\u884c\u4f8b\u3015<\/p>\n\n\n\n<figure class=\"wp-block-image size-full is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"640\" height=\"475\" src=\"http:\/\/epro.fun\/epro\/wp-content\/uploads\/2022\/02\/Figure_1.png\" alt=\"\" class=\"wp-image-682\" style=\"width:457px;height:339px\" srcset=\"http:\/\/epro.fun\/epro\/wp-content\/uploads\/2022\/02\/Figure_1.png 640w, http:\/\/epro.fun\/epro\/wp-content\/uploads\/2022\/02\/Figure_1-300x223.png 300w\" sizes=\"auto, (max-width: 640px) 100vw, 640px\" \/><\/figure>\n\n\n\n<p>\u3000\u30b3\u30de\u30f3\u30c9\u30e9\u30a4\u30f3\u306b\u3001\u6b21\u306e\u3088\u3046\u306b\u56de\u5e30\u5909\u6570\u3068\u5207\u7247\u304c\u8868\u793a\u3055\u308c\u307e\u3059\u3002Excel\u306e\u7d50\u679c\u3068\u4e00\u81f4\u3057\u3066\u3044\u308b\u3053\u3068\u304c\u78ba\u8a8d\u3067\u304d\u307e\u3059\u3002<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>&#91;&#91;47.18265165]]\n&#91;-417.81317647]<\/code><\/pre>\n\n\n\n<p>\u3014\u30d7\u30ed\u30b0\u30e9\u30e0\u3015<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code># \u30a2\u30a4\u30b9\u3068\u6c17\u6e29\u306e\u95a2\u4fc2\uff08\u5358\u56de\u5e30\u5206\u6790\uff09\n\nimport pandas as pd\nimport matplotlib.pyplot as plt\nfrom sklearn import linear_model\n\ndf = pd.read_csv('ice_temperature.csv')\n\nx = df&#91;&#91;'x']]\ny = df&#91;&#91;'y']]\n\nmodel = linear_model.LinearRegression()\nmodel.fit(x, y)\nprint(model.coef_)\nprint(model.intercept_)\n\n# \u30b0\u30e9\u30d5\u8868\u793a\nplt.plot(x,y,'o')\nplt.plot(x,model.predict(x))\nplt.show()<\/code><\/pre>\n\n\n\n<hr class=\"wp-block-separator has-css-opacity is-style-wide\"\/>\n\n\n\n<p>Copyright (C) 2022&nbsp;<a href=\"http:\/\/epro.fun\/epro\/\">Easy Programming<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u3014\u6982\u8981\u3015\u30a2\u30a4\u30b9\u3068\u6c17\u6e29\u306e\u95a2\u4fc2\u306e\u8868\u793a\u3092\u884c\u3046\u30d7 &hellip; <\/p>\n","protected":false},"author":1,"featured_media":0,"parent":38,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-674","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"http:\/\/epro.fun\/epro\/wp-json\/wp\/v2\/pages\/674","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/epro.fun\/epro\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"http:\/\/epro.fun\/epro\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"http:\/\/epro.fun\/epro\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/epro.fun\/epro\/wp-json\/wp\/v2\/comments?post=674"}],"version-history":[{"count":13,"href":"http:\/\/epro.fun\/epro\/wp-json\/wp\/v2\/pages\/674\/revisions"}],"predecessor-version":[{"id":5568,"href":"http:\/\/epro.fun\/epro\/wp-json\/wp\/v2\/pages\/674\/revisions\/5568"}],"up":[{"embeddable":true,"href":"http:\/\/epro.fun\/epro\/wp-json\/wp\/v2\/pages\/38"}],"wp:attachment":[{"href":"http:\/\/epro.fun\/epro\/wp-json\/wp\/v2\/media?parent=674"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}