{"id":378673,"date":"2024-06-12T09:00:32","date_gmt":"2024-06-12T09:00:32","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=378673"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=378673","title":{"rendered":"<span>\u0412\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435 \u0440\u044f\u0434\u044b \u0438 ARIMA: \u041a\u0430\u043a \u043f\u0440\u0435\u0434\u0441\u043a\u0430\u0437\u044b\u0432\u0430\u0442\u044c \u0431\u0443\u0434\u0443\u0449\u0435\u0435 \u0431\u0435\u0437 \u0445\u0440\u0443\u0441\u0442\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u0448\u0430\u0440\u0430<\/span>"},"content":{"rendered":"<div><!--[--><!--]--><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<p><strong>\u0427\u0430\u0441\u0442\u044c 1<\/strong><\/p>\n<p>\u0427\u0442\u043e \u0442\u0430\u043a\u043e\u0435 \u0432\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 \u0440\u044f\u0434, \u043c\u043e\u0434\u0435\u043b\u044c ARIMA \u0438 \u043a\u0430\u043a \u043a \u043d\u0435\u0439 \u043f\u043e\u0434\u0431\u0438\u0440\u0430\u0442\u044c \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b.<\/p>\n<blockquote>\n<p>\u0412\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 \u0440\u044f\u0434 \u2014 \u0441\u043e\u0431\u0440\u0430\u043d\u043d\u044b\u0439 \u0432 \u0440\u0430\u0437\u043d\u044b\u0435 \u043c\u043e\u043c\u0435\u043d\u0442\u044b \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u0441\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u043c\u0430\u0442\u0435\u0440\u0438\u0430\u043b \u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0438 \u043a\u0430\u043a\u0438\u0445-\u043b\u0438\u0431\u043e \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432 (\u0432 \u043f\u0440\u043e\u0441\u0442\u0435\u0439\u0448\u0435\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u043e\u0434\u043d\u043e\u0433\u043e) \u0438\u0441\u0441\u043b\u0435\u0434\u0443\u0435\u043c\u043e\u0433\u043e \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0430. (\u0441) \u0412\u0438\u043a\u0438\u043f\u0435\u0434\u0438\u044f<\/p>\n<\/blockquote>\n<p>\u041f\u0440\u043e\u0441\u0442\u044b\u043c \u0441\u043b\u043e\u0432\u0430\u043c\u0438, \u0432\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 \u0440\u044f\u0434 \u2014 \u044d\u0442\u043e \u043f\u0440\u043e\u0441\u0442\u043e \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u0441\u043e\u0431\u044b\u0442\u0438\u0439, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043a\u0430\u043a-\u0442\u043e \u0437\u0430\u0432\u0438\u0441\u0438\u0442 \u043e\u0442 \u0432\u0440\u0435\u043c\u0435\u043d\u0438. \u0414\u043b\u044f \u043d\u0430\u0447\u0430\u043b\u0430 \u0431\u0443\u0434\u0435\u043c \u0441\u0447\u0438\u0442\u0430\u0442\u044c, \u0447\u0442\u043e \u0440\u044f\u0434 \u0441\u0430\u043c\u044b\u0439 \u043f\u0440\u043e\u0441\u0442\u0435\u0446\u043a\u0438\u0439 \u0438 \u043d\u0430\u0441 \u043f\u0440\u043e\u0441\u0442\u043e \u0435\u0441\u0442\u044c \u0441\u043a\u0430\u0447\u0443\u0449\u0438\u0435 \u0442\u0443\u0434\u0430-\u0441\u044e\u0434\u0430 \u0442\u043e\u0447\u043a\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u044b \u043f\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 \u0448\u043a\u0430\u043b\u0435.<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/38c\/622\/36b\/38c62236bb834d1a6eb8fec8ec1dd211.png\" alt=\"\u0412\u0438\u043a\u0438\u043f\u0435\u0434\u0438\u044f \u043f\u0440\u0435\u0434\u043b\u0430\u0433\u0430\u0435\u0442 \u0442\u0430\u043a\u0443\u044e \u0441\u0442\u0440\u0430\u0448\u043d\u0443\u044e \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0443\" title=\"\u0412\u0438\u043a\u0438\u043f\u0435\u0434\u0438\u044f \u043f\u0440\u0435\u0434\u043b\u0430\u0433\u0430\u0435\u0442 \u0442\u0430\u043a\u0443\u044e \u0441\u0442\u0440\u0430\u0448\u043d\u0443\u044e \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0443\" width=\"601\" height=\"447\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/38c\/622\/36b\/38c62236bb834d1a6eb8fec8ec1dd211.png\"\/><\/p>\n<div><figcaption>\u0412\u0438\u043a\u0438\u043f\u0435\u0434\u0438\u044f \u043f\u0440\u0435\u0434\u043b\u0430\u0433\u0430\u0435\u0442 \u0442\u0430\u043a\u0443\u044e \u0441\u0442\u0440\u0430\u0448\u043d\u0443\u044e \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0443<\/figcaption><\/div>\n<\/figure>\n<p>\u041d\u043e \u0434\u0430\u0436\u0435 \u0442\u0430\u043a\u0438\u0435 \u043f\u0440\u043e\u0441\u0442\u044b\u0435 \u0440\u044f\u0434\u044b \u043c\u043e\u0436\u043d\u043e \u0440\u0430\u0437\u0434\u0435\u043b\u0438\u0442\u044c \u043d\u0430 \u0434\u0432\u0435 \u0431\u043e\u043b\u044c\u0448\u0438\u0445 \u043a\u0430\u0442\u0435\u0433\u043e\u0440\u0438\u0438: \u0441\u0442\u0430\u0446\u0438\u043e\u043d\u0430\u0440\u043d\u044b\u0435 \u0438 \u043d\u0435\u0441\u0442\u0430\u0446\u0438\u043e\u043d\u0430\u0440\u043d\u044b\u0435. \u0421\u0442\u0430\u0446\u0438\u043e\u043d\u0430\u0440\u043d\u044b\u0439 \u0440\u044f\u0434 \u0432 \u043f\u0435\u0440\u0432\u043e\u043c \u043f\u0440\u0438\u0431\u043b\u0438\u0436\u0435\u043d\u0438\u0438 \u043c\u043e\u0436\u043d\u043e \u0441\u0447\u0438\u0442\u0430\u0442\u044c \u043f\u0440\u043e\u0441\u0442\u043e \u0447\u0435\u043c-\u0442\u043e \u043f\u043e\u0445\u043e\u0436\u0438\u043c \u043d\u0430 \u0441\u0438\u043d\u0443\u0441, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0442\u0430\u043a:<\/p>\n<figure class=\"\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/cee\/007\/2f9\/cee0072f9f42f0bb658edd5ca34c14dc.png\" alt=\"\u0421\u0442\u0430\u0446\u0438\u043e\u043d\u0430\u0440\u043d\u044b\u0439 \u0432\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 \u0440\u044f\u0434 \u043d\u0430 \u043f\u0440\u0438\u043c\u0435\u0440\u0435 \u0441\u0438\u043d\u0443\u0441\u0430\" title=\"\u0421\u0442\u0430\u0446\u0438\u043e\u043d\u0430\u0440\u043d\u044b\u0439 \u0432\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 \u0440\u044f\u0434 \u043d\u0430 \u043f\u0440\u0438\u043c\u0435\u0440\u0435 \u0441\u0438\u043d\u0443\u0441\u0430\" width=\"466\" height=\"169\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/cee\/007\/2f9\/cee0072f9f42f0bb658edd5ca34c14dc.png\"\/><\/p>\n<div><figcaption>\u0421\u0442\u0430\u0446\u0438\u043e\u043d\u0430\u0440\u043d\u044b\u0439 \u0432\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 \u0440\u044f\u0434 \u043d\u0430 \u043f\u0440\u0438\u043c\u0435\u0440\u0435 \u0441\u0438\u043d\u0443\u0441\u0430<\/figcaption><\/div>\n<\/figure>\n<p>\u041f\u043e\u043d\u044f\u0442\u043d\u043e\u0435 \u0434\u0435\u043b\u043e, \u0447\u0442\u043e \u0441\u0438\u043d\u0443\u0441 \u0432\u0440\u044f\u0434 \u043b\u0438 \u0432\u0441\u0442\u0440\u0435\u0442\u0438\u0442\u044c\u0441\u044f \u0432 \u0440\u0435\u0430\u043b\u044c\u043d\u044b\u0445 \u0432\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445 \u0440\u044f\u0434\u0430\u0445. \u041a \u0442\u043e\u043c\u0443 \u0436\u0435 \u043f\u043e\u043c\u0438\u043c\u043e \u0441\u0442\u0430\u0446\u0438\u043e\u043d\u0430\u0440\u043d\u043e\u0441\u0442\u0438 \u0435\u0441\u0442\u044c \u0442\u0440\u0435\u043d\u0434 \u2014 \u0442\u043e \u0435\u0441\u0442\u044c \u0440\u043e\u0441\u0442 \u0440\u044f\u0434\u0430 \u0441 \u0442\u0435\u0447\u0435\u043d\u0438\u0435\u043c \u0432\u0440\u0435\u043c\u0435\u043d\u0438, \u0446\u0438\u043a\u043b\u044b, \u043a\u043e\u0433\u0434\u0430 \u043c\u044b \u0432\u0438\u0434\u0438\u043c \u043f\u043e\u0432\u0442\u043e\u0440\u044f\u044e\u0449\u0443\u044e\u0441\u044f \u043a\u0430\u0440\u0442\u0438\u043d\u0443 \u043f\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u0438. \u0418, \u043d\u0430\u043a\u043e\u043d\u0435\u0446, \u0441\u0435\u0437\u043e\u043d\u043d\u043e\u0441\u0442\u044c \u2014 \u0446\u0438\u043a\u043b\u044b, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u043e\u0432\u0442\u043e\u0440\u044f\u044e\u0442\u0441\u044f, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043a\u0430\u0436\u0434\u044b\u0435 12 \u0447\u0430\u0441\u043e\u0432\/\u043d\u0435\u0434\u0435\u043b\u044e\/\u043c\u0435\u0441\u044f\u0446\/\u0433\u043e\u0434 \u0438 \u0442.\u0434.<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/cf7\/30f\/a69\/cf730fa697181a47a2561be370447b5d.png\" alt=\"\" title=\"\" width=\"2108\" height=\"1702\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/cf7\/30f\/a69\/cf730fa697181a47a2561be370447b5d.png\"\/><\/p>\n<div><figcaption>\u041a\u043e\u0440\u043e\u0442\u043a\u043e \u043e \u0444\u0438\u0447\u0430\u0445 \u0432\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445 \u0440\u044f\u0434\u043e\u0432<\/figcaption><\/div>\n<\/figure>\n<p>\u041f\u0440\u043e\u0431\u043b\u0435\u043c \u0442\u0443\u0442 \u043c\u043e\u0436\u0435\u0442 \u0432\u043e\u0437\u043d\u0438\u043a\u043d\u0443\u0442\u044c \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u043e, \u043d\u043e \u044f \u0445\u043e\u0447\u0443 \u043d\u0430\u0447\u0430\u0442\u044c \u0441 \u0433\u043b\u0430\u0432\u043d\u043e\u0439 \u2014 \u0431\u043e\u043b\u044c\u0448\u0438\u043d\u0441\u0442\u0432\u043e \u043c\u043e\u0434\u0435\u043b\u0435\u0439 \u0432 Python \u0440\u0430\u0441\u0441\u0447\u0438\u0442\u0430\u043d\u044b \u043d\u0430 \u0441\u0442\u0430\u0446\u0438\u043e\u043d\u0430\u0440\u043d\u044b\u0435 \u0432\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435 \u0440\u044f\u0434\u044b. \u041f\u043e\u043a\u0430 \u0435\u0434\u0438\u043d\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u0435 \u0438\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435, \u0441 \u043a\u043e\u0442\u043e\u0440\u044b\u043c \u044f \u0441\u0442\u043e\u043b\u043a\u043d\u0443\u043b\u0430\u0441\u044c \u2014 \u044d\u0442\u043e \u044d\u043a\u0441\u043f\u043e\u043d\u0435\u043d\u0446\u0438\u0430\u043b\u044c\u043d\u043e\u0435 \u0441\u0433\u043b\u0430\u0436\u0438\u0432\u0430\u043d\u0438\u0435. <\/p>\n<p>\u041d\u043e, \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e, \u044f \u043f\u0440\u043e\u0441\u0442\u043e \u043d\u0435 \u043d\u0430\u0448\u043b\u0430 \u0441\u043f\u043e\u0441\u043e\u0431 \u0432\u043f\u0438\u0445\u043d\u0443\u0442\u044c \u0442\u0443\u0434\u0430 \u0441\u0442\u0430\u0446\u0438\u043e\u043d\u0430\u0440\u043d\u044b\u0439 \u0440\u044f\u0434. \u0412\u043f\u0440\u043e\u0447\u0435\u043c, \u0434\u0430\u0432\u0430\u0439\u0442\u0435 \u043f\u043e \u043f\u043e\u0440\u044f\u0434\u043a\u0443.<\/p>\n<h2>1. \u041f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u043d\u0430 \u0441\u0442\u0430\u0446\u0438\u043e\u043d\u0430\u0440\u043d\u043e\u0441\u0442\u044c<\/h2>\n<pre><code class=\"python\">from statsmodels.tsa.stattools import adfuller  def test_stationarity(series, title=''):     print(f\"Results of ADF Test on {title}:\")     result = adfuller(series, autolag='AIC')     print(f\"ADF Statistic: {result[0]}\")     print(f\"p-value: {result[1]}\")     if result[1] > 0.05:         print(\"Non-stationary\")     else:         print(\"stationary\")     for key, value in result[4].items():         print(f\"Critical Value ({key}): {value}\")     print(\"\\n\")  test_stationarity(df['count_1'], 'Counts')<\/code><\/pre>\n<p>\u042f \u044e\u0437\u0430\u043b\u0430 \u043e\u0431\u044b\u0447\u043d\u044b\u0439 \u0442\u0435\u0441\u0442 \u0414\u0438\u043a\u0438-\u0424\u0443\u043b\u043b\u0435\u0440\u0430, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0437\u0430 \u043c\u0435\u043d\u044f \u043a\u0440\u0430\u0441\u0438\u0432\u043e \u043e\u0444\u043e\u0440\u043c\u0438\u043b chatGPT \u0438 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u0447\u043d\u0430\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u044f. \u0422\u0443\u0442, \u043a\u0430\u043a \u0438 \u0432\u0435\u0437\u0434\u0435 \u0432 \u0441\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u043a\u0435, \u0432\u0430\u0436\u043d\u043e \u0432\u044b\u0431\u0440\u0430\u0442\u044c \u0437\u0430\u0440\u0430\u043d\u0435\u0435 p-value. <br \/>\u041f\u0440\u043e <a href=\"https:\/\/www.ncbi.nlm.nih.gov\/pmc\/articles\/PMC4111019\/#:~:text=The%20P%20value%20is%20defined,groups%20is%20due%20to%20chance.\" rel=\"noopener noreferrer nofollow\">p-value<\/a> \u0438 \u0441\u0430\u043c <a href=\"https:\/\/en.wikipedia.org\/wiki\/Dickey%E2%80%93Fuller_test\" rel=\"noopener noreferrer nofollow\">\u0442\u0435\u0441\u0442<\/a> \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u0447\u0438\u0442\u0430\u0442\u044c \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u043e, \u0430 \u044f \u0445\u043e\u0447\u0443 \u0441\u043e\u0441\u0440\u0435\u0434\u043e\u0442\u043e\u0447\u0438\u0442\u044c\u0441\u044f \u043d\u0430 \u0442\u0440\u0451\u0445 \u043c\u043e\u0434\u0435\u043b\u044f\u0445, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b\u0430 \u0432 \u0440\u0430\u0431\u043e\u0442\u0435.<\/p>\n<h2>2. ARIMA model<\/h2>\n<p>\u0412 \u043b\u044e\u0431\u043e\u043c \u0440\u0443\u043a\u043e\u0432\u043e\u0434\u0441\u0442\u0432\u0435 \u043f\u043e \u043c\u043e\u0434\u0435\u043b\u044f\u043c ARIMA\/SARIMAX \u0432\u0430\u043c \u043f\u0435\u0440\u0432\u044b\u043c \u0434\u0435\u043b\u043e\u043c \u0441\u043a\u0430\u0436\u0443\u0442, \u0447\u0442\u043e \u043d\u0430\u0434\u043e \u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u043d\u0430 \u0430\u0432\u0442\u043e\u043a\u043e\u0440\u0440\u0435\u043b\u044f\u0446\u0438\u044e \u0438 \u0447\u0430\u0441\u0442\u0438\u0447\u043d\u0443\u044e \u0430\u0432\u0442\u043e\u043a\u043e\u0440\u0440\u0435\u043b\u044f\u0446\u0438\u044e, \u0447\u0442\u043e\u0431\u044b \u0445\u043e\u0442\u044c \u043a\u0430\u043a-\u0442\u043e \u0430\u0434\u0435\u043a\u0432\u0430\u0442\u043d\u043e \u0437\u0430\u0434\u0430\u0442\u044c \u043d\u0430\u0447\u0430\u043b\u044c\u043d\u044b\u0435 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b p \u0438 q. p \u0438 q \u0441\u043c\u043e\u0442\u0440\u044f\u0442\u0441\u044f \u043f\u043e \u0432\u044b\u0431\u0440\u043e\u0441\u0430\u043c: \u0432\u044b\u0431\u0438\u0440\u0430\u044e\u0442\u0441\u044f \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u043d\u0430 \u0433\u043e\u0440\u0438\u0437\u043e\u043d\u0442\u0430\u043b\u044c\u043d\u043e\u0439 \u043e\u0441\u0438, \u0443 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u0442\u043e\u0447\u043a\u0430 \u0432\u044b\u0445\u043e\u0434\u0438\u0442 \u0437\u0430 \u0433\u0440\u0430\u043d\u0438\u0446\u0443 \u0441\u0438\u043d\u0435\u0439 \u043e\u0431\u043b\u0430\u0441\u0442\u0438. \u0417\u043d\u0430\u0447\u0435\u043d\u0438\u0435 q \u0441\u043c\u043e\u0442\u0440\u044f\u0442\u0441\u044f \u043f\u043e \u0433\u0440\u0430\u0444\u0438\u043a\u0443 ACF, a p &#8212; \u043f\u043e \u0433\u0440\u0430\u0444\u0438\u043a\u0443 PACF. <br \/>\u0421\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u0438\u0445 \u043d\u0443\u0436\u043d\u043e \u043d\u0430 \u0443\u0436\u0435 \u0441\u0442\u0430\u0446\u0438\u043e\u043d\u0430\u0440\u043d\u043e\u043c \u0440\u044f\u0434\u0435. \u041d\u043e \u0435\u0441\u0442\u044c \u043d\u044e\u0430\u043d\u0441.<\/p>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/dcd\/d4c\/b08\/dcdd4cb0801692523d55f4ca2886834b.png\" alt=\"\u0418\u0434\u0435\u0430\u043b\u044c\u043d\u044b\u0435 \u0441\u0438\u0442\u0443\u0430\u0446\u0438\u0438 \u0438\u0437 \u0438\u043d\u0442\u0435\u0440\u043d\u0435\u0442\u0430\" title=\"\u0418\u0434\u0435\u0430\u043b\u044c\u043d\u044b\u0435 \u0441\u0438\u0442\u0443\u0430\u0446\u0438\u0438 \u0438\u0437 \u0438\u043d\u0442\u0435\u0440\u043d\u0435\u0442\u0430\" width=\"1178\" height=\"792\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/dcd\/d4c\/b08\/dcdd4cb0801692523d55f4ca2886834b.png\"\/><\/p>\n<div><figcaption>\u0418\u0434\u0435\u0430\u043b\u044c\u043d\u044b\u0435 \u0441\u0438\u0442\u0443\u0430\u0446\u0438\u0438 \u0438\u0437 \u0438\u043d\u0442\u0435\u0440\u043d\u0435\u0442\u0430<\/figcaption><\/div>\n<\/figure>\n<pre><code class=\"python\">#\u041e\u0442\u0440\u0438\u0441\u043e\u0432\u043a\u0430 ACF \u0438 PACF import statsmodels.api as sm  diff1 = dataset.diff() diff1.dropna(inplace=True) #delete all rows with NaN value  fig = plt.figure(figsize=(12,8)) ax1 = fig.add_subplot(211) half_size = len(diff1) \/\/ 2 fig = plot_acf(diff1, lags=half_size, ax=ax1) ax2 = fig.add_subplot(212) fig = sm.graphics.tsa.plot_pacf(diff1, lags=half_size, ax=ax2)<\/code><\/pre>\n<p>\u0412 \u043c\u043e\u0451\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u044d\u0442\u043e \u043f\u043e\u0447\u0442\u0438 \u043d\u0435 \u0441\u0440\u0430\u0431\u043e\u0442\u0430\u043b\u043e. \u041a\u043e\u043d\u0435\u0447\u043d\u043e, \u043a\u0430\u043a\u0438\u0435-\u0442\u043e \u043e\u0442\u043f\u0440\u0430\u0432\u043d\u044b\u0435 p \u0438 q \u043c\u043d\u0435 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0430 \u0432\u044b\u0434\u0430\u043b\u0430, \u043d\u043e \u0434\u043b\u044f \u0433\u0438\u043f\u0435\u0440\u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432 \u043c\u043e\u0434\u0435\u043b\u0438 \u043e\u043d\u0438 \u0441\u043e\u0432\u0441\u0435\u043c \u043d\u0435 \u0433\u043e\u0434\u0438\u043b\u0438\u0441\u044c. <\/p>\n<pre><code class=\"python\"># \u043b\u0443\u0447\u0448\u0435 \u044e\u0437\u0430\u0442\u044c \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u0447\u043d\u044b\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438, \u043d\u043e \u0435\u0441\u043b\u0438 \u0434\u0430\u0436\u0435 \u0434\u0435\u043b\u0430\u0435\u0442\u0435 \u0440\u0443\u043a\u0430\u043c\u0438  # \u0434\u0435\u043b\u0430\u0439\u0442\u0435 \u0434\u043b\u0438\u043d\u0443 \u0447\u0435\u0440\u0435\u0437 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0443\u044e, \u0430 \u043d\u0435 \u0446\u0438\u0444\u0440\u044b length = int(len(diff1) * 0.8) train_data=diff1[0:length] test_data=diff1[length:]   model = sm.tsa.arima.ARIMA(diff1, order=(p, d, q)) model_fit = model.fit()  plt.figure(figsize=(10,6)) plt.plot(diff1, label='\u0418\u0441\u0445\u043e\u0434\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435')  # Plot predicted data predicted_data = model_fit.predict() plt.plot(predicted_data, label='\u041f\u0440\u0435\u0434\u0441\u043a\u0430\u0437\u0430\u043d\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435')  plt.legend() plt.show()  #\u0432\u044b\u0432\u043e\u0434\u0438\u0442 \u043a\u0440\u0430\u0441\u0438\u0432\u044b\u0435 \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0438 \u0438 \u043f\u0440\u043e\u0447\u0443\u044e \u0441\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u043a\u0443 \u043f\u043e \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044e print(model_fit.summary())<\/code><\/pre>\n<p>\u041a\u0443\u0434\u0430 \u043f\u043e\u043b\u0435\u0437\u043d\u0435\u0435 \u043e\u043a\u0430\u0437\u0430\u043b\u0441\u044f \u043f\u0430\u043a\u0435\u0442 optuna, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0441 \u043f\u043e\u0434\u0431\u043e\u0440\u043e\u043c \u0433\u0438\u043f\u0435\u0440\u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432 \u0441\u043f\u0440\u0430\u0432\u0438\u043b\u0441\u044f \u043b\u0443\u0447\u0448\u0435. \u041a \u0441\u043e\u0436\u0430\u043b\u0435\u043d\u0438\u044e, optuna \u0442\u043e\u0436\u0435 \u0434\u0430\u043b\u0430 \u043d\u0435 \u0438\u0434\u0435\u0430\u043b\u044c\u043d\u044b\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f.<\/p>\n<pre><code class=\"python\">p = q = range(1, 40) d = range(1, 5) pdq = list(itertools.product(p, d, q))   def objective_arima(trial):     order=trial.suggest_categorical('order',pdq)     model=ARIMA(train_data,order=order)     mdl = model.fit() #disp=0     predictions = mdl.forecast(len(test_data))     predictions = pd.Series(predictions.values, index=test_data.index)     # predictions     residuals = test_data['count'] - predictions     mse=np.sqrt(np.mean(residuals**2))     accuracy=mse     return accuracy study=optuna.create_study(direction=\"minimize\") study.optimize(objective_arima,n_trials=20)<\/code><\/pre>\n<p>\u041f\u0440\u043e \u0447\u0442\u043e \u0437\u0434\u0435\u0441\u044c \u043d\u0435\u043b\u044c\u0437\u044f \u0437\u0430\u0431\u044b\u0432\u0430\u0442\u044c?<\/p>\n<p>1. pd.Series(predictions.values, index=test_data.index) \u0442\u043e\u0447\u043d\u043e \u0442\u0440\u0435\u0431\u0443\u0435\u0442 predictions.values, \u044f \u0441 \u044d\u0442\u0438\u043c \u043d\u0430\u043c\u0443\u0447\u0430\u043b\u0430\u0441\u044c, \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u043f\u043e\u0441\u0442\u043e\u044f\u043d\u043d\u044b \u0432\u044b\u0441\u043a\u0430\u043a\u0438\u0432\u0430\u043b\u0430 \u043e\u0448\u0438\u0431\u043a\u0430 \u0438\u0437-\u0437\u0430 \u043d\u0435\u0432\u0435\u0440\u043d\u043e\u0433\u043e \u0442\u0438\u043f\u0430 \u0434\u0430\u043d\u043d\u044b\u0445<br \/>2. \u041e\u0431\u0440\u0430\u0442\u043d\u043e\u0435 \u0438\u043d\u0442\u0435\u0433\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435: \u0443 \u043c\u0435\u043d\u044f \u0434\u043e\u043b\u0433\u043e \u043f\u0440\u0435\u0434\u0441\u043a\u0430\u0437\u0430\u043d\u0438\u044f \u0432\u0438\u0441\u0435\u043b\u0438 \u0432\u043d\u0438\u0437\u0443, \u0430 \u044f \u0435\u0449\u0451 \u0443\u0434\u0438\u0432\u043b\u044f\u043b\u0430\u0441\u044c, \u043f\u043e\u0447\u0435\u043c\u0443 \u043e\u043d\u0438 \u0442\u0430\u043a \u0441\u0438\u043b\u044c\u043d\u043e \u043d\u0435 \u0441\u043e\u0432\u043f\u0430\u0434\u0430\u044e\u0442 \u0441 \u0442\u0435\u0441\u0442\u043e\u0432\u044b\u043c\u0438 \u0434\u0430\u043d\u043d\u044b\u043c\u0438. \u041a\u0430\u043a \u0432\u044b \u0443\u0436\u0435 \u0434\u043e\u0433\u0430\u0434\u0430\u043b\u0438\u0441\u044c, \u0434\u0435\u043b\u043e \u0431\u044b\u043b\u043e \u0432 \u043a\u043e\u043d\u0441\u0442\u0430\u043d\u0442\u0435 \u0438\u043d\u0442\u0435\u0433\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f. \u0420\u0435\u0448\u0430\u0435\u0442\u0441\u044f \u043f\u0440\u043e\u0441\u0442\u043e \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u0435\u043c \u043a\u043e\u043d\u0441\u0442\u0430\u043d\u0442\u044b \u0438\u0437 \u0445\u0432\u043e\u0441\u0442\u0430 \u0442\u0440\u0435\u043d\u0438\u0440\u043e\u0432\u043e\u0447\u043d\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445.<br \/>3. \u041d\u0430\u0434\u043e \u0430\u043a\u043a\u0443\u0440\u0430\u0442\u043d\u0435\u0435 \u043e\u043f\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0438\u043d\u0434\u0435\u043a\u0441\u0430\u043c\u0438 \u0432 DataFrame Pandas, \u0431\u043e\u043b\u044c\u0448\u0443\u044e \u0447\u0430\u0441\u0442\u044c error-\u043e\u0432 \u044f \u043c\u043e\u0433\u043b\u0430 \u0438\u0437\u0431\u0435\u0436\u0430\u0442\u044c, \u0435\u0441\u043b\u0438 \u0431\u044b \u0432\u0434\u0443\u043c\u0447\u0438\u0432\u0435\u0435 \u043f\u043e\u0434\u043e\u0448\u043b\u0430 \u043a \u0432\u043e\u043f\u0440\u043e\u0441\u0443.<\/p>\n<p>\u041f\u0440\u0438\u043c\u0435\u0440 \u0438\u043d\u0442\u0435\u0433\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0438 \u0444\u0438\u043d\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u043a\u043e\u0434\u0430 \u0441 \u043c\u0435\u0442\u0440\u0438\u043a\u0430\u043c\u0438 \u043d\u0438\u0436\u0435:<\/p>\n<pre><code class=\"python\">inverted_forecast = pd.Series(predictions).cumsum() inverted_forecast += dataset[length - 1] inverted_true = dataset_sends[length:]  plt.figure(figsize=(10,6)) plt.plot(inverted_true, color = \"green\") plt.plot(inverted_forecast, color = \"red\") plt.legend([\"Actual\",\"prediction\"])  plt.title(\"Predicted vs True Value\") plt.xlabel(\"date\") plt.ylabel(\"count_sends\") plt.show()<\/code><\/pre>\n<pre><code class=\"python\">from sklearn.metrics import mean_absolute_percentage_error  print(\"mean absolute error: \", round(mean_absolute_error(inverted_true['count'], inverted_forecast), 5)) print(\"mean squared error: \", round(mean_squared_error(inverted_true['count'], inverted_forecast), 5)) print(\"Root mean squared error: \", round(mean_squared_error(inverted_true['count'], inverted_forecast, squared=False), 5)) print(\"mean absolute percentage error\", round(mean_absolute_percentage_error(inverted_true['count'], inverted_forecast)), \"%\")<\/code><\/pre>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/8a1\/78f\/2c1\/8a178f2c10ca27ceb8db7c048bfa76ab.png\" alt=\"\u0418\u0442\u043e\u0433 \u043c\u043e\u0438\u0445 \u043f\u0440\u0435\u0434\u0441\u043a\u0430\u0437\u0430\u043d\u0438\u0439\" title=\"\u0418\u0442\u043e\u0433 \u043c\u043e\u0438\u0445 \u043f\u0440\u0435\u0434\u0441\u043a\u0430\u0437\u0430\u043d\u0438\u0439\" width=\"1502\" height=\"900\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/8a1\/78f\/2c1\/8a178f2c10ca27ceb8db7c048bfa76ab.png\"\/><\/p>\n<div><figcaption>\u0418\u0442\u043e\u0433 \u043c\u043e\u0438\u0445 \u043f\u0440\u0435\u0434\u0441\u043a\u0430\u0437\u0430\u043d\u0438\u0439<\/figcaption><\/div>\n<\/figure>\n<p>\u0422\u0430\u043a \u0438\u043b\u0438 \u0438\u043d\u0430\u0447\u0435 ARIMA \u0434\u043b\u044f \u043c\u043e\u0438\u0445 \u0434\u0430\u043d\u043d\u044b\u0445 \u043d\u0435 \u043f\u043e\u0434\u043e\u0448\u043b\u0430 \u2014 \u0434\u0443\u043c\u0430\u044e, \u0447\u0442\u043e \u0431\u043e\u043b\u044c\u0448\u0443\u044e \u0440\u043e\u043b\u044c \u0441\u044b\u0433\u0440\u0430\u043b \u043d\u0435\u0434\u043e\u0441\u0442\u0430\u0442\u043e\u043a \u0434\u0430\u043d\u043d\u044b\u0445. ARIMA \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0443\u044e\u0442 \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u0442\u044c \u0434\u043b\u044f \u0434\u0430\u043d\u043d\u044b\u0445 \u043e\u0442 \u0442\u0440\u0451\u0445 \u043b\u0435\u0442, \u0430 \u044f \u0442\u0430\u043a\u043e\u0439 \u0441\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u043a\u043e\u0439 \u043d\u0435 \u0440\u0430\u0441\u043f\u043e\u043b\u0430\u0433\u0430\u043b\u0430.<\/p>\n<p>\u0412 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0439 \u0447\u0430\u0441\u0442\u0438 \u0440\u0430\u0441\u0441\u043a\u0430\u0436\u0443, \u0447\u0442\u043e \u0437\u0430 \u043f\u0440\u0438\u043a\u043e\u043b\u044b \u0431\u044b\u043b\u0438 \u0441 SARIMAX, \u0438 \u043a\u0430\u043a \u044d\u043a\u0441\u043f\u043e\u043d\u0435\u043d\u0446\u0438\u0430\u043b\u044c\u043d\u043e\u0435 \u0441\u0433\u043b\u0430\u0436\u0438\u0432\u0430\u043d\u0438\u0435 \u0432\u044b\u0431\u0438\u043b\u043e\u0441\u044c \u0432 \u043b\u0438\u0434\u0435\u0440\u044b.<\/p>\n<div class=\"persona\"><img decoding=\"async\" class=\"image persona__image\" src=\"https:\/\/habrastorage.org\/r\/w780q1\/getpro\/habr\/upload_files\/2a9\/905\/2a0\/2a99052a0684ec1955d244e55a1937d2.jpg\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/2a9\/905\/2a0\/2a99052a0684ec1955d244e55a1937d2.jpg\" data-blurred=\"true\"\/><\/p>\n<h5 class=\"persona__heading\">\u0415\u0440\u043c\u0430\u043a \u041c\u0430\u0440\u0438\u043d\u0430<\/h5>\n<p>\u0410\u043d\u0430\u043b\u0438\u0442\u0438\u043a, SENSE IT<\/p>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<p><!----><!----><\/div>\n<p><!----><!----><br \/> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/articles\/821231\/\"> https:\/\/habr.com\/ru\/articles\/821231\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<div><!--[--><!--]--><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<p><strong>\u0427\u0430\u0441\u0442\u044c 1<\/strong><\/p>\n<p>\u0427\u0442\u043e \u0442\u0430\u043a\u043e\u0435 \u0432\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 \u0440\u044f\u0434, \u043c\u043e\u0434\u0435\u043b\u044c ARIMA \u0438 \u043a\u0430\u043a \u043a \u043d\u0435\u0439 \u043f\u043e\u0434\u0431\u0438\u0440\u0430\u0442\u044c \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b.<\/p>\n<blockquote>\n<p>\u0412\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 \u0440\u044f\u0434 \u2014 \u0441\u043e\u0431\u0440\u0430\u043d\u043d\u044b\u0439 \u0432 \u0440\u0430\u0437\u043d\u044b\u0435 \u043c\u043e\u043c\u0435\u043d\u0442\u044b \u0432\u0440\u0435\u043c\u0435\u043d\u0438 \u0441\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u043c\u0430\u0442\u0435\u0440\u0438\u0430\u043b \u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0438 \u043a\u0430\u043a\u0438\u0445-\u043b\u0438\u0431\u043e \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432 (\u0432 \u043f\u0440\u043e\u0441\u0442\u0435\u0439\u0448\u0435\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u043e\u0434\u043d\u043e\u0433\u043e) \u0438\u0441\u0441\u043b\u0435\u0434\u0443\u0435\u043c\u043e\u0433\u043e \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0430. (\u0441) \u0412\u0438\u043a\u0438\u043f\u0435\u0434\u0438\u044f<\/p>\n<\/blockquote>\n<p>\u041f\u0440\u043e\u0441\u0442\u044b\u043c \u0441\u043b\u043e\u0432\u0430\u043c\u0438, \u0432\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 \u0440\u044f\u0434 \u2014 \u044d\u0442\u043e \u043f\u0440\u043e\u0441\u0442\u043e \u043f\u043e\u0441\u043b\u0435\u0434\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u0441\u043e\u0431\u044b\u0442\u0438\u0439, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043a\u0430\u043a-\u0442\u043e \u0437\u0430\u0432\u0438\u0441\u0438\u0442 \u043e\u0442 \u0432\u0440\u0435\u043c\u0435\u043d\u0438. \u0414\u043b\u044f \u043d\u0430\u0447\u0430\u043b\u0430 \u0431\u0443\u0434\u0435\u043c \u0441\u0447\u0438\u0442\u0430\u0442\u044c, \u0447\u0442\u043e \u0440\u044f\u0434 \u0441\u0430\u043c\u044b\u0439 \u043f\u0440\u043e\u0441\u0442\u0435\u0446\u043a\u0438\u0439 \u0438 \u043d\u0430\u0441 \u043f\u0440\u043e\u0441\u0442\u043e \u0435\u0441\u0442\u044c \u0441\u043a\u0430\u0447\u0443\u0449\u0438\u0435 \u0442\u0443\u0434\u0430-\u0441\u044e\u0434\u0430 \u0442\u043e\u0447\u043a\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u044b \u043f\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 \u0448\u043a\u0430\u043b\u0435.<\/p>\n<figure class=\"full-width\">\n<div><figcaption>\u0412\u0438\u043a\u0438\u043f\u0435\u0434\u0438\u044f \u043f\u0440\u0435\u0434\u043b\u0430\u0433\u0430\u0435\u0442 \u0442\u0430\u043a\u0443\u044e \u0441\u0442\u0440\u0430\u0448\u043d\u0443\u044e \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0443<\/figcaption><\/div>\n<\/figure>\n<p>\u041d\u043e \u0434\u0430\u0436\u0435 \u0442\u0430\u043a\u0438\u0435 \u043f\u0440\u043e\u0441\u0442\u044b\u0435 \u0440\u044f\u0434\u044b \u043c\u043e\u0436\u043d\u043e \u0440\u0430\u0437\u0434\u0435\u043b\u0438\u0442\u044c \u043d\u0430 \u0434\u0432\u0435 \u0431\u043e\u043b\u044c\u0448\u0438\u0445 \u043a\u0430\u0442\u0435\u0433\u043e\u0440\u0438\u0438: \u0441\u0442\u0430\u0446\u0438\u043e\u043d\u0430\u0440\u043d\u044b\u0435 \u0438 \u043d\u0435\u0441\u0442\u0430\u0446\u0438\u043e\u043d\u0430\u0440\u043d\u044b\u0435. \u0421\u0442\u0430\u0446\u0438\u043e\u043d\u0430\u0440\u043d\u044b\u0439 \u0440\u044f\u0434 \u0432 \u043f\u0435\u0440\u0432\u043e\u043c \u043f\u0440\u0438\u0431\u043b\u0438\u0436\u0435\u043d\u0438\u0438 \u043c\u043e\u0436\u043d\u043e \u0441\u0447\u0438\u0442\u0430\u0442\u044c \u043f\u0440\u043e\u0441\u0442\u043e \u0447\u0435\u043c-\u0442\u043e \u043f\u043e\u0445\u043e\u0436\u0438\u043c \u043d\u0430 \u0441\u0438\u043d\u0443\u0441, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0442\u0430\u043a:<\/p>\n<figure class=\"\">\n<div><figcaption>\u0421\u0442\u0430\u0446\u0438\u043e\u043d\u0430\u0440\u043d\u044b\u0439 \u0432\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 \u0440\u044f\u0434 \u043d\u0430 \u043f\u0440\u0438\u043c\u0435\u0440\u0435 \u0441\u0438\u043d\u0443\u0441\u0430<\/figcaption><\/div>\n<\/figure>\n<p>\u041f\u043e\u043d\u044f\u0442\u043d\u043e\u0435 \u0434\u0435\u043b\u043e, \u0447\u0442\u043e \u0441\u0438\u043d\u0443\u0441 \u0432\u0440\u044f\u0434 \u043b\u0438 \u0432\u0441\u0442\u0440\u0435\u0442\u0438\u0442\u044c\u0441\u044f \u0432 \u0440\u0435\u0430\u043b\u044c\u043d\u044b\u0445 \u0432\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445 \u0440\u044f\u0434\u0430\u0445. \u041a \u0442\u043e\u043c\u0443 \u0436\u0435 \u043f\u043e\u043c\u0438\u043c\u043e \u0441\u0442\u0430\u0446\u0438\u043e\u043d\u0430\u0440\u043d\u043e\u0441\u0442\u0438 \u0435\u0441\u0442\u044c \u0442\u0440\u0435\u043d\u0434 \u2014 \u0442\u043e \u0435\u0441\u0442\u044c \u0440\u043e\u0441\u0442 \u0440\u044f\u0434\u0430 \u0441 \u0442\u0435\u0447\u0435\u043d\u0438\u0435\u043c \u0432\u0440\u0435\u043c\u0435\u043d\u0438, \u0446\u0438\u043a\u043b\u044b, \u043a\u043e\u0433\u0434\u0430 \u043c\u044b \u0432\u0438\u0434\u0438\u043c \u043f\u043e\u0432\u0442\u043e\u0440\u044f\u044e\u0449\u0443\u044e\u0441\u044f \u043a\u0430\u0440\u0442\u0438\u043d\u0443 \u043f\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u0438. \u0418, \u043d\u0430\u043a\u043e\u043d\u0435\u0446, \u0441\u0435\u0437\u043e\u043d\u043d\u043e\u0441\u0442\u044c \u2014 \u0446\u0438\u043a\u043b\u044b, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u043e\u0432\u0442\u043e\u0440\u044f\u044e\u0442\u0441\u044f, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043a\u0430\u0436\u0434\u044b\u0435 12 \u0447\u0430\u0441\u043e\u0432\/\u043d\u0435\u0434\u0435\u043b\u044e\/\u043c\u0435\u0441\u044f\u0446\/\u0433\u043e\u0434 \u0438 \u0442.\u0434.<\/p>\n<figure class=\"full-width\">\n<div><figcaption>\u041a\u043e\u0440\u043e\u0442\u043a\u043e \u043e \u0444\u0438\u0447\u0430\u0445 \u0432\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445 \u0440\u044f\u0434\u043e\u0432<\/figcaption><\/div>\n<\/figure>\n<p>\u041f\u0440\u043e\u0431\u043b\u0435\u043c \u0442\u0443\u0442 \u043c\u043e\u0436\u0435\u0442 \u0432\u043e\u0437\u043d\u0438\u043a\u043d\u0443\u0442\u044c \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u043e, \u043d\u043e \u044f \u0445\u043e\u0447\u0443 \u043d\u0430\u0447\u0430\u0442\u044c \u0441 \u0433\u043b\u0430\u0432\u043d\u043e\u0439 \u2014 \u0431\u043e\u043b\u044c\u0448\u0438\u043d\u0441\u0442\u0432\u043e \u043c\u043e\u0434\u0435\u043b\u0435\u0439 \u0432 Python \u0440\u0430\u0441\u0441\u0447\u0438\u0442\u0430\u043d\u044b \u043d\u0430 \u0441\u0442\u0430\u0446\u0438\u043e\u043d\u0430\u0440\u043d\u044b\u0435 \u0432\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435 \u0440\u044f\u0434\u044b. \u041f\u043e\u043a\u0430 \u0435\u0434\u0438\u043d\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u0435 \u0438\u0441\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435, \u0441 \u043a\u043e\u0442\u043e\u0440\u044b\u043c \u044f \u0441\u0442\u043e\u043b\u043a\u043d\u0443\u043b\u0430\u0441\u044c \u2014 \u044d\u0442\u043e \u044d\u043a\u0441\u043f\u043e\u043d\u0435\u043d\u0446\u0438\u0430\u043b\u044c\u043d\u043e\u0435 \u0441\u0433\u043b\u0430\u0436\u0438\u0432\u0430\u043d\u0438\u0435. <\/p>\n<p>\u041d\u043e, \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e, \u044f \u043f\u0440\u043e\u0441\u0442\u043e \u043d\u0435 \u043d\u0430\u0448\u043b\u0430 \u0441\u043f\u043e\u0441\u043e\u0431 \u0432\u043f\u0438\u0445\u043d\u0443\u0442\u044c \u0442\u0443\u0434\u0430 \u0441\u0442\u0430\u0446\u0438\u043e\u043d\u0430\u0440\u043d\u044b\u0439 \u0440\u044f\u0434. \u0412\u043f\u0440\u043e\u0447\u0435\u043c, \u0434\u0430\u0432\u0430\u0439\u0442\u0435 \u043f\u043e \u043f\u043e\u0440\u044f\u0434\u043a\u0443.<\/p>\n<h2>1. \u041f\u0440\u043e\u0432\u0435\u0440\u043a\u0430 \u043d\u0430 \u0441\u0442\u0430\u0446\u0438\u043e\u043d\u0430\u0440\u043d\u043e\u0441\u0442\u044c<\/h2>\n<pre><code class=\"python\">from statsmodels.tsa.stattools import adfuller  def test_stationarity(series, title=''):     print(f\"Results of ADF Test on {title}:\")     result = adfuller(series, autolag='AIC')     print(f\"ADF Statistic: {result[0]}\")     print(f\"p-value: {result[1]}\")     if result[1] > 0.05:         print(\"Non-stationary\")     else:         print(\"stationary\")     for key, value in result[4].items():         print(f\"Critical Value ({key}): {value}\")     print(\"\\n\")  test_stationarity(df['count_1'], 'Counts')<\/code><\/pre>\n<p>\u042f \u044e\u0437\u0430\u043b\u0430 \u043e\u0431\u044b\u0447\u043d\u044b\u0439 \u0442\u0435\u0441\u0442 \u0414\u0438\u043a\u0438-\u0424\u0443\u043b\u043b\u0435\u0440\u0430, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0437\u0430 \u043c\u0435\u043d\u044f \u043a\u0440\u0430\u0441\u0438\u0432\u043e \u043e\u0444\u043e\u0440\u043c\u0438\u043b chatGPT \u0438 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u0447\u043d\u0430\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u044f. \u0422\u0443\u0442, \u043a\u0430\u043a \u0438 \u0432\u0435\u0437\u0434\u0435 \u0432 \u0441\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u043a\u0435, \u0432\u0430\u0436\u043d\u043e \u0432\u044b\u0431\u0440\u0430\u0442\u044c \u0437\u0430\u0440\u0430\u043d\u0435\u0435 p-value. <br \/>\u041f\u0440\u043e <a href=\"https:\/\/www.ncbi.nlm.nih.gov\/pmc\/articles\/PMC4111019\/#:~:text=The%20P%20value%20is%20defined,groups%20is%20due%20to%20chance.\" rel=\"noopener noreferrer nofollow\">p-value<\/a> \u0438 \u0441\u0430\u043c <a href=\"https:\/\/en.wikipedia.org\/wiki\/Dickey%E2%80%93Fuller_test\" rel=\"noopener noreferrer nofollow\">\u0442\u0435\u0441\u0442<\/a> \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u0447\u0438\u0442\u0430\u0442\u044c \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u043e, \u0430 \u044f \u0445\u043e\u0447\u0443 \u0441\u043e\u0441\u0440\u0435\u0434\u043e\u0442\u043e\u0447\u0438\u0442\u044c\u0441\u044f \u043d\u0430 \u0442\u0440\u0451\u0445 \u043c\u043e\u0434\u0435\u043b\u044f\u0445, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b\u0430 \u0432 \u0440\u0430\u0431\u043e\u0442\u0435.<\/p>\n<h2>2. ARIMA model<\/h2>\n<p>\u0412 \u043b\u044e\u0431\u043e\u043c \u0440\u0443\u043a\u043e\u0432\u043e\u0434\u0441\u0442\u0432\u0435 \u043f\u043e \u043c\u043e\u0434\u0435\u043b\u044f\u043c ARIMA\/SARIMAX \u0432\u0430\u043c \u043f\u0435\u0440\u0432\u044b\u043c \u0434\u0435\u043b\u043e\u043c \u0441\u043a\u0430\u0436\u0443\u0442, \u0447\u0442\u043e \u043d\u0430\u0434\u043e \u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u043d\u0430 \u0430\u0432\u0442\u043e\u043a\u043e\u0440\u0440\u0435\u043b\u044f\u0446\u0438\u044e \u0438 \u0447\u0430\u0441\u0442\u0438\u0447\u043d\u0443\u044e \u0430\u0432\u0442\u043e\u043a\u043e\u0440\u0440\u0435\u043b\u044f\u0446\u0438\u044e, \u0447\u0442\u043e\u0431\u044b \u0445\u043e\u0442\u044c \u043a\u0430\u043a-\u0442\u043e \u0430\u0434\u0435\u043a\u0432\u0430\u0442\u043d\u043e \u0437\u0430\u0434\u0430\u0442\u044c \u043d\u0430\u0447\u0430\u043b\u044c\u043d\u044b\u0435 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b p \u0438 q. p \u0438 q \u0441\u043c\u043e\u0442\u0440\u044f\u0442\u0441\u044f \u043f\u043e \u0432\u044b\u0431\u0440\u043e\u0441\u0430\u043c: \u0432\u044b\u0431\u0438\u0440\u0430\u044e\u0442\u0441\u044f \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u043d\u0430 \u0433\u043e\u0440\u0438\u0437\u043e\u043d\u0442\u0430\u043b\u044c\u043d\u043e\u0439 \u043e\u0441\u0438, \u0443 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u0442\u043e\u0447\u043a\u0430 \u0432\u044b\u0445\u043e\u0434\u0438\u0442 \u0437\u0430 \u0433\u0440\u0430\u043d\u0438\u0446\u0443 \u0441\u0438\u043d\u0435\u0439 \u043e\u0431\u043b\u0430\u0441\u0442\u0438. \u0417\u043d\u0430\u0447\u0435\u043d\u0438\u0435 q \u0441\u043c\u043e\u0442\u0440\u044f\u0442\u0441\u044f \u043f\u043e \u0433\u0440\u0430\u0444\u0438\u043a\u0443 ACF, a p &#8212; \u043f\u043e \u0433\u0440\u0430\u0444\u0438\u043a\u0443 PACF. <br \/>\u0421\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u0438\u0445 \u043d\u0443\u0436\u043d\u043e \u043d\u0430 \u0443\u0436\u0435 \u0441\u0442\u0430\u0446\u0438\u043e\u043d\u0430\u0440\u043d\u043e\u043c \u0440\u044f\u0434\u0435. \u041d\u043e \u0435\u0441\u0442\u044c \u043d\u044e\u0430\u043d\u0441.<\/p>\n<figure class=\"full-width\">\n<div><figcaption>\u0418\u0434\u0435\u0430\u043b\u044c\u043d\u044b\u0435 \u0441\u0438\u0442\u0443\u0430\u0446\u0438\u0438 \u0438\u0437 \u0438\u043d\u0442\u0435\u0440\u043d\u0435\u0442\u0430<\/figcaption><\/div>\n<\/figure>\n<pre><code class=\"python\">#\u041e\u0442\u0440\u0438\u0441\u043e\u0432\u043a\u0430 ACF \u0438 PACF import statsmodels.api as sm  diff1 = dataset.diff() diff1.dropna(inplace=True) #delete all rows with NaN value  fig = plt.figure(figsize=(12,8)) ax1 = fig.add_subplot(211) half_size = len(diff1) \/\/ 2 fig = plot_acf(diff1, lags=half_size, ax=ax1) ax2 = fig.add_subplot(212) fig = sm.graphics.tsa.plot_pacf(diff1, lags=half_size, ax=ax2)<\/code><\/pre>\n<p>\u0412 \u043c\u043e\u0451\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u044d\u0442\u043e \u043f\u043e\u0447\u0442\u0438 \u043d\u0435 \u0441\u0440\u0430\u0431\u043e\u0442\u0430\u043b\u043e. \u041a\u043e\u043d\u0435\u0447\u043d\u043e, \u043a\u0430\u043a\u0438\u0435-\u0442\u043e \u043e\u0442\u043f\u0440\u0430\u0432\u043d\u044b\u0435 p \u0438 q \u043c\u043d\u0435 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0430 \u0432\u044b\u0434\u0430\u043b\u0430, \u043d\u043e \u0434\u043b\u044f \u0433\u0438\u043f\u0435\u0440\u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432 \u043c\u043e\u0434\u0435\u043b\u0438 \u043e\u043d\u0438 \u0441\u043e\u0432\u0441\u0435\u043c \u043d\u0435 \u0433\u043e\u0434\u0438\u043b\u0438\u0441\u044c. <\/p>\n<pre><code class=\"python\"># \u043b\u0443\u0447\u0448\u0435 \u044e\u0437\u0430\u0442\u044c \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u0447\u043d\u044b\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438, \u043d\u043e \u0435\u0441\u043b\u0438 \u0434\u0430\u0436\u0435 \u0434\u0435\u043b\u0430\u0435\u0442\u0435 \u0440\u0443\u043a\u0430\u043c\u0438  # \u0434\u0435\u043b\u0430\u0439\u0442\u0435 \u0434\u043b\u0438\u043d\u0443 \u0447\u0435\u0440\u0435\u0437 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0443\u044e, \u0430 \u043d\u0435 \u0446\u0438\u0444\u0440\u044b length = int(len(diff1) * 0.8) train_data=diff1[0:length] test_data=diff1[length:]   model = sm.tsa.arima.ARIMA(diff1, order=(p, d, q)) model_fit = model.fit()  plt.figure(figsize=(10,6)) plt.plot(diff1, label='\u0418\u0441\u0445\u043e\u0434\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435')  # Plot predicted data predicted_data = model_fit.predict() plt.plot(predicted_data, label='\u041f\u0440\u0435\u0434\u0441\u043a\u0430\u0437\u0430\u043d\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435')  plt.legend() plt.show()  #\u0432\u044b\u0432\u043e\u0434\u0438\u0442 \u043a\u0440\u0430\u0441\u0438\u0432\u044b\u0435 \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0438 \u0438 \u043f\u0440\u043e\u0447\u0443\u044e \u0441\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u043a\u0443 \u043f\u043e \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044e print(model_fit.summary())<\/code><\/pre>\n<p>\u041a\u0443\u0434\u0430 \u043f\u043e\u043b\u0435\u0437\u043d\u0435\u0435 \u043e\u043a\u0430\u0437\u0430\u043b\u0441\u044f \u043f\u0430\u043a\u0435\u0442 optuna, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0441 \u043f\u043e\u0434\u0431\u043e\u0440\u043e\u043c \u0433\u0438\u043f\u0435\u0440\u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432 \u0441\u043f\u0440\u0430\u0432\u0438\u043b\u0441\u044f \u043b\u0443\u0447\u0448\u0435. \u041a \u0441\u043e\u0436\u0430\u043b\u0435\u043d\u0438\u044e, optuna \u0442\u043e\u0436\u0435 \u0434\u0430\u043b\u0430 \u043d\u0435 \u0438\u0434\u0435\u0430\u043b\u044c\u043d\u044b\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f.<\/p>\n<pre><code class=\"python\">p = q = range(1, 40) d = range(1, 5) pdq = list(itertools.product(p, d, q))   def objective_arima(trial):     order=trial.suggest_categorical('order',pdq)     model=ARIMA(train_data,order=order)     mdl = model.fit() #disp=0     predictions = mdl.forecast(len(test_data))     predictions = pd.Series(predictions.values, index=test_data.index)     # predictions     residuals = test_data['count'] - predictions     mse=np.sqrt(np.mean(residuals**2))     accuracy=mse     return accuracy study=optuna.create_study(direction=\"minimize\") study.optimize(objective_arima,n_trials=20)<\/code><\/pre>\n<p>\u041f\u0440\u043e \u0447\u0442\u043e \u0437\u0434\u0435\u0441\u044c \u043d\u0435\u043b\u044c\u0437\u044f \u0437\u0430\u0431\u044b\u0432\u0430\u0442\u044c?<\/p>\n<p>1. pd.Series(predictions.values, index=test_data.index) \u0442\u043e\u0447\u043d\u043e \u0442\u0440\u0435\u0431\u0443\u0435\u0442 predictions.values, \u044f \u0441 \u044d\u0442\u0438\u043c \u043d\u0430\u043c\u0443\u0447\u0430\u043b\u0430\u0441\u044c, \u043f\u043e\u0442\u043e\u043c\u0443 \u0447\u0442\u043e \u043f\u043e\u0441\u0442\u043e\u044f\u043d\u043d\u044b \u0432\u044b\u0441\u043a\u0430\u043a\u0438\u0432\u0430\u043b\u0430 \u043e\u0448\u0438\u0431\u043a\u0430 \u0438\u0437-\u0437\u0430 \u043d\u0435\u0432\u0435\u0440\u043d\u043e\u0433\u043e \u0442\u0438\u043f\u0430 \u0434\u0430\u043d\u043d\u044b\u0445<br \/>2. \u041e\u0431\u0440\u0430\u0442\u043d\u043e\u0435 \u0438\u043d\u0442\u0435\u0433\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435: \u0443 \u043c\u0435\u043d\u044f \u0434\u043e\u043b\u0433\u043e \u043f\u0440\u0435\u0434\u0441\u043a\u0430\u0437\u0430\u043d\u0438\u044f \u0432\u0438\u0441\u0435\u043b\u0438 \u0432\u043d\u0438\u0437\u0443, \u0430 \u044f \u0435\u0449\u0451 \u0443\u0434\u0438\u0432\u043b\u044f\u043b\u0430\u0441\u044c, \u043f\u043e\u0447\u0435\u043c\u0443 \u043e\u043d\u0438 \u0442\u0430\u043a \u0441\u0438\u043b\u044c\u043d\u043e \u043d\u0435 \u0441\u043e\u0432\u043f\u0430\u0434\u0430\u044e\u0442 \u0441 \u0442\u0435\u0441\u0442\u043e\u0432\u044b\u043c\u0438 \u0434\u0430\u043d\u043d\u044b\u043c\u0438. \u041a\u0430\u043a \u0432\u044b \u0443\u0436\u0435 \u0434\u043e\u0433\u0430\u0434\u0430\u043b\u0438\u0441\u044c, \u0434\u0435\u043b\u043e \u0431\u044b\u043b\u043e \u0432 \u043a\u043e\u043d\u0441\u0442\u0430\u043d\u0442\u0435 \u0438\u043d\u0442\u0435\u0433\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f. \u0420\u0435\u0448\u0430\u0435\u0442\u0441\u044f \u043f\u0440\u043e\u0441\u0442\u043e \u0434\u043e\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u0435\u043c \u043a\u043e\u043d\u0441\u0442\u0430\u043d\u0442\u044b \u0438\u0437 \u0445\u0432\u043e\u0441\u0442\u0430 \u0442\u0440\u0435\u043d\u0438\u0440\u043e\u0432\u043e\u0447\u043d\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445.<br \/>3. \u041d\u0430\u0434\u043e \u0430\u043a\u043a\u0443\u0440\u0430\u0442\u043d\u0435\u0435 \u043e\u043f\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0438\u043d\u0434\u0435\u043a\u0441\u0430\u043c\u0438 \u0432 DataFrame Pandas, \u0431\u043e\u043b\u044c\u0448\u0443\u044e \u0447\u0430\u0441\u0442\u044c error-\u043e\u0432 \u044f \u043c\u043e\u0433\u043b\u0430 \u0438\u0437\u0431\u0435\u0436\u0430\u0442\u044c, \u0435\u0441\u043b\u0438 \u0431\u044b \u0432\u0434\u0443\u043c\u0447\u0438\u0432\u0435\u0435 \u043f\u043e\u0434\u043e\u0448\u043b\u0430 \u043a \u0432\u043e\u043f\u0440\u043e\u0441\u0443.<\/p>\n<p>\u041f\u0440\u0438\u043c\u0435\u0440 \u0438\u043d\u0442\u0435\u0433\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0438 \u0444\u0438\u043d\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u043a\u043e\u0434\u0430 \u0441 \u043c\u0435\u0442\u0440\u0438\u043a\u0430\u043c\u0438 \u043d\u0438\u0436\u0435:<\/p>\n<pre><code class=\"python\">inverted_forecast = pd.Series(predictions).cumsum() inverted_forecast += dataset[length - 1] inverted_true = dataset_sends[length:]  plt.figure(figsize=(10,6)) plt.plot(inverted_true, color = \"green\") plt.plot(inverted_forecast, color = \"red\") plt.legend([\"Actual\",\"prediction\"])  plt.title(\"Predicted vs True Value\") plt.xlabel(\"date\") plt.ylabel(\"count_sends\") plt.show()<\/code><\/pre>\n<pre><code class=\"python\">from sklearn.metrics import mean_absolute_percentage_error  print(\"mean absolute error: \", round(mean_absolute_error(inverted_true['count'], inverted_forecast), 5)) print(\"mean squared error: \", round(mean_squared_error(inverted_true['count'], inverted_forecast), 5)) print(\"Root mean squared error: \", round(mean_squared_error(inverted_true['count'], inverted_forecast, squared=False), 5)) print(\"mean absolute percentage error\", round(mean_absolute_percentage_error(inverted_true['count'], inverted_forecast)), \"%\")<\/code><\/pre>\n<figure class=\"full-width\">\n<div><figcaption>\u0418\u0442\u043e\u0433 \u043c\u043e\u0438\u0445 \u043f\u0440\u0435\u0434\u0441\u043a\u0430\u0437\u0430\u043d\u0438\u0439<\/figcaption><\/div>\n<\/figure>\n<p>\u0422\u0430\u043a \u0438\u043b\u0438 \u0438\u043d\u0430\u0447\u0435 ARIMA \u0434\u043b\u044f \u043c\u043e\u0438\u0445 \u0434\u0430\u043d\u043d\u044b\u0445 \u043d\u0435 \u043f\u043e\u0434\u043e\u0448\u043b\u0430 \u2014 \u0434\u0443\u043c\u0430\u044e, \u0447\u0442\u043e \u0431\u043e\u043b\u044c\u0448\u0443\u044e \u0440\u043e\u043b\u044c \u0441\u044b\u0433\u0440\u0430\u043b \u043d\u0435\u0434\u043e\u0441\u0442\u0430\u0442\u043e\u043a \u0434\u0430\u043d\u043d\u044b\u0445. ARIMA \u0440\u0435\u043a\u043e\u043c\u0435\u043d\u0434\u0443\u044e\u0442 \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u0442\u044c \u0434\u043b\u044f \u0434\u0430\u043d\u043d\u044b\u0445 \u043e\u0442 \u0442\u0440\u0451\u0445 \u043b\u0435\u0442, \u0430 \u044f \u0442\u0430\u043a\u043e\u0439 \u0441\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u043a\u043e\u0439 \u043d\u0435 \u0440\u0430\u0441\u043f\u043e\u043b\u0430\u0433\u0430\u043b\u0430.<\/p>\n<p>\u0412 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0439 \u0447\u0430\u0441\u0442\u0438 \u0440\u0430\u0441\u0441\u043a\u0430\u0436\u0443, \u0447\u0442\u043e \u0437\u0430 \u043f\u0440\u0438\u043a\u043e\u043b\u044b \u0431\u044b\u043b\u0438 \u0441 SARIMAX, \u0438 \u043a\u0430\u043a \u044d\u043a\u0441\u043f\u043e\u043d\u0435\u043d\u0446\u0438\u0430\u043b\u044c\u043d\u043e\u0435 \u0441\u0433\u043b\u0430\u0436\u0438\u0432\u0430\u043d\u0438\u0435 \u0432\u044b\u0431\u0438\u043b\u043e\u0441\u044c \u0432 \u043b\u0438\u0434\u0435\u0440\u044b.<\/p>\n<div class=\"persona\">\n<h5 class=\"persona__heading\">\u0415\u0440\u043c\u0430\u043a \u041c\u0430\u0440\u0438\u043d\u0430<\/h5>\n<p>\u0410\u043d\u0430\u043b\u0438\u0442\u0438\u043a, SENSE IT<\/p>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<p><!----><!----><\/div>\n<p><!----><!----><br \/> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/articles\/821231\/\"> https:\/\/habr.com\/ru\/articles\/821231\/<\/a><br \/><\/br><\/br><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-378673","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/378673","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=378673"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/378673\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=378673"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=378673"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=378673"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}