{"id":1592,"date":"2019-01-03T21:34:15","date_gmt":"2019-01-03T21:34:15","guid":{"rendered":"http:\/\/demensdeum.com\/blog\/?p=1592"},"modified":"2024-12-16T22:32:40","modified_gmt":"2024-12-16T19:32:40","slug":"prophet","status":"publish","type":"post","link":"https:\/\/demensdeum.com\/blog\/hi\/2019\/01\/03\/prophet\/","title":{"rendered":"Float like Michelle"},"content":{"rendered":"<p>[<a rel=\"noreferrer noopener\" aria-label=\" (opens in a new tab)\" href=\"https:\/\/translate.google.ru\/translate?sl=ru&amp;tl=en&amp;u=https%3A%2F%2Fdemensdeum.com%2Fblog%2F2019%2F01%2F03%2Fprophet%2F\" target=\"_blank\">Feel the power of Artificial Intelligence<\/a>]<br \/>In this article, I will tell you how to <strong>predict the future<\/strong>.<\/p>\n<figure class=\"wp-block-image\"><img loading=\"lazy\" decoding=\"async\" width=\"470\" height=\"427\" src=\"https:\/\/demensdeum.com\/blog\/wp-content\/uploads\/2019\/03\/kim.jpg\" alt=\"\" class=\"wp-image-1640\" srcset=\"https:\/\/demensdeum.com\/blog\/wp-content\/uploads\/2019\/03\/kim.jpg 470w, https:\/\/demensdeum.com\/blog\/wp-content\/uploads\/2019\/03\/kim-300x273.jpg 300w\" sizes=\"auto, (max-width: 470px) 100vw, 470px\" \/><\/figure>\n<p>In statistics, there is a class of problems &#8211; time series analysis. Given a date and a value of a variable, you can predict the value of this variable in the future.<br \/>At first, I wanted to implement a solution to this problem on <a rel=\"noreferrer noopener\" aria-label=\"TensorFlow (opens in a new tab)\" href=\"https:\/\/www.tensorflow.org\/\" target=\"_blank\">TensorFlow<\/a>, but I found the library <a rel=\"noreferrer noopener\" aria-label=\"Prophet (opens in a new tab)\" href=\"https:\/\/github.com\/facebook\/prophet\" target=\"_blank\">Prophet<\/a> from <a rel=\"noreferrer noopener\" aria-label=\"Facebook (opens in a new tab)\" href=\"https:\/\/i.redd.it\/vrkjvgso70101.jpg\" target=\"_blank\">Facebook<\/a>.<br \/><a rel=\"noreferrer noopener\" aria-label=\"Prophet (opens in a new tab)\" href=\"https:\/\/github.com\/facebook\/prophet\" target=\"_blank\">Prophet<\/a> allows you to make a forecast based on data (csv) containing date (ds) and variable (y) columns. You can find out how to work with it in the documentation on the official website in the section <a rel=\"noreferrer noopener\" aria-label=\"Quick Start (opens in a new tab)\" href=\"https:\/\/facebook.github.io\/prophet\/docs\/quick_start.html\" target=\"_blank\">Quick Start<\/a><br \/>As a dataset, I used the csv download from the site <a rel=\"noreferrer noopener\" href=\"https:\/\/www.investing.com\" target=\"_blank\">https:\/\/www.investing.com<\/a>, during the implementation I used <a rel=\"noreferrer noopener\" aria-label=\"R language (opens in a new tab)\" href=\"https:\/\/www.r-project.org\/\" target=\"_blank\">R language<\/a> and <a rel=\"noreferrer noopener\" aria-label=\"Prophet API (opens in a new tab)\" href=\"http:\/\/facebook.github.io\/prophet\/docs\/quick_start.html#r-api\" target=\"_blank\">Prophet API<\/a> for it. I really liked R, because its syntax simplifies working with large arrays of data, allows you to write simpler, make fewer mistakes than when working with regular languages \u200b\u200b(Python), since you would have to work with lambda expressions, and in R everything is lambda expressions.<br \/>In order not to prepare the data for processing, I used the <a rel=\"noreferrer noopener\" aria-label=\"anytime (opens in a new tab)\" href=\"http:\/\/dirk.eddelbuettel.com\/code\/anytime.html\" target=\"_blank\">anytime<\/a> package, which can convert strings to dates, without preliminary processing. Converting currency strings to numbers is done using the <a rel=\"noreferrer noopener\" href=\"https:\/\/cran.r-project.org\/web\/packages\/readr\/index.html\" target=\"_blank\">readr package.<\/a><\/p>\n<p>As a result, I received a forecast that Bitcoin will cost $8,400 by the end of 2019, and the dollar exchange rate will be 61 rubles. Should I believe these forecasts? Personally, I think that I shouldn&#8217;t, because <a rel=\"noreferrer noopener\" aria-label=\"you can't use mathematical methods without understanding their essence. (opens in a new tab)\" href=\"https:\/\/www.anekdot.ru\/id\/610726\/\" target=\"_blank\">you can&#8217;t use mathematical methods without understanding their essence.<\/a><\/p>\n<h3 class=\"wp-block-heading\">Sources<\/h3>\n<p><a rel=\"noreferrer noopener\" aria-label=\" (opens in a new tab)\" href=\"https:\/\/facebook.github.io\/prophet\/\" target=\"_blank\">https:\/\/ facebook.github.io\/prophet<\/a><br \/><a rel=\"noreferrer noopener\" aria-label=\"https:\/\/habr.com\/company\/ods\/blog\/323730\/ (opens in a new tab)\" href=\"https:\/\/habr.com\/company\/ods\/blog\/323730\/\" target=\"_blank\">https:\/\/habr.com\/company\/ods\/blog\/323730\/ <\/a><br \/><a rel=\"noreferrer noopener\" aria-label=\"https:\/\/www.r-project.org\/ (opens in a new tab)\" href=\"https:\/\/www.r-project.org\/\" target=\"_blank\">https:\/\/www.r-project.org\/<\/a><\/p>\n<h3 class=\"wp-block-heading\">Source code<\/h3>\n<p><a href=\"https:\/\/gitlab.com\/demensdeum\/MachineLearning\/tree\/master\/4prophet\" target=\"_blank\" rel=\"noreferrer noopener\" aria-label=\"https:\/\/gitlab.com\/ demensdeum\/MachineLearning\/tree\/master\/4prophet (opens in a new tab)\">https:\/\/gitlab.com\/demensdeum\/MachineLearning\/tree\/master\/4prophet<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>[Feel the power of Artificial Intelligence]In this article, I will tell you how to predict the future. In statistics, there is a class of problems &#8211; time series analysis. Given a date and a value of a variable, you can predict the value of this variable in the future.At first, I wanted to implement a<a class=\"more-link\" href=\"https:\/\/demensdeum.com\/blog\/hi\/2019\/01\/03\/prophet\/\">Continue reading <span class=\"screen-reader-text\">&#8220;Float like Michelle&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[61,52],"tags":[],"class_list":["post-1592","post","type-post","status-publish","format-standard","hentry","category-techie","category-tutorials","entry"],"translation":{"provider":"WPGlobus","version":"3.0.2","language":"hi","enabled_languages":["en","ru","zh","de","fr","ja","pt","hi"],"languages":{"en":{"title":true,"content":true,"excerpt":false},"ru":{"title":true,"content":true,"excerpt":false},"zh":{"title":true,"content":true,"excerpt":false},"de":{"title":true,"content":true,"excerpt":false},"fr":{"title":true,"content":true,"excerpt":false},"ja":{"title":true,"content":true,"excerpt":false},"pt":{"title":true,"content":true,"excerpt":false},"hi":{"title":false,"content":false,"excerpt":false}}},"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/demensdeum.com\/blog\/hi\/wp-json\/wp\/v2\/posts\/1592","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/demensdeum.com\/blog\/hi\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/demensdeum.com\/blog\/hi\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/demensdeum.com\/blog\/hi\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/demensdeum.com\/blog\/hi\/wp-json\/wp\/v2\/comments?post=1592"}],"version-history":[{"count":15,"href":"https:\/\/demensdeum.com\/blog\/hi\/wp-json\/wp\/v2\/posts\/1592\/revisions"}],"predecessor-version":[{"id":3967,"href":"https:\/\/demensdeum.com\/blog\/hi\/wp-json\/wp\/v2\/posts\/1592\/revisions\/3967"}],"wp:attachment":[{"href":"https:\/\/demensdeum.com\/blog\/hi\/wp-json\/wp\/v2\/media?parent=1592"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/demensdeum.com\/blog\/hi\/wp-json\/wp\/v2\/categories?post=1592"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/demensdeum.com\/blog\/hi\/wp-json\/wp\/v2\/tags?post=1592"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}