{"id":209640,"date":"2014-01-21T08:00:02","date_gmt":"2014-01-21T04:00:02","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=209640"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=209640","title":{"rendered":"<span class=\"post_title\">\u041a\u0430\u043b\u043c\u0430\u043d, \u041c\u0430\u0442\u043b\u0430\u0431, \u0438 State Space Models<\/span>"},"content":{"rendered":"<div class=\"content html_format\">   \t\u041d\u0435\u0434\u0430\u0432\u043d\u043e <a href=\"http:\/\/habrahabr.ru\/users\/kuznetsovin\/\" class=\"user_link\">kuznetsovin<\/a> \u043e\u043f\u0443\u0431\u043b\u0438\u043a\u043e\u0432\u0430\u043b <a href=\"http:\/\/habrahabr.ru\/post\/207160\/\">\u043f\u043e\u0441\u0442<\/a> \u043e\u0431 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0438 \u041f\u0438\u0442\u043e\u043d\u0430 \u0434\u043b\u044f \u0430\u043d\u0430\u043b\u0438\u0437\u0430 \u0432\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445 \u0440\u044f\u0434\u043e\u0432 \u0432 \u044d\u043a\u043e\u043d\u043e\u043c\u0438\u043a\u0435. \u0412 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u043c\u043e\u0434\u0435\u043b\u0438 \u0431\u044b\u043b\u0430 \u0432\u044b\u0431\u0440\u0430\u043d\u0430 \u00ab\u0440\u0430\u0431\u043e\u0447\u0430\u044f \u043b\u043e\u0448\u0430\u0434\u043a\u0430\u00bb \u044d\u043a\u043e\u043d\u043e\u043c\u0435\u0442\u0440\u0438\u043a\u0438 \u2014 ARIMA, \u043f\u043e\u0436\u0430\u043b\u0443\u0439, \u043e\u0434\u043d\u0430 \u0438\u0437 \u043d\u0430\u0438\u0431\u043e\u043b\u0435\u0435 \u0440\u0430\u0441\u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0435\u043d\u043d\u044b\u0445 \u043c\u043e\u0434\u0435\u043b\u0435\u0439 \u0434\u043b\u044f \u0432\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445. \u0412 \u0442\u043e \u0436\u0435 \u0432\u0440\u0435\u043c\u044f, \u0433\u043b\u0430\u0432\u043d\u044b\u0439 \u043d\u0435\u0434\u043e\u0441\u0442\u0430\u0442\u043e\u043a \u0410RIMA-\u043f\u043e\u0434\u043e\u0431\u043d\u044b\u0445 \u043c\u043e\u0434\u0435\u043b\u0435\u0439 \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e \u043e\u043d\u0438 \u043d\u0435 \u043f\u0440\u0438\u0441\u043f\u043e\u0441\u043e\u0431\u043b\u0435\u043d\u044b \u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0441 \u043d\u0435\u0441\u0442\u0430\u0446\u0438\u043e\u043d\u0430\u0440\u043d\u044b\u043c\u0438 \u0440\u044f\u0434\u0430\u043c\u0438. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0435\u0441\u043b\u0438 \u0432 \u0434\u0430\u043d\u043d\u044b\u0445 \u043f\u0440\u0438\u0441\u0443\u0442\u0441\u0442\u0432\u0443\u0435\u0442 \u0442\u0440\u0435\u043d\u0434 \u0438\u043b\u0438 \u0441\u0435\u0437\u043e\u043d\u043d\u043e\u0441\u0442\u044c, \u0442\u043e \u043c\u0430\u0442\u0435\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0435 \u043e\u0436\u0438\u0434\u0430\u043d\u0438\u0435 \u0431\u0443\u0434\u0435\u0442 \u0438\u043c\u0435\u0442\u044c \u0440\u0430\u0437\u043d\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0432 \u0440\u0430\u0437\u043d\u044b\u0445 \u0443\u0447\u0430\u0441\u0442\u043a\u0430\u0445 \u0441\u0435\u0440\u0438\u0438 \u2014 <img decoding=\"async\" src=\"http:\/\/habr.habrastorage.org\/post_images\/582\/dda\/a4c\/582ddaa4cdc1feca2d42daab4d29a29e.png\" height=\"25\"\/>, \u0447\u0442\u043e \u043d\u0435 \u0435\u0441\u0442\u044c \u0445\u043e\u0440\u043e\u0448\u043e. \u0414\u043b\u044f \u0438\u0437\u0431\u0435\u0436\u0430\u043d\u0438\u044f \u044d\u0442\u043e\u0433\u043e, \u0410RIMA \u043f\u0440\u0435\u0434\u043f\u043e\u043b\u0430\u0433\u0430\u0435\u0442 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u043d\u0435 \u0441 \u0438\u0441\u0445\u043e\u0434\u043d\u044b\u043c\u0438 \u0434\u0430\u043d\u043d\u044b\u043c\u0438, \u0430 \u0441 \u0438\u0445 \u0440\u0430\u0437\u043d\u043e\u0441\u0442\u044c\u044e (\u0442\u0430\u043a \u043d\u0430\u0437\u044b\u0432\u0430\u0435\u043c\u043e\u0435 \u0434\u0438\u0444\u0444\u0435\u0440\u0435\u043d\u0446\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u2014 \u043e\u0442 \u00abtaking a difference\u00bb). \u0412\u0441\u0435 \u0431\u044b \u0445\u043e\u0440\u043e\u0448\u043e, \u043d\u043e \u0442\u0443\u0442 \u0432\u043e\u0437\u043d\u0438\u043a\u0430\u044e\u0442 \u0434\u0432\u0435 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b \u2014 (\u0430) \u043c\u044b \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e \u0442\u0435\u0440\u044f\u0435\u043c \u0437\u043d\u0430\u0447\u0438\u043c\u0443\u044e \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u0431\u0435\u0440\u044f \u0440\u0430\u0437\u043d\u0438\u0446\u0443 \u0440\u044f\u0434\u0430, \u0438 (\u0431) \u0443\u043f\u0443\u0441\u043a\u0430\u0435\u0442\u0441\u044f \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0440\u0430\u0437\u043b\u043e\u0436\u0438\u0442\u044c \u0440\u044f\u0434 \u0434\u0430\u043d\u043d\u044b\u0445 \u043d\u0430 \u0441\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u044e\u0449\u0438\u0435 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u044b \u2014 \u0442\u0440\u0435\u043d\u0434, \u0446\u0438\u043a\u043b, \u0438 \u0442.\u043f. \u041f\u043e\u044d\u0442\u043e\u043c\u0443, \u0432 \u0434\u0430\u043d\u043d\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u044f \u0445\u043e\u0442\u0435\u043b \u0431\u044b \u043f\u0440\u0438\u0432\u0435\u0441\u0442\u0438 \u0430\u043b\u044c\u0442\u0435\u0440\u043d\u0430\u0442\u0438\u0432\u043d\u044b\u0439 \u043c\u0435\u0442\u043e\u0434 \u0430\u043d\u0430\u043b\u0438\u0437\u0430 \u2014 State Space Modeling (SSM), \u0432 \u0440\u0443\u0441\u0441\u043a\u043e\u043c \u043f\u0435\u0440\u0435\u0432\u043e\u0434\u0435 \u2014 \u041c\u043e\u0434\u0435\u043b\u044c \u041f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u0430 \u0421\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0439.<br \/>  <a name=\"habracut\"><\/a>  <\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u041f\u0440\u0438\u043c\u0435\u0447\u0430\u043d\u0438\u0435<\/b><\/p>\n<div class=\"spoiler_text\"> \u0414\u043b\u044f \u043c\u043d\u043e\u0433\u0438\u0445 \u0430\u043d\u0433\u043b\u043e\u044f\u0437\u044b\u0447\u043d\u044b\u0445 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u0439 \u0432 \u044d\u0442\u043e\u0439 \u0441\u0444\u0435\u0440\u0435 \u043f\u0435\u0440\u0435\u0432\u043e\u0434 \u043b\u0438\u0431\u043e \u043e\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0443\u0435\u0442, \u043b\u0438\u0431\u043e \u0440\u0430\u0437\u043d\u0438\u0442\u0441\u044f \u0443 \u0440\u0430\u0437\u043d\u044b\u0445 \u043f\u0435\u0440\u0435\u0432\u043e\u0434\u0447\u0438\u043a\u043e\u0432, \u043b\u0438\u0431\u043e \u0436\u0435 \u043a\u043e\u0440\u044f\u0432 \u0434\u043e \u043f\u043e\u043b\u043d\u043e\u0439 \u043d\u0435\u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0435\u0433\u043e \u0432 \u043f\u0440\u0438\u043b\u0438\u0447\u043d\u043e\u043c \u043e\u0431\u0449\u0435\u0441\u0442\u0432\u0435. \u041f\u043e\u044d\u0442\u043e\u043c\u0443, \u043c\u043d\u043e\u0433\u0438\u0435 \u0438\u043c\u0435\u043d\u0430 \u0438 \u043d\u0430\u0437\u0432\u0430\u043d\u0438\u044f \u0431\u0443\u0434\u0443\u0442 \u043f\u0440\u0438\u0432\u0435\u0434\u0435\u043d\u044b \u0432 \u0430\u043d\u0433\u043b\u0438\u0439\u0441\u043a\u043e\u043c \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u0435. \u0414\u043b\u044f \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u0443\u044e\u0449\u0438\u0445\u0441\u044f \u2014 \u043e\u0434\u043d\u0430 \u0438\u0437 \u043b\u0443\u0447\u0448\u0438\u0445 <a href=\"http:\/\/www.amazon.com\/Series-Analysis-Methods-Statistical-Science\/dp\/019964117X\">\u043a\u043d\u0438\u0433<\/a> \u043f\u043e \u043c\u043e\u0434\u0435\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044e SSM. \u0422\u0430\u043a\u0436\u0435 \u043e\u043a\u0430\u0437\u0430\u043b\u043e\u0441\u044c, \u0447\u0442\u043e \u0432 \u0440\u0443\u0441\u0441\u043a\u043e\u044f\u0437\u044b\u0447\u043d\u043e\u043c \u043f\u0435\u0440\u0435\u0432\u043e\u0434\u0435 \u0445\u043e\u0440\u043e\u0448\u0438\u0445 \u043a\u043d\u0438\u0433 \u043f\u043e \u0442\u0435\u043c\u0435 \u043f\u0440\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u043d\u0435\u0442. \u041a\u0430\u043a \u0432\u0430\u0440\u0438\u0430\u043d\u0442 \u2014 <a href=\"http:\/\/quantile.ru\/09\/09-Literacy.pdf\">\u0440\u0430\u0431\u043e\u0442\u0430<\/a> \u0410\u043b\u0435\u043a\u0441\u0430\u043d\u0434\u0440\u0430 \u0426\u044b\u043f\u043b\u0430\u043a\u043e\u0432\u0430, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0445\u043e\u0442\u044c \u0438 \u043e\u043f\u0443\u0431\u043b\u0438\u043a\u043e\u0432\u0430\u043d\u0430 \u043a\u0430\u043a \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u0430\u044f \u0441\u0442\u0430\u0442\u044c\u044f, \u043d\u043e \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0444\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u043a\u043e\u043f\u0438\u0435\u0439 \u043a\u043d\u0438\u0433\u0438 \u0432 \u043f\u0440\u0435\u0434\u0435\u043b\u044c\u043d\u043e \u0441\u043e\u043a\u0440\u0430\u0449\u0435\u043d\u043d\u043e\u043c \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u0435.<\/div>\n<\/div>\n<p>  \u0418\u0442\u0430\u043a, \u043f\u0440\u0438\u0441\u0442\u0443\u043f\u0438\u043c. <\/p>\n<h4>1. \u041d\u0430\u0447\u0430\u043b\u044c\u043d\u044b\u0439 \u0430\u043d\u0430\u043b\u0438\u0437 \u0434\u0430\u043d\u043d\u044b\u0445<\/h4>\n<p>  \u042d\u0442\u0430 \u0447\u0430\u0441\u0442\u044c \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043e\u0434\u043d\u043e\u0439 \u0438\u0437 \u0441\u0430\u043c\u044b\u0445 \u0432\u0430\u0436\u043d\u044b\u0445 \u0447\u0430\u0441\u0442\u0435\u0439 \u043f\u0440\u043e\u0446\u0435\u0441\u0441\u0430, \u0438\u0431\u043e \u0435\u0441\u043b\u0438 \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u043e\u0448\u0438\u0431\u043a\u0443 \u0441\u0435\u0439\u0447\u0430\u0441, \u0442\u043e \u0432\u0441\u044f \u043e\u0441\u0442\u0430\u043b\u044c\u043d\u0430\u044f \u0440\u0430\u0431\u043e\u0442\u0430 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u043f\u0440\u043e\u0441\u0442\u043e \u043f\u043e\u0442\u0435\u0440\u0435\u0439 \u0432\u0440\u0435\u043c\u0435\u043d\u0438. \u041e\u0442\u043a\u0440\u044b\u0432\u0430\u0435\u043c <a href=\"https:\/\/raw.github.com\/kuznetsovin\/DataScience\/master\/DataSets\/tovar_moving.csv\">\u0434\u0430\u043d\u043d\u044b\u0435<\/a> \u043f\u043e \u043e\u0442\u0433\u0440\u0443\u0437\u043a\u0435 \u0442\u043e\u0432\u0430\u0440\u0430 \u043d\u0430 \u043e\u0434\u043d\u043e\u043c \u0438\u0437 \u0441\u043a\u043b\u0430\u0434\u0441\u043a\u0438\u0445 \u043a\u043e\u043c\u043f\u043b\u0435\u043a\u0441\u043e\u0432 \u041f\u043e\u0434\u043c\u043e\u0441\u043a\u043e\u0432\u044c\u044f, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b\u0438\u0441\u044c \u0432 \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0435\u0439 \u0441\u0442\u0430\u0442\u044c\u0435. \u041f\u043e\u0441\u0442\u0440\u043e\u0438\u043c \u0433\u0440\u0430\u0444\u0438\u043a:<br \/>  <img decoding=\"async\" src=\"http:\/\/habr.habrastorage.org\/post_images\/f88\/a0d\/1dd\/f88a0d1ddb85be8134bcd2797dfbc6c8.jpg\"\/><br \/>  \u0412\u043e-\u043f\u0435\u0440\u0432\u044b\u0445, \u0437\u0434\u0435\u0441\u044c \u044f\u0432\u043d\u043e \u043f\u0440\u0438\u0441\u0443\u0442\u0441\u0442\u0432\u0443\u044e\u0442 \u0442\u0440\u0435\u043d\u0434 \u0438 \u0446\u0438\u043a\u043b \u0441 \u043f\u043e\u0440\u044f\u0434\u043a\u043e\u043c \u043e\u043a\u043e\u043b\u043e 300 \u0434\u043d\u0435\u0439. \u0422\u0435\u043f\u0435\u0440\u044c \u0437\u0430\u043a\u0440\u043e\u0435\u043c \u0433\u0440\u0430\u0444\u0438\u043a. \u0421\u0445\u043e\u0434\u0438\u043c \u043f\u043e\u043a\u0443\u0440\u0438\u043c. \u041f\u0440\u0438\u0434\u0435\u043c, \u043e\u0442\u043a\u0440\u043e\u0435\u043c \u0441\u043d\u043e\u0432\u0430 \u0438 \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u0443\u0436\u0435 \u043d\u0430 \u0441\u0430\u043c\u0438 \u0446\u0438\u0444\u0440\u044b. \u0414\u0430\u0442\u0430 \u043e\u0442\u0433\u0440\u0443\u0437\u043a\u0438 \u0443\u043a\u0430\u0437\u0430\u043d\u0430 \u0432 \u0444\u043e\u0440\u043c\u0430\u0442\u0435 01.09.2009, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043e\u0442\u043a\u0440\u044b\u0432\u0430\u0435\u043c \u0432 \u042d\u043a\u0441\u0435\u043b\u0435 \u0438 \u0435\u0441\u043b\u0438 \u043f\u0435\u0440\u0435\u0432\u0435\u0434\u0435\u043c \u0434\u0430\u043d\u043d\u044b\u0435 \u0432 \u0444\u043e\u0440\u043c\u0430\u0442 <i>[$-F800]dddd, mmmm dd, yyyy]<\/i>, \u0442\u0430\u043a \u0447\u0442\u043e\u0431\u044b \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u043b\u0441\u044f \u0434\u0435\u043d\u044c \u043d\u0435\u0434\u0435\u043b\u0438, \u0442\u043e \u0437\u0430\u043c\u0435\u0442\u0438\u043c, \u0447\u0442\u043e \u043e\u0431\u044b\u0447\u043d\u043e \u0432 \u0441\u0443\u0431\u0431\u043e\u0442\u0443 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u043f\u043e \u043e\u0442\u0433\u0440\u0443\u0437\u043a\u0435 \u043d\u0430\u043c\u043d\u043e\u0433\u043e \u043c\u0435\u043d\u044c\u0448\u0435 \u0447\u0435\u043c \u0432 \u043e\u0441\u0442\u0430\u043b\u044c\u043d\u044b\u0435 \u0434\u043d\u0438 \u043d\u0435\u0434\u0435\u043b\u0438. \u0414\u043b\u044f \u043f\u0440\u0438\u043c\u0435\u0440\u0430 \u0434\u0432\u0435 \u043d\u0435\u0434\u0435\u043b\u0438 \u043f\u0440\u0438\u0432\u0435\u0434\u0435\u043d\u044b \u043d\u0430 \u0413\u0440\u0430\u0444\u0438\u043a\u0435 1. \u0412 \u043e\u0431\u0449\u0435\u043c, \u0433\u0440\u0443\u0437\u0447\u0438\u043a \u0434\u044f\u0434\u044f \u0412\u0430\u0441\u044f \u0432 \u0441\u0443\u0431\u0431\u043e\u0442\u0443 \u0443\u0445\u043e\u0434\u0438\u0442 \u0434\u043e\u043c\u043e\u0439 \u043f\u043e\u0440\u0430\u043d\u044c\u0448\u0435 \u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u0444\u0443\u0442\u0431\u043e\u043b, \u0430 \u043d\u0430\u043c \u0438\u0437-\u0437\u0430 \u044d\u0442\u043e\u0433\u043e \u043f\u0440\u0438\u0434\u0435\u0442\u0441\u044f \u0434\u043e\u043f\u043e\u043b\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0443\u0447\u0438\u0442\u044b\u0432\u0430\u0442\u044c \u043f\u0440\u0438\u0441\u0443\u0442\u0441\u0442\u0432\u0438\u0435 \u043c\u0438\u043a\u0440\u043e\u0446\u0438\u043a\u043b\u0430 \u0441 \u0441\u0435\u0437\u043e\u043d\u043d\u043e\u0441\u0442\u044c\u044e \u0432 7 \u0434\u043d\u0435\u0439. \u041a\u0441\u0442\u0430\u0442\u0438, \u043c\u044b \u043d\u0435 \u0431\u0443\u0434\u0435\u043c \u043f\u0435\u0440\u0435\u0432\u043e\u0434\u0438\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0435 \u0432 \u043d\u0435\u0434\u0435\u043b\u044c\u043d\u044b\u0439 \u0438\u043d\u0442\u0435\u0440\u0432\u0430\u043b \u043a\u0430\u043a \u0432 \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0435\u0439 \u0441\u0442\u0430\u0442\u044c\u0435, \u0430 \u043f\u0440\u043e\u0434\u043e\u043b\u0436\u0438\u043c \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u0441 \u0434\u043d\u0435\u0432\u043d\u044b\u043c\u0438 \u0434\u0430\u043d\u043d\u044b\u043c\u0438.<\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u0413\u0440\u0430\u0444\u0438\u043a 1<\/b><\/p>\n<div class=\"spoiler_text\"><img decoding=\"async\" src=\"http:\/\/habr.habrastorage.org\/post_images\/517\/bb8\/b8b\/517bb8b8b52f86d24cea89867bf60a0a.jpg\" width=\"600\"\/>  <\/div>\n<\/div>\n<p>  <\/p>\n<h4>2. State Space Modes<\/h4>\n<p>  \u0417\u0434\u0435\u0441\u044c \u044f \u043f\u043e\u043f\u044b\u0442\u0430\u044e\u0441\u044c \u043f\u0440\u0438\u0432\u0435\u0441\u0442\u0438 \u043c\u0438\u043d\u0438\u043c\u0443\u043c \u0442\u0435\u043e\u0440\u0438\u0438, \u0434\u0435\u0442\u0430\u043b\u044c\u043d\u0435\u0435 \u043f\u043e\u0447\u0435\u043c\u0443 \u0438 \u043e\u0442\u043a\u0443\u0434\u0430 \u0431\u0435\u0440\u0443\u0442\u0441\u044f \u0432\u0441\u0435 \u0444\u043e\u0440\u043c\u0443\u043b\u044b \u043c\u043e\u0436\u043d\u043e \u043f\u0440\u043e\u0447\u0438\u0442\u0430\u0442\u044c \u0432 \u043a\u043d\u0438\u0433\u0435 \u0438\u043b\u0438 \u044f \u043e\u0442\u0432\u0435\u0447\u0443 \u0432 \u043a\u043e\u043c\u043c\u0435\u043d\u0442\u0430\u0440\u0438\u044f\u0445. <br \/>  \u0414\u043e\u043f\u0443\u0441\u0442\u0438\u043c, \u0438\u043c\u0435\u0435\u0442\u0441\u044f \u043d\u0435\u043a\u0438\u0439 \u0432\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 \u0440\u044f\u0434 <img decoding=\"async\" src=\"http:\/\/habr.habrastorage.org\/post_images\/842\/84b\/dbf\/84284bdbf413eff949618e34843b455a.png\" height=\"25\"\/>, \u0432 \u043d\u0430\u0448\u0435\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u2014 \u0434\u0430\u043d\u043d\u044b\u0435 \u043f\u043e \u043e\u0442\u0433\u0440\u0443\u0437\u043a\u0435 \u0442\u043e\u0432\u0430\u0440\u0430. \u041a\u0430\u043a \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e \u0443\u043a\u0430\u0437\u0430\u043b <a href=\"http:\/\/habrahabr.ru\/users\/kuznetsovin\/\" class=\"user_link\">kuznetsovin<\/a> \u0432 \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0435\u0439 \u0441\u0442\u0430\u0442\u044c\u0435, \u0434\u0430\u043d\u043d\u044b\u0435 \u044f\u0432\u043d\u043e \u044f\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u043d\u0435\u0441\u0442\u0430\u0446\u0438\u043e\u043d\u0430\u0440\u043d\u044b\u043c \u0440\u044f\u0434\u043e\u043c \u0441 \u043f\u043e\u0440\u044f\u0434\u043a\u043e\u043c \u0438\u043d\u0442\u0435\u0433\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0440\u0430\u0432\u043d\u043e\u043c 1, \u0438 \u043f\u0440\u043e\u0446\u0435\u0434\u0443\u0440\u0430 ARIMA \u0442\u0440\u0435\u0431\u043e\u0432\u0430\u043b\u0430 \u0431\u044b \u0434\u0438\u0444\u0444\u0435\u0440\u0435\u043d\u0446\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0440\u044f\u0434\u043e\u0432. \u041d\u043e \u0442\u0430\u043a \u043a\u0430\u043a \u043c\u044b \u044d\u0442\u043e\u0433\u043e \u0434\u0435\u043b\u0430\u0442\u044c \u043d\u0435 \u0445\u043e\u0442\u0438\u043c, \u0442\u043e \u0441\u043b\u0435\u0434\u0443\u044f Harvey [1993], \u0434\u043e\u043f\u0443\u0441\u0442\u0438\u043c \u0447\u0442\u043e \u0434\u0430\u043d\u043d\u044b\u0439 \u0440\u044f\u0434 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d \u043a\u0430\u043a \u043c\u043e\u0434\u0435\u043b\u044c \u0441 \u043d\u0435\u043d\u0430\u0431\u043b\u044e\u0434\u0430\u0435\u043c\u044b\u043c\u0438 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u0430\u043c\u0438 (Unobservable \u0421omponent model):<br \/>  <img decoding=\"async\" src=\"http:\/\/habr.habrastorage.org\/post_images\/b0f\/bf2\/500\/b0fbf25002b312a48f6831b526264a84.png\" width=\"600\"\/><br \/>  \u0433\u0434\u0435 <img decoding=\"async\" src=\"http:\/\/habr.habrastorage.org\/post_images\/842\/84b\/dbf\/84284bdbf413eff949618e34843b455a.png\" height=\"25\"\/> \u2014 \u043d\u0430\u0431\u043b\u044e\u0434\u0430\u0435\u043c\u044b\u0439 \u0440\u044f\u0434 \u0432 \u043c\u043e\u043c\u0435\u043d\u0442 \u0432\u0440\u0435\u043c\u0435\u043d\u0438 <i>t<\/i>, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0441\u043e\u0441\u0442\u043e\u0438\u0442 \u0438\u0437 \u043d\u0435\u043d\u0430\u0431\u043b\u044e\u0434\u0430\u0435\u043c\u044b\u0445 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442: \u0442\u0440\u0435\u043d\u0434\u0430 <img decoding=\"async\" src=\"http:\/\/habr.habrastorage.org\/post_images\/5ec\/c31\/1dc\/5ecc311dcc0d901785277b79e5347932.png\" height=\"25\"\/>, \u0446\u0438\u043a\u043b\u0430 <img decoding=\"async\" src=\"http:\/\/habr.habrastorage.org\/post_images\/fc8\/4e0\/afb\/fc84e0afb2a46ce1931fc52625268577.png\" height=\"25\"\/>, \u0441\u0435\u0437\u043e\u043d\u043d\u043e\u0439 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 <img decoding=\"async\" src=\"http:\/\/habr.habrastorage.org\/post_images\/cd0\/4f9\/aa9\/cd04f9aa9c8526748b185a31b887e88e.png\" height=\"25\"\/> (\u0432 \u043d\u0430\u0448\u0435\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u0440\u0430\u0432\u043d\u043e\u0439 \u043e\u0434\u043d\u043e\u0439 \u043d\u0435\u0434\u0435\u043b\u0435), \u0438 \u043e\u0448\u0438\u0431\u043a\u0438 <img decoding=\"async\" src=\"http:\/\/habr.habrastorage.org\/post_images\/a1a\/6c3\/9d6\/a1a6c39d637153ac6990ce7cb8717929.png\" height=\"25\"\/>, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043d\u043e\u0440\u043c\u0430\u043b\u044c\u043d\u043e \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0430 \u043a\u0430\u043a \u0431\u0435\u043b\u044b\u0439 \u0448\u0443\u043c <img decoding=\"async\" src=\"http:\/\/habr.habrastorage.org\/post_images\/e5c\/15d\/b5d\/e5c15db5d3ba676e25d43efcd306345a.png\" height=\"30\"\/>.<\/p>\n<p>  \u0422\u0440\u0435\u043d\u0434 \u043c\u043e\u0436\u043d\u043e \u0440\u0430\u0437\u043d\u043e\u043e\u0431\u0440\u0430\u0437\u0438\u0442\u044c, \u043f\u043e\u0441\u0442\u0440\u043e\u0438\u0432 \u0435\u0433\u043e \u0432 \u0432\u0438\u0434\u0435 \u043c\u043e\u0434\u0435\u043b\u0438 \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u043b\u0438\u043d\u0435\u0439\u043d\u043e\u0433\u043e \u0442\u0440\u0435\u043d\u0434\u0430:<br \/>  <img decoding=\"async\" src=\"http:\/\/habr.habrastorage.org\/post_images\/828\/686\/294\/8286862948b7c265fbe1699c36375b6b.png\" width=\"600\"\/><br \/>  \u0433\u0434\u0435 (2) \u2014 \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u0442\u0440\u0435\u043d\u0434 \u0438 (3) \u2014 \u043d\u0430\u043a\u043b\u043e\u043d \u0442\u0440\u0435\u043d\u0434\u0430, \u043a\u0430\u0436\u0434\u044b\u0439 \u0441\u043e \u0441\u0432\u043e\u0438\u043c\u0438 \u043e\u0448\u0438\u0431\u043a\u0430\u043c\u0438. \u0422\u0430\u043a\u0430\u044f \u043c\u043e\u0434\u0435\u043b\u044c \u0434\u0430\u0435\u0442 \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u043e \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u043e\u0432 \u043c\u043e\u0434\u0435\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0442\u0440\u0435\u043d\u0434\u0430, \u043e\u0442 random walk with drift \u0434\u043e integrated random walk model. \u041c\u043d\u043e\u0433\u0438\u0435 \u044d\u043a\u043e\u043d\u043e\u043c\u0435\u0442\u0440\u0438\u0441\u0442\u044b \u0447\u0430\u0441\u0442\u043e \u0443\u0431\u0438\u0440\u0430\u044e\u0442 \u043e\u0448\u0438\u0431\u043a\u0443 \u0432 (2) \u0447\u0442\u043e\u0431\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c <s>\u0447\u043e\u0442\u043a\u0438\u0439<\/s> \u0433\u043b\u0430\u0434\u043a\u0438\u0439 \u0442\u0440\u0435\u043d\u0434, \u0430 \u0432\u0441\u0435 \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u044b\u0435 \u043e\u0448\u0438\u0431\u043a\u0438 \u043f\u0440\u0438\u0441\u0432\u043e\u0438\u0442\u044c \u043d\u0430\u043a\u043b\u043e\u043d\u0443 \u0442\u0440\u0435\u043d\u0434\u0430.<\/p>\n<p>  \u0421\u0442\u043e\u0445\u0430\u0441\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0439 \u0446\u0438\u043a\u043b \u043c\u043e\u0434\u0435\u043b\u0438\u0440\u0443\u0435\u0442\u0441\u044f \u0432 \u0432\u0438\u0434\u0435 \u0441\u0443\u043c\u043c\u044b \u0442\u0440\u0438\u0433\u043e\u043d\u043e\u043c\u0435\u0442\u0440\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u0444\u0443\u043d\u043a\u0446\u0438\u0439 \u0438 \u0438\u0445 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u043d\u044b\u0445:<br \/>  <img decoding=\"async\" src=\"http:\/\/habr.habrastorage.org\/post_images\/cb8\/1aa\/157\/cb81aa15745c92b931e4465daa5b2986.png\" width=\"600\"\/><br \/>  \u0433\u0434\u0435 <img decoding=\"async\" src=\"http:\/\/habr.habrastorage.org\/post_images\/6ba\/6f8\/f67\/6ba6f8f67c455c27615c61f7b3f6168e.png\" height=\"22\"\/> \u043e\u0431\u043e\u0437\u043d\u0430\u0447\u0430\u0435\u0442 \u0447\u0430\u0441\u0442\u043e\u0442\u0443 \u0446\u0438\u043a\u043b\u0430, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0438\u0437\u043c\u0435\u0440\u044f\u0435\u0442\u0441\u044f \u0432 \u0440\u0430\u0434\u0438\u0430\u043d\u0430\u0445 <img decoding=\"async\" src=\"http:\/\/habr.habrastorage.org\/post_images\/bac\/a53\/441\/baca5344187e46f28295c597cd1cff68.png\" height=\"25\"\/> \u0441 \u043f\u0435\u0440\u0438\u043e\u0434\u043e\u043c \u0446\u0438\u043a\u043b\u0430 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0435\u043d\u043d\u043e <img decoding=\"async\" src=\"http:\/\/habr.habrastorage.org\/post_images\/f5d\/dbc\/ea5\/f5ddbcea54049c5e67b59002c20d9014.png\" height=\"25\"\/>. \u0415\u0441\u043b\u0438 \u0435\u0441\u0442\u044c \u043d\u0430\u0441\u0442\u0440\u043e\u0435\u043d\u0438\u0435 \u0438 \u043b\u0438\u0448\u043d\u0435\u0435 \u0432\u0440\u0435\u043c\u044f, \u043c\u043e\u0436\u043d\u043e \u0434\u043e\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u0447\u0442\u043e \u0447\u0430\u0441\u0442\u043e\u0442\u0430 \u0438\u0437\u043c\u0435\u043d\u044f\u0435\u0442\u0441\u044f \u0441\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u0435\u043c: <img decoding=\"async\" src=\"http:\/\/habr.habrastorage.org\/post_images\/f6b\/1da\/7bc\/f6b1da7bc21bed3672570329d49b7d58.png\" height=\"25\"\/>, \u043d\u043e \u043c\u044b \u0437\u0430\u043a\u0440\u043e\u0435\u043c \u0433\u043b\u0430\u0437\u0430 \u0438 \u0434\u043e\u043f\u0443\u0441\u0442\u0438\u043c \u0447\u0442\u043e \u0446\u0438\u043a\u043b \u0443 \u043d\u0430\u0441 \u0432\u043f\u043e\u043b\u043d\u0435 \u0441\u0442\u0430\u0446\u0438\u043e\u043d\u0430\u0440\u0435\u043d. \u041a\u043e\u044d\u0444\u0444\u0438\u0446\u0438\u0435\u043d\u0442 \u0437\u0430\u0442\u0443\u0445\u0430\u043d\u0438\u044f \u043e\u0442\u0432\u0435\u0447\u0430\u0435\u0442 \u0437\u0430 \u0442\u043e, \u0447\u0442\u043e\u0431\u044b \u043d\u0430\u0448 \u0446\u0438\u043a\u043b \u043d\u0435 \u0432\u044b\u043b\u0435\u0442\u0435\u043b \u0437\u0430 \u0440\u0430\u0437\u0443\u043c\u043d\u044b\u0435 \u043f\u0440\u0435\u0434\u0435\u043b\u044b: <img decoding=\"async\" src=\"http:\/\/habr.habrastorage.org\/post_images\/31c\/81e\/101\/31c81e101ef82fbbb2adf4851bbcd476.png\" height=\"30\"\/>. <\/p>\n<p>  \u041d\u0443 \u0438 \u043d\u0430\u043f\u043e\u0441\u043b\u0435\u0434\u043e\u043a, \u043d\u0435\u0434\u0435\u043b\u044c\u043d\u044b\u0439 \u043c\u0438\u043a\u0440\u043e\u0446\u0438\u043a\u043b \u0441 \u043f\u0435\u0440\u0438\u043e\u0434\u043e\u043c s=7 \u0442\u0430\u043a\u0436\u0435 \u043f\u043e\u0441\u0442\u0440\u043e\u0438\u043c \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 \u0441\u0443\u043c\u043c\u044b \u0442\u0440\u0438\u0433\u043e\u043d\u043e\u043c\u0435\u0442\u0440\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u0444\u0443\u043d\u043a\u0446\u0438\u0439:<br \/>  <img decoding=\"async\" src=\"http:\/\/habr.habrastorage.org\/post_images\/ee4\/705\/fee\/ee4705feed38c8519a168e7a766f1e24.png\" width=\"600\"\/><\/p>\n<p>  \u0422\u0435\u043f\u0435\u0440\u044c \u043e\u0441\u0442\u0430\u043b\u043e\u0441\u044c \u0432\u0441\u0435 \u0432\u044b\u0448\u0435\u043f\u0440\u0438\u0432\u0435\u0434\u0435\u043d\u043d\u044b\u0435 \u0444\u043e\u0440\u043c\u0443\u043b\u044b \u043e\u0440\u0433\u0430\u043d\u0438\u0437\u043e\u0432\u0430\u0442\u044c \u0432 \u0442\u0430\u043a \u043d\u0430\u0437\u044b\u0432\u0430\u0435\u043c\u044b\u0439 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u043d\u044b\u0439 \u0444\u043e\u0440\u043c\u0430\u0442 \u043f\u043e\u0434\u0445\u043e\u0434\u044f\u0449\u0438\u0439 \u0434\u043b\u044f \u0444\u0438\u043b\u044c\u0442\u0440\u0430 \u041a\u0430\u043b\u043c\u0430\u043d\u0430: <br \/>  \u0423\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u0435 \u0438\u0437\u043c\u0435\u0440\u0435\u043d\u0438\u044f (measurement equation) \u043e\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u0442 \u0434\u0430\u043d\u043d\u044b\u0435 \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043c\u044b \u043d\u0430\u0431\u043b\u044e\u0434\u0430\u0435\u043c:<br \/>  <img decoding=\"async\" src=\"http:\/\/habr.habrastorage.org\/post_images\/962\/ff2\/7bc\/962ff27bc9e40f03ed50dd2704be4bec.png\" width=\"600\"\/><br \/>  \u0438 \u0443\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u0435 \u043f\u0435\u0440\u0435\u0445\u043e\u0434\u0430 (transition equation) \u2014 \u043e\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u0442 \u0434\u0438\u043d\u0430\u043c\u0438\u043a\u0443 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0441\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u044e\u0442 <img decoding=\"async\" src=\"http:\/\/habr.habrastorage.org\/post_images\/842\/84b\/dbf\/84284bdbf413eff949618e34843b455a.png\" height=\"25\"\/>, \u043d\u043e \u043c\u044b \u0438\u0445 \u043d\u0435 \u0432\u0438\u0434\u0438\u043c (\u0442\u0430\u043a \u043d\u0430\u0437\u044b\u0432\u0430\u0435\u043c\u044b\u0435 unobserved \u0438\u043b\u0438 \u043b\u0430\u0442\u0435\u043d\u0442\u043d\u044b\u0435 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435):<br \/>  <img decoding=\"async\" src=\"http:\/\/habr.habrastorage.org\/post_images\/061\/835\/92f\/06183592f63d58723b8ef74c119eebf8.png\" width=\"600\"\/><\/p>\n<p>  \u0412 \u043d\u0430\u0448\u0435\u043c \u0441\u043b\u0443\u0447\u0430\u0435, \u0438\u043c\u0435\u0435\u0442\u0441\u044f 10 \u043b\u0430\u0442\u0435\u043d\u0442\u043d\u044b\u0445 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445 \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0431\u044b\u043b\u0438 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u044b \u0432 \u0443\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u044f\u0445 (2)-(6):<br \/>  <img decoding=\"async\" src=\"http:\/\/habr.habrastorage.org\/post_images\/831\/034\/c34\/831034c34ac44f80e839f814b5b2fc7c.png\" width=\"600\"\/><\/p>\n<p>  \u0422\u0435\u043f\u0435\u0440\u044c \u043f\u0435\u0440\u0435\u0432\u0435\u0434\u0435\u043c \u0432\u0441\u0435 \u0432\u044b\u0448\u0435\u043f\u0440\u0438\u0432\u0435\u0434\u0435\u043d\u043d\u044b\u0435 \u0444\u043e\u0440\u043c\u0443\u043b\u044b \u0432 \u043c\u0430\u0442\u0440\u0438\u0447\u043d\u044b\u0439 \u0444\u043e\u0440\u043c\u0430\u0442. <br \/>  \u041c\u0430\u0442\u0440\u0438\u0446\u0430 \u043f\u0435\u0440\u0435\u0445\u043e\u0434\u0430 \u0432 (7):<br \/>  <img decoding=\"async\" src=\"http:\/\/habr.habrastorage.org\/post_images\/e7a\/c1b\/b78\/e7ac1bb78f5a28a722c69d10946c0441.png\" width=\"600\"\/><\/p>\n<p>  \u041d\u0435\u0441\u043b\u0430\u0431\u0430\u044f \u0442\u0430\u043a\u0430\u044f \u043c\u0430\u0442\u0440\u0438\u0446\u0430 \u0434\u0438\u043d\u0430\u043c\u0438\u043a\u0438 \u043b\u0430\u0442\u0435\u043d\u0442\u043d\u044b\u0445 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445 \u0432 (8):<br \/>  <img decoding=\"async\" src=\"http:\/\/habr.habrastorage.org\/post_images\/165\/8e2\/df6\/1658e2df6262cc5c4065c8beea6675b0.png\" width=\"600\"\/><\/p>\n<p>  \u0412\u0435\u043a\u0442\u043e\u0440 \u0432\u0441\u0435\u0445 \u043e\u0448\u0438\u0431\u043e\u043a \u0432\u0441\u0435\u0445 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0439 (2)-(6):<br \/>  <img decoding=\"async\" src=\"http:\/\/habr.habrastorage.org\/post_images\/a1b\/3a6\/219\/a1b3a62196956acb6d694598bc53cd64.png\" width=\"600\"\/><br \/>  \u043e\u0442\u043e\u0440\u044b\u0439 \u0432\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u0432 \u0443\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u044f \u0434\u0438\u043d\u0430\u043c\u0438\u043a\u0438 (8) \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043c\u0430\u0442\u0440\u0438\u0446\u044b <img decoding=\"async\" src=\"http:\/\/habr.habrastorage.org\/post_images\/3c9\/5c0\/e18\/3c95c0e18c33072feb720916177e1e69.png\" height=\"25\"\/>.<\/p>\n<p>  \u0418, \u043d\u0430\u043a\u043e\u043d\u0435\u0446, \u043c\u0430\u0442\u0440\u0438\u0446\u0430 \u0432\u0430\u0440\u0438\u0430\u0446\u0438\u0439 \u0432\u0441\u0435\u0445 \u043e\u0448\u0438\u0431\u043e\u043a \u0438 \u043f\u0435\u0440\u0442\u0443\u0440\u0431\u0430\u0446\u0438\u0439 \u0432 (8):<br \/>  <img decoding=\"async\" src=\"http:\/\/habr.habrastorage.org\/post_images\/f4f\/d72\/ea1\/f4fd72ea1ba1af1114b45e2374b63c1e.png\" width=\"600\"\/><\/p>\n<h4>3. \u0424\u0438\u043b\u044c\u0442\u0440 \u0438 \u0421\u0433\u043b\u0430\u0436\u0438\u0432\u0430\u0442\u0435\u043b\u044c \u041a\u0430\u043b\u043c\u0430\u043d\u0430<\/h4>\n<p>  \u041e\u043a, \u0442\u0435\u043f\u0435\u0440\u044c \u043c\u044b \u0433\u043e\u0442\u043e\u0432\u044b \u043a\u0443\u0440\u0438\u0442\u044c \u041a\u0430\u043b\u043c\u0430\u043d. \u041e\u0431 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u0435 \u0444\u0438\u043b\u044c\u0442\u0440\u0430 \u0443\u0436\u0435 <a href=\"http:\/\/habrahabr.ru\/post\/140274\/\">\u043d\u0435\u043e\u0434\u043d\u043e\u043a\u0440\u0430\u0442\u043d\u043e<\/a> <a href=\"http:\/\/habrahabr.ru\/post\/166693\/\">\u043f\u0438\u0441\u0430\u043b\u0438<\/a>, \u0440\u0430\u0437\u0432\u0435 \u0447\u0442\u043e \u0443 \u043d\u0430\u0441 \u043d\u0435\u043c\u043d\u043e\u0433\u043e \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u044b <s>\u0438\u043c\u0435\u043d\u0430 \u0438 \u0444\u0430\u043c\u0438\u043b\u0438\u0438<\/s> \u043e\u0431\u043e\u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445. \u041f\u043e\u044d\u0442\u043e\u043c\u0443 \u043e\u0441\u043e\u0431\u043e \u043e\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u0442\u044c\u0441\u044f \u043d\u0430 \u0442\u0435\u043e\u0440\u0438\u0438 \u043d\u0435 \u0431\u0443\u0434\u0435\u043c, \u043a\u0440\u0430\u0442\u0435\u043d\u044c\u043a\u043e \u0442\u043e\u043b\u044c\u043a\u043e \u0442\u0430\u043a, \u043c\u0438\u043d\u0443\u0442 \u043d\u0430 \u0441\u043e\u0440\u043e\u043a. \u0418\u0442\u0430\u043a, \u0435\u0441\u0442\u044c \u0432\u0438\u0434\u0438\u043c\u0430\u044f \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0430\u044f <img decoding=\"async\" src=\"http:\/\/habr.habrastorage.org\/post_images\/842\/84b\/dbf\/84284bdbf413eff949618e34843b455a.png\" height=\"25\"\/>, \u0438 \u043d\u0430\u0431\u043e\u0440 \u043d\u0435\u0432\u0438\u0434\u0438\u043c\u044b\u0445 <img decoding=\"async\" src=\"http:\/\/habr.habrastorage.org\/post_images\/5eb\/89e\/fbf\/5eb89efbfffe9881e7768ac47ca4410b.png\" height=\"25\"\/>, \u0434\u043b\u044f \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u043c\u044b \u043f\u0440\u0438\u0434\u0443\u043c\u0430\u043b\u0438 \u0434\u0438\u043d\u0430\u043c\u0438\u043a\u0443 \u0438 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0443 \u0432 (8)-(14), \u0438 \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043c\u044b \u0438 \u0441\u0442\u0430\u0440\u0430\u0435\u043c\u0441\u044f \u043f\u0440\u043e\u0441\u0447\u0438\u0442\u0430\u0442\u044c <s>\u0432 \u043f\u043e\u043f\u0443\u0433\u0430\u044f\u0445<\/s> \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0444\u0438\u043b\u044c\u0442\u0440\u0430 \u041a\u0430\u043b\u043c\u0430\u043d\u0430. \u0422\u0430\u043a \u043a\u0430\u043a \u043b\u0430\u0442\u0435\u043d\u0442\u043d\u044b\u0435 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u044f \u043d\u0435\u0432\u0438\u0434\u0438\u043c\u044b, \u043c\u043e\u0434\u0435\u043b\u044c \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u043d\u0435 \u043e\u0441\u043e\u0431\u043e \u0432\u0435\u0440\u043d\u0430, \u0434\u0430 \u0438 \u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u043e \u043f\u0440\u0438\u0441\u0442\u0443\u0442\u0441\u0442\u0432\u0443\u044e\u0442 \u0440\u0430\u0437\u043d\u044b\u0435 \u043e\u0448\u0438\u0431\u043a\u0438 \u0438\u0437\u043c\u0435\u0440\u0435\u043d\u0438\u044f, \u0442\u043e \u0441\u0430\u043c\u0443 <img decoding=\"async\" src=\"http:\/\/habr.habrastorage.org\/post_images\/5eb\/89e\/fbf\/5eb89efbfffe9881e7768ac47ca4410b.png\" height=\"25\"\/> \u043c\u044b \u0432\u0440\u044f\u0434 \u043b\u0438 \u0432\u0441\u0442\u0440\u0435\u0442\u0438\u043c, \u0430 \u0442\u043e\u043b\u044c\u043a\u043e \u0435\u0435 \u043c\u0430\u0442\u0435\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0435 \u043e\u0436\u0438\u0434\u0430\u043d\u0438\u0435 \u0432 \u043c\u043e\u043c\u0435\u043d\u0442 \u0432\u0440\u0435\u043c\u0435\u043d\u0438 <i>t<\/i> \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 \u043d\u0430\u0431\u043b\u044e\u0434\u0430\u0435\u043c\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445 <i>1,..,t-1<\/i>: <img decoding=\"async\" src=\"http:\/\/habr.habrastorage.org\/post_images\/01e\/d36\/34a\/01ed3634a5afb3db2e44309fa059ef76.png\" height=\"30\"\/>, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u043e\u0431\u043b\u0430\u0434\u0430\u0435\u0442 \u0434\u0438\u0441\u043f\u0435\u0440\u0441\u0438\u0435\u0439 <img decoding=\"async\" src=\"http:\/\/habr.habrastorage.org\/post_images\/c8f\/39f\/a01\/c8f39fa0111ea896251c1a25f38f0842.png\" height=\"25\"\/>.<\/p>\n<p>  \u041f\u0440\u0435\u0434\u043f\u043e\u043b\u043e\u0436\u0438\u043c, \u0447\u0442\u043e \u043d\u0430\u0447\u0430\u043b\u044c\u043d\u044b\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f <img decoding=\"async\" src=\"http:\/\/habr.habrastorage.org\/post_images\/358\/a15\/f1a\/358a15f1af2e54f5401d9a78701881bc.png\" height=\"25\"\/> \u0438\u0437\u0432\u0435\u0441\u0442\u043d\u044b (\u0432 \u043f\u0440\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0439 \u0447\u0430\u0441\u0442\u0438 \u0440\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u0430 \u043c\u044b \u043f\u0440\u043e\u0441\u0442\u043e \u0437\u0430\u0434\u0430\u0434\u0438\u043c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0441 \u043f\u043e\u0442\u043e\u043b\u043a\u0430), \u0444\u0438\u043b\u044c\u0442\u0440 \u041a\u0430\u043b\u043c\u0430\u043d\u0430 \u0441\u043e\u0441\u0442\u043e\u0438\u0442 \u0438\u0437 \u043d\u0430\u0431\u043e\u0440\u0430 \u0438\u0442\u0435\u0440\u0430\u0446\u0438\u0439:<br \/>  <img decoding=\"async\" src=\"http:\/\/habr.habrastorage.org\/post_images\/43d\/a97\/4c9\/43da974c91ce506e25569de57adbebca.png\" width=\"600\"\/><br \/>  \u0433\u0434\u0435 <img decoding=\"async\" src=\"http:\/\/habr.habrastorage.org\/post_images\/733\/fe6\/f05\/733fe6f05e2b4570016b9da9b21462d4.png\" height=\"25\"\/> \u2013 \u043e\u0448\u0438\u0431\u043a\u0430 \u043e\u0434\u043d\u043e\u0440\u0430\u0437\u043e\u0432\u043e\u0433\u043e \u043f\u0440\u043e\u0433\u043d\u043e\u0437\u0430 \u0441 \u0432\u0430\u0440\u0438\u0430\u0446\u0438\u0435\u0439 <img decoding=\"async\" src=\"http:\/\/habr.habrastorage.org\/post_images\/dca\/225\/13c\/dca22513c08d337ac47c01a9c3582327.png\" height=\"25\"\/>, <img decoding=\"async\" src=\"http:\/\/habr.habrastorage.org\/post_images\/75b\/251\/179\/75b2511792215504a3683bf7ec76cf78.png\" height=\"25\"\/> \u2014 \u043a\u0430\u043b\u043c\u0430\u043d\u043e\u0432\u0441\u043a\u0438\u0439 \u043a\u043e\u044d\u0444\u0444\u0438\u0446\u0438\u0435\u043d\u0442 \u0443\u0441\u0438\u043b\u0435\u043d\u0438\u044f (Kalman gain), \u043d\u0443 \u0438 \u0442\u0430\u043a \u0434\u0430\u043b\u0435\u0435. \u0412 \u043e\u0431\u0449\u0435\u043c, \u0442\u0435\u043e\u0440\u0438\u044f \u0438 \u0432 \u0410\u0444\u0440\u0438\u043a\u0435 \u043e\u0434\u043d\u0430 \u0438 \u0442\u0430 \u0436\u0435 \u2014 \u0447\u0442\u043e \u0432 \u0444\u0438\u0437\u0438\u043a\u0435, \u0447\u0442\u043e \u0432 \u0433\u0435\u043e\u043b\u043e\u043a\u0430\u0446\u0438\u0438. \u0422\u043e\u043b\u044c\u043a\u043e \u043e\u0431\u043e\u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445 \u043c\u0435\u043d\u044f\u044e\u0442\u0441\u044f \u043f\u043e \u0436\u0435\u043b\u0430\u043d\u0438\u044e \u0430\u0432\u0442\u043e\u0440\u0430. <\/p>\n<p>  \u0412 \u0434\u043e\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u0435 \u043a \u043f\u0440\u043e\u0441\u0447\u0438\u0442\u044b\u0432\u0430\u043d\u0438\u044e \u0432\u0435\u043a\u0442\u043e\u0440\u0430 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0439, \u043d\u0430\u043c \u0435\u0449\u0435 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u043e \u043d\u0430\u0439\u0442\u0438 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0435 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u043c\u043e\u0434\u0435\u043b\u0438, \u0442\u0430\u043a\u0438\u0435, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043a\u0430\u043a \u0432\u0430\u0440\u0438\u0430\u0446\u0438\u044f \u043e\u0448\u0438\u0431\u043e\u043a, \u0447\u0430\u0441\u0442\u043e\u0442\u0430 \u0446\u0438\u043a\u043b\u0430, \u0438 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440 \u0437\u0430\u0442\u0443\u0445\u0430\u043d\u0438\u044f \u0446\u0438\u043a\u043b\u0430. \u041e\u0431\u0437\u043e\u0432\u0435\u043c \u0432\u0435\u043a\u0442\u043e\u0440 \u0438\u0441\u043a\u043e\u043c\u044b\u0445 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432 \u043a\u0430\u043a <img decoding=\"async\" src=\"http:\/\/habr.habrastorage.org\/post_images\/cb4\/6df\/d4c\/cb46dfd4c5c4bc9c3e118ab3be5df1d4.png\" height=\"35\"\/>. \u0422\u043e\u0433\u0434\u0430 \u0435\u0441\u043b\u0438 <img decoding=\"async\" src=\"http:\/\/habr.habrastorage.org\/post_images\/806\/1c6\/921\/8061c692170d4a55f7d331ff96bed617.png\" height=\"25\"\/> \u0438 <img decoding=\"async\" src=\"http:\/\/habr.habrastorage.org\/post_images\/3c9\/e32\/7b1\/3c9e327b11cf3cf7ca71d97dfc100fd3.png\" height=\"20\"\/> \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u044b \u043f\u043e \u0413\u0430\u0443\u0441\u0441\u0443, \u0442\u043e \u043b\u043e\u0433\u0430\u0440\u0438\u0444\u043c\u0438\u0447\u0435\u0441\u043a\u0430\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u043f\u0440\u0430\u0432\u0434\u043e\u043f\u043e\u0434\u043e\u0431\u0438\u044f (Log-likelihood function) \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432 \u0434\u043b\u044f \u043d\u0430\u0448\u0438\u0445 \u0434\u0430\u043d\u043d\u044b\u0445 \u0431\u0443\u0434\u0435\u0442:<br \/>  <img decoding=\"async\" src=\"http:\/\/habr.habrastorage.org\/post_images\/ff9\/96a\/7f7\/ff996a7f76c8cd044bf3090b54eaeae1.png\" width=\"600\"\/><\/p>\n<p>  \u0422\u0430\u043a \u043a\u0430\u043a <img decoding=\"async\" src=\"http:\/\/habr.habrastorage.org\/post_images\/642\/88b\/51d\/64288b51d9b0d57cbaa28450680e76e9.png\" height=\"23\"\/> \u0438 <img decoding=\"async\" src=\"http:\/\/habr.habrastorage.org\/post_images\/d31\/9eb\/690\/d319eb690c14daf3c42e424f48fda8fd.png\" height=\"23\"\/> \u0442\u043e \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0438\u0437 \u0444\u0438\u043b\u044c\u0442\u0440\u0430 \u041a\u0430\u043b\u043c\u0430\u043d\u0430 \u043c\u043e\u0436\u0435\u0442 \u0431\u044b\u0442\u044c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d \u0447\u0442\u043e\u0431\u044b \u0432\u044b\u0447\u0438\u0441\u043b\u0438\u0442\u044c \u0444\u0443\u043d\u043a\u0446\u0438\u044e \u043f\u0440\u0430\u0432\u0434\u043e\u043f\u043e\u0434\u043e\u0431\u0438\u044f \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 \u043e\u0448\u0438\u0431\u043e\u043a \u0444\u0438\u043b\u044c\u0442\u0440\u0430:<br \/>  <img decoding=\"async\" src=\"http:\/\/habr.habrastorage.org\/post_images\/d48\/da1\/bbd\/d48da1bbd036b8b18c22703a62fe5eab.png\" width=\"600\"\/><br \/>  \u041c\u0430\u043a\u0441\u0438\u043c\u0438\u0437\u0438\u0440\u0443\u044f \u0434\u0430\u043d\u043d\u0443\u044e \u0444\u0443\u043d\u043a\u0446\u0438\u044e, \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u043d\u0430\u0439\u0442\u0438 \u043e\u0446\u0435\u043d\u043a\u0438 \u0442\u0440\u0435\u0431\u0443\u0435\u043c\u044b\u0445 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432 <img decoding=\"async\" src=\"http:\/\/habr.habrastorage.org\/post_images\/3fd\/b66\/5c8\/3fdb665c892de8edd9c3690f3566ce0f.png\" height=\"25\"\/>. \u041d\u0430 \u043f\u0440\u0430\u043a\u0442\u0438\u043a\u0435 \u0432\u0441\u0435\u0433\u0434\u0430 \u043f\u0440\u043e\u0449\u0435 \u043c\u0438\u043d\u0438\u043c\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0444\u0443\u043d\u043a\u0446\u0438\u0438, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0432 (22) \u043c\u044b \u0434\u043e\u0431\u0430\u0432\u0438\u043b\u0438 \u0437\u043d\u0430\u043a\u0438 \u043c\u0438\u043d\u0443\u0441\u0430, \u0438 \u0431\u0443\u0434\u0435\u043c \u0435\u0435 \u043c\u0438\u043d\u0438\u043c\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c.<\/p>\n<p>  \u0422\u0435\u043f\u0435\u0440\u044c \u043f\u0430\u0440\u0443 \u0441\u043b\u043e\u0432 \u043e \u0435\u0449\u0435 \u043e\u0434\u043d\u043e\u0439 wunderwaffe \u2014 \u041a\u0430\u043b\u043c\u0430\u043d\u043e\u0432\u0441\u043a\u043e\u043c \u0421\u0433\u043b\u0430\u0436\u0438\u0432\u0430\u043d\u0438\u0438 (Kalman smoother), [Durbin, J., and Koopman, 2003], \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0432\u0440\u043e\u0434\u0435 \u043d\u0430 \u0425\u0430\u0431\u0440\u0435 \u0435\u0449\u0435 \u043d\u0435 \u0443\u043f\u043e\u043c\u0438\u043d\u0430\u043b\u043e\u0441\u044c. \u0412 \u043e\u0431\u0449\u0435\u043c, \u0438\u0434\u0435\u044f \u043f\u043e\u0445\u043e\u0436\u0430, \u0442\u043e\u043b\u044c\u043a\u043e \u0444\u0438\u043b\u044c\u0442\u0440 \u041a\u0430\u043b\u043c\u0430\u043d\u0430 \u043f\u0440\u043e\u0441\u0447\u0438\u0442\u044b\u0432\u0430\u0435\u0442 \u043a\u0430\u0436\u0434\u043e\u0435 \u0441\u043b\u0435\u0434\u0443\u0435\u0449\u0435\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 <img decoding=\"async\" src=\"http:\/\/habr.habrastorage.org\/post_images\/3c9\/55e\/444\/3c955e444c34b19c7a651535d51e0848.png\" height=\"22\"\/> \u0432 \u043c\u043e\u043c\u0435\u043d\u0442 \u0432\u0440\u0435\u043c\u0435\u043d\u0438 <i>t<\/i> \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0438\u0445 \u0434\u0430\u043d\u043d\u044b\u0445 <i>1..t-1<\/i>: <img decoding=\"async\" src=\"http:\/\/habr.habrastorage.org\/post_images\/4ec\/0fa\/6d5\/4ec0fa6d5f9eb7d5c1ccb08e743c9f88.png\" height=\"25\"\/>. \u0410 Kalman Smoother \u043d\u0435\u043c\u043d\u043e\u0433\u043e \u0447\u0438\u0442\u0438\u0442, \u0438, \u043f\u0440\u0435\u0434\u043f\u043e\u043b\u0430\u0433\u0430\u044f \u0447\u0442\u043e \u0443 \u043d\u0430\u0441 \u0443\u0436\u0435 \u0435\u0441\u0442\u044c \u0432\u0441\u0435 \u0434\u0430\u043d\u043d\u044b\u0435, \u0434\u0430\u0435\u0442 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0443\u0442\u043e\u0447\u043d\u0438\u0442\u044c <img decoding=\"async\" src=\"http:\/\/habr.habrastorage.org\/post_images\/3c9\/55e\/444\/3c955e444c34b19c7a651535d51e0848.png\" height=\"22\"\/> \u0441\u043c\u043e\u0442\u0440\u044f \u043d\u0430 \u0432\u0435\u0441\u044c \u0432\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 \u0440\u044f\u0434 <img decoding=\"async\" src=\"http:\/\/habr.habrastorage.org\/post_images\/6e8\/710\/9fc\/6e87109fc48c23ca65065d850a3391e8.png\" height=\"30\"\/>, \u0442\u043e-\u0435\u0441\u0442\u044c, \u0433\u043e\u0432\u043e\u0440\u044f \u043f\u0440\u043e\u0441\u0442\u044b\u043c\u0438 \u0441\u043b\u043e\u0432\u0430\u043c\u0438, \u043e\u043d \u0432\u044b\u0447\u0438\u0441\u043b\u044f\u0435\u0442 <img decoding=\"async\" src=\"http:\/\/habr.habrastorage.org\/post_images\/85d\/976\/e13\/85d976e137a2dd5fe6515eb711b3f211.png\" height=\"30\"\/>. \u042d\u0442\u043e \u0445\u043e\u0440\u043e\u0448\u043e \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u043a\u043e\u0433\u0434\u0430 \u0443 \u043d\u0430\u0441 \u0443\u0436\u0435 \u0435\u0441\u0442\u044c \u0432\u0441\u0435 \u043d\u0430\u0431\u043b\u044e\u0434\u0435\u043d\u0438\u044f, \u0438 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u0443\u044e\u0442 \u043d\u0435 \u0431\u0443\u0434\u0443\u0449\u0438\u0435 \u043e\u0446\u0435\u043d\u043a\u0438, \u0430 \u0431\u043e\u043b\u0435\u0435 <s>\u043b\u0443\u0447\u0448\u0435 \u043e\u0434\u0435\u0432\u0430\u0442\u044c\u0441\u044f<\/s> \u0442\u043e\u0447\u043d\u044b\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u043b\u0430\u0442\u0435\u043d\u0442\u043d\u044b\u0445 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445 \u0438\u0437 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u0441\u043a\u043b\u0430\u0434\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u0434\u0438\u043d\u0430\u043c\u0438\u043a\u0430 \u0440\u044f\u0434\u0430.<\/p>\n<p>  \u0421\u0433\u043b\u0430\u0436\u0438\u0432\u0430\u043d\u0438\u0435 \u041a\u0430\u043b\u043c\u0430\u043d\u0430 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u0441\u043e\u0431\u043e\u0439 \u043e\u0431\u0440\u0430\u0442\u043d\u0443\u044e \u0440\u0435\u043a\u0443\u0440\u0441\u0438\u044e:<br \/>  <img decoding=\"async\" src=\"http:\/\/habr.habrastorage.org\/post_images\/97b\/2d6\/f09\/97b2d6f098a9b56aaf1e2dff35832c6a.png\" width=\"600\"\/><br \/>  \u0433\u0434\u0435 \u0432\u0435\u043a\u0442\u043e\u0440 \u0441\u0433\u043b\u0430\u0436\u0435\u043d\u043d\u044b\u0445 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0439 <img decoding=\"async\" src=\"http:\/\/habr.habrastorage.org\/post_images\/85d\/976\/e13\/85d976e137a2dd5fe6515eb711b3f211.png\" height=\"25\"\/> \u0431\u0443\u0434\u0435\u0442 \u0438\u043c\u0435\u0442\u044c \u043d\u0430\u0438\u043c\u0435\u043d\u044c\u0448\u0443\u044e \u0434\u0438\u0441\u043f\u0435\u0440\u0441\u0438\u044e <img decoding=\"async\" src=\"http:\/\/habr.habrastorage.org\/post_images\/528\/ce2\/d7d\/528ce2d7d56fc7261e8538ad0ba3b20d.png\" height=\"25\"\/>. \u0420\u0435\u043a\u0443\u0440\u0441\u0438\u044f \u0441\u0433\u043b\u0430\u0436\u0438\u0432\u0430\u043d\u0438\u044f \u043d\u0430\u0447\u0438\u043d\u0430\u0435\u0442\u0441\u044f \u0432 \u043c\u043e\u043c\u0435\u043d\u0442 \u0432\u0440\u0435\u043c\u0435\u043d\u0438 <i>t=N<\/i>, \u0438 \u0437\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u0442\u0441\u044f \u0437\u0430\u0434\u043e\u043c \u043d\u0430\u043f\u0435\u0440\u0435\u0434 \u0437\u0430\u0434\u0430\u0432\u0430\u044f \u043d\u0443\u043b\u0435\u0432\u044b\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0432\u0435\u043a\u0442\u043e\u0440\u0443 <img decoding=\"async\" src=\"http:\/\/habr.habrastorage.org\/post_images\/26f\/dc5\/732\/26fdc57328e79c440eeed5f593499f64.png\" height=\"25\"\/>\u0438 \u0435\u0433\u043e \u0434\u0438\u0441\u043f\u0435\u0440\u0441\u0438\u0438 <img decoding=\"async\" src=\"http:\/\/habr.habrastorage.org\/post_images\/507\/73a\/5d2\/50773a5d2a16de97a2c7e6061c0ff333.png\" height=\"25\"\/>. \u0417\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u043e\u0448\u0438\u0431\u043a\u0438 \u043f\u0440\u043e\u0433\u043d\u043e\u0437\u0430 <img decoding=\"async\" src=\"http:\/\/habr.habrastorage.org\/post_images\/e72\/dff\/992\/e72dff9929c119b24ebf7958719b5413.png\" height=\"25\"\/>, \u0435\u0435 \u0434\u0438\u0441\u043f\u0435\u0440\u0441\u0438\u044f <img decoding=\"async\" src=\"http:\/\/habr.habrastorage.org\/post_images\/dca\/225\/13c\/dca22513c08d337ac47c01a9c3582327.png\" height=\"25\"\/> \u0438 Kalman gain <img decoding=\"async\" src=\"http:\/\/habr.habrastorage.org\/post_images\/75b\/251\/179\/75b2511792215504a3683bf7ec76cf78.png\" height=\"25\"\/> \u0431\u0435\u0440\u0443\u0442\u0441\u044f \u0438\u0437 \u0444\u0438\u043b\u044c\u0442\u0440\u0430, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u0440\u043e\u0433\u043e\u043d\u044f\u0435\u0442\u0441\u044f \u0432 \u043f\u0435\u0440\u0432\u044b\u0439 \u0437\u0430\u0445\u043e\u0434.<\/p>\n<p>  \u0412 \u043e\u0431\u0449\u0435\u043c, \u043c\u043e\u0436\u043d\u043e \u0435\u0449\u0435 \u0434\u043e\u043b\u0433\u043e \u043f\u0438\u0441\u0430\u0442\u044c \u043e \u0442\u0435\u043e\u0440\u0438\u0438, \u043d\u043e \u0443\u0436\u0435 \u0440\u0443\u043a\u0438 \u0447\u0435\u0448\u0443\u0442\u0441\u044f \u043f\u043e\u0442\u0435\u0441\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c. \u0418\u0442\u0430\u043a, \u043f\u0435\u0440\u0435\u0439\u0434\u0435\u043c \u043a \u044d\u043c\u043f\u0438\u0440\u0438\u0447\u0435\u0441\u043a\u043e\u043c\u0443 \u043c\u0430\u0442\u0435\u0440\u0438\u0430\u043b\u0438\u0437\u043c\u0443.<\/p>\n<h4>4. \u0420\u0435\u0433\u0440\u0435\u0441\u0441\u0438\u044f<\/h4>\n<p>  \u041d\u0430 \u043e\u043f\u0442\u0438\u043c\u0430\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u0438 \u0441\u043a\u043e\u0440\u043e\u0441\u0442\u044c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0445 \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c \u0432 \u041c\u0430\u0442\u043b\u0430\u0431\u0435 \u044f \u043d\u0435 \u043f\u0440\u0435\u0442\u0435\u043d\u0434\u0443\u044e, \u044f \u043d\u0435 \u043d\u0430\u0441\u0442\u043e\u044f\u0449\u0438\u0439 \u0441\u0432\u0430\u0440\u0449\u0438\u043a, \u0432\u0435\u0441\u044c \u043a\u043e\u0434 \u043f\u0438\u0441\u0430\u043b\u0441\u044f \u0434\u043b\u044f \u0441\u0435\u0431\u044f. \u041d\u0435\u044d\u0441\u0442\u0435\u0442\u0438\u0447\u043d\u043e, \u0437\u0430\u0442\u043e \u0434\u0435\u0448\u0435\u0432\u043e, \u043d\u0430\u0434\u0435\u0436\u043d\u043e \u0438 \u043f\u0440\u0430\u043a\u0442\u0438\u0447\u043d\u043e. \u0422\u0430\u043a\u0436\u0435 \u043a\u043e\u0434 \u0434\u043b\u044f \u0444\u0438\u043b\u044c\u0442\u0440\u0430 \u0438 \u0441\u0433\u043b\u0430\u0436\u0438\u0432\u0430\u0442\u0435\u043b\u044f \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0438\u0437\u0431\u044b\u0442\u043e\u0447\u0435\u043d, \u0442\u0430\u043a \u043a\u0430\u043a \u043d\u0430\u043f\u0438\u0441\u0430\u043d \u0434\u043b\u044f \u0440\u0430\u0437\u043d\u044b\u0445 \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u043e\u0432 \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u0438 \u0442\u043f. \u041f\u043e\u043f\u044b\u0442\u043a\u0430 \u0432\u044b\u043a\u0438\u043d\u0443\u0442\u044c \u0447\u0430\u0441\u0442\u044c \u043a\u043e\u0434\u0430 \u043d\u0435\u0438\u0437\u0431\u0435\u0436\u043d\u043e \u043f\u0440\u0438\u0432\u043e\u0434\u0438\u043b\u0430 \u043a \u0432\u044b\u043b\u0435\u0442\u0430\u043c \u041c\u0430\u0442\u043b\u0430\u0431\u0430 \u0437\u0430\u043f\u043b\u0443\u0442\u0430\u0432\u0448\u0435\u0433\u043e \u0432 \u043c\u0430\u0442\u0440\u0438\u0446\u0430\u0445 \u0438 \u0446\u0438\u043a\u043b\u0430\u0445, \u0438 \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u044f \u0440\u0435\u0448\u0438\u043b \u043e\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u0432\u0441\u0435 \u043a\u0430\u043a \u0435\u0441\u0442\u044c. <\/p>\n<p>  \u0412\u0441\u0435 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0432\u0441\u0435 \u043f\u0440\u0438\u043c\u0435\u0440\u043d\u043e \u0442\u0430\u043a:  <\/p>\n<ol>\n<li>\u0413\u043b\u0430\u0432\u043d\u0430\u044f \u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0430 <b>otgr_ssm.m<\/b> \u0437\u0430\u0433\u0440\u0443\u0436\u0430\u0435\u0442 \u0434\u0430\u043d\u043d\u044b\u0435, \u043f\u043e\u0434\u0433\u043e\u0442\u0430\u0432\u043b\u0438\u0432\u0430\u0435\u0442 \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0443 <b>ssmopt<\/b>, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u0437\u0430\u043f\u0438\u0441\u0430\u043d\u044b \u043c\u043d\u043e\u0433\u043e \u0446\u0435\u043d\u043d\u044b\u0445 \u0437\u0430\u043c\u0435\u0447\u0430\u043d\u0438\u0439 \u0438 \u0432\u0430\u0436\u043d\u044b\u0445 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445 \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0431\u0443\u0434\u0443\u0442 \u043f\u0435\u0440\u0435\u0434\u0430\u0432\u0430\u0442\u044c\u0441\u044f \u0432 \u0440\u0430\u0437\u043d\u044b\u0435 \u043c\u0435\u0441\u0442\u0430 \u043a\u043e\u0434\u0430. \u041f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u0435 70 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439 \u043f\u043e \u043e\u0442\u0433\u0440\u0443\u0437\u043a\u0435 (10 \u043d\u0435\u0434\u0435\u043b\u044c) \u043e\u0442\u043b\u043e\u0436\u0438\u043c \u0432 \u0441\u0442\u043e\u0440\u043e\u043d\u0443 \u0434\u043b\u044f \u0441\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u044f \u0441 \u043f\u0440\u043e\u0433\u043d\u043e\u0437\u043e\u043c, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u043e \u043f\u043e\u0441\u0442\u0440\u043e\u0438\u043c \u0432 \u043a\u043e\u043d\u0446\u0435.<\/li>\n<li>\u0414\u0430\u043d\u043d\u044b\u0435 \u0432\u044b\u0433\u0440\u0443\u0436\u0430\u044e\u0442\u0441\u044f \u0432 \u043f\u043e\u0434\u043f\u0440\u043e\u0433\u0440\u0430\u043c\u043c\u0443 \u043c\u0430\u043a\u0441\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u0438 Log-likelihood function. \u041f\u043e\u0441\u043b\u0435\u0434\u043d\u044f\u044f \u043f\u0440\u043e\u0446\u0435\u0434\u0443\u0440\u0430 \u0447\u0430\u0441\u0442\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u0442\u0441\u044f \u0432 \u044d\u043a\u043e\u043d\u043e\u043c\u0435\u0442\u0440\u0438\u043a\u0435, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0431\u044b\u043b\u0430 \u0431\u044b\u0441\u0442\u0440\u043e \u043d\u0430 \u043a\u043e\u043b\u0435\u043d\u043a\u0435 \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u0430 \u0432 \u043e\u0431\u0449\u0435\u043c \u0432\u0438\u0434\u0435 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u0435\u0439 <b>mle_my.m<\/b> \u0447\u0442\u043e\u0431\u044b \u043d\u0435 \u0437\u0430\u043c\u0443\u0441\u043e\u0440\u0438\u0432\u0430\u0442\u044c \u043e\u0441\u043d\u043e\u0432\u043d\u043e\u0439 \u043a\u043e\u0434.<\/li>\n<li>\u0442\u0430\u043a \u043a\u0430\u043a \u0438\u0441\u043a\u043e\u043c\u044b\u0435 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u0432\u043a\u043b\u044e\u0447\u0430\u044e\u0442 \u0434\u0438\u0441\u043f\u0435\u0440\u0441\u0438\u0438 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0439, \u043e\u043d\u0438 \u0434\u043e\u043b\u0436\u043d\u044b \u0431\u044b\u0442\u044c \u0441\u0442\u0440\u043e\u0433\u043e \u043f\u043e\u043b\u043e\u0436\u0438\u0442\u0435\u043b\u044c\u043d\u044b, \u0447\u0442\u043e \u043d\u0435 \u0432\u0441\u0435\u0433\u0434\u0430 \u043f\u043e\u043b\u0443\u0447\u0430\u0435\u0442\u0441\u044f \u0432 \u0445\u043e\u0434\u0435 \u0447\u0438\u0441\u043b\u043e\u0432\u043e\u0439 \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u0438. \u041f\u043e\u044d\u0442\u043e\u043c\u0443, \u0441\u043c\u0435\u043d\u0438\u043c \u043f\u0435\u0448\u043a\u0438 \u043d\u0430 \u0440\u044e\u043c\u0430\u0448\u043a\u0438 \u0438 \u0432\u0441\u0435 \u0432\u0445\u043e\u0434\u043d\u044b\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0434\u0438\u0441\u043f\u0435\u0440\u0441\u0438\u0439 \u0431\u0443\u0434\u0443\u0442 \u0442\u0440\u0430\u043d\u0441\u0444\u043e\u0440\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u044b \u043a\u0430\u043a <img decoding=\"async\" src=\"http:\/\/habr.habrastorage.org\/post_images\/44e\/df9\/226\/44edf922641e860cc1892c573e8dcaef.png\" height=\"25\"\/>, \u0430 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u043a\u043e\u044d\u0444\u0444\u0438\u0446\u0438\u0435\u043d\u0442\u0430 \u0437\u0430\u0442\u0443\u0445\u0430\u043d\u0438\u044f \u043d\u043e\u0440\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u043e \u0432 \u0434\u0438\u0430\u043f\u0430\u0437\u043e\u043d\u0435 <img decoding=\"async\" src=\"http:\/\/habr.habrastorage.org\/post_images\/fa1\/523\/3f8\/fa15233f8316e07408e74ecd31784842.png\" height=\"25\"\/> \u043a\u0430\u043a <img decoding=\"async\" src=\"http:\/\/habr.habrastorage.org\/post_images\/7a8\/466\/058\/7a846605898d2bd0b00999fd865396a1.png\" height=\"20\"\/>. \u041d\u0443 \u0438 \u043d\u0430 \u0432\u044b\u0445\u043e\u0434\u0435, \u0441\u043e\u043e\u0441\u0442\u0432\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u0442\u0440\u0430\u043d\u0441\u0444\u043e\u0440\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u044b \u043e\u0431\u0440\u0430\u0442\u043d\u043e, \u0447\u0442\u043e\u0431\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u0442\u044c \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u044b\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u2014 <img decoding=\"async\" src=\"http:\/\/habr.habrastorage.org\/post_images\/102\/7ad\/b54\/1027adb54a8ba76fd00f2ffd12436cf8.png\" height=\"25\"\/> \u0434\u043b\u044f \u0432\u0430\u0440\u0438\u0430\u0446\u0438\u0439 \u0438 <img decoding=\"async\" src=\"http:\/\/habr.habrastorage.org\/post_images\/07d\/be9\/519\/07dbe951914dc5f65e3e516825c74dc4.png\" height=\"25\"\/> \u0434\u043b\u044f \u043a\u043e\u044d\u0444\u0444\u0438\u0446\u0438\u0435\u043d\u0442\u0430 \u0437\u0430\u0442\u0443\u0445\u0430\u043d\u0438\u044f. \u0417\u043d\u0430\u0447\u0435\u043d\u0438\u0435 ssmopt.trans \u0443\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442, \u043d\u0430\u0434\u043e \u043b\u0438 \u0442\u0440\u0430\u043d\u0441\u0444\u043e\u0440\u043c\u0438\u0440\u043e\u0432\u0430\u0442\u044c (1) \u0438\u043b\u0438 \u043d\u0435\u0442 (0), \u0438 \u0432 \u043a\u0430\u043a\u0443\u044e \u0441\u0442\u043e\u0440\u043e\u043d\u0443 \u2014 &#8216;in&#8217;, \u0438\u043b\u0438 &#8216;out&#8217;. \u0412\u0441\u0435 \u044d\u0442\u043e \u043f\u0440\u043e\u0438\u0441\u0445\u043e\u0434\u0438\u0442 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 <b>transform.m<\/b><\/li>\n<li><b>mle_my.m<\/b> \u0432\u044b\u0437\u044b\u0432\u0430\u0435\u0442 \u043e\u0431\u044c\u0435\u043a\u0442\u043d\u0443\u044e \u0444\u0443\u043d\u043a\u0446\u0438\u044e <b>f_obj.m<\/b>, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043f\u0440\u043e\u0433\u043e\u043d\u044f\u0435\u0442 \u0444\u0438\u043b\u044c\u0442\u0440 \u041a\u0430\u043b\u043c\u0430\u043d\u0430 (15)-(22) \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e <b>kfmy2.m<\/b>, \u0432\u044b\u0447\u0438\u0441\u043b\u044f\u0435\u0442 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 Log-likelihood function (22), \u0438, \u0447\u0442\u043e\u0431\u044b \u0434\u0432\u0430 \u0440\u0430\u0437\u0430 \u043d\u0435 \u0432\u0441\u0442\u0430\u0432\u0430\u0442\u044c, \u043f\u0440\u043e\u0441\u0447\u0438\u0442\u044b\u0432\u0430\u0435\u0442 \u0421\u0433\u043b\u0430\u0436\u0438\u0432\u0430\u0442\u0435\u043b\u044c \u041a\u0430\u043b\u043c\u0430\u043d\u0430 (23)-(27) \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f <b>ksmy2.m<\/b>. \u042d\u0442\u043e \u0432\u0441\u0435 \u043e\u0442\u043f\u0440\u0430\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043d\u0430\u0437\u0430\u0434 \u0432 <b>mle_my.m<\/b>, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u0442, \u0434\u043e\u0441\u0442\u0438\u0433\u043b\u0438 \u043c\u044b \u043c\u0430\u043a\u0441\u0438\u043c\u0443\u043c\u0430 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 (22) \u0438\u043b\u0438 \u043d\u0435\u0442. \u0415\u0441\u043b\u0438 \u0434\u0430, \u0442\u043e \u0432\u0441\u0435 \u043d\u0430 \u0432\u044b\u0445\u043e\u0434, \u0432 \u043f\u0443\u043d\u043a\u0442 4. \u0415\u0441\u043b\u0438 \u043d\u0435\u0442, \u0442\u043e \u043f\u043e\u0432\u0442\u043e\u0440\u044f\u0435\u043c \u0448\u0430\u0433\u0438 2-3.<br \/>  \u0421\u0430\u043c\u044b\u0439 \u043f\u0435\u0440\u0432\u044b\u0439 \u0437\u0430\u043f\u0443\u0441\u043a \u0444\u0438\u043b\u044c\u0442\u0440\u0430 \u043d\u0430\u0447\u0438\u043d\u0430\u0435\u0442\u0441\u044f \u0441 \u043f\u0440\u0435\u0434\u043f\u043e\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u0447\u0442\u043e <img decoding=\"async\" src=\"http:\/\/habr.habrastorage.org\/post_images\/735\/6d5\/6a1\/7356d56a1687b26a43a97d5c3e408058.png\" height=\"20\"\/>. \u0422\u0443\u0442 \u043c\u043e\u0436\u043d\u043e \u043f\u043e\u0438\u0433\u0440\u0430\u0442\u044c\u0441\u044f, \u0442\u0430\u043a \u043a\u0430\u043a \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445 \u043c\u043d\u043e\u0433\u043e, \u0438 \u043c\u044b \u0432\u0435\u0434\u0435\u043c \u043f\u043e\u0438\u0441\u043a \u0433\u043b\u043e\u0431\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u043c\u0430\u043a\u0441\u0438\u043c\u0443\u043c\u0430 \u0448\u0435\u0441\u0442\u0438\u043c\u0435\u0440\u043d\u043e\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u0438, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u044b \u043c\u043d\u043e\u0433\u0438\u0435 \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u044b\u0435 \u044d\u043a\u0441\u0442\u0440\u0435\u043c\u0443\u043c\u044b. \u041f\u043e-\u0445\u043e\u0440\u043e\u0448\u0435\u043c\u0443, \u043c\u043e\u0436\u043d\u043e \u0431\u044b\u043b\u043e \u0431\u044b \u043f\u043e\u0441\u0442\u0440\u043e\u0438\u0442\u044c \u0433\u0440\u0430\u0444\u0438\u043a\u0438 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u044b\u0445 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439 \u043b\u043e\u0433-\u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0438 \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u043d\u0430 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u044b\u0435 \u044d\u043a\u0441\u0442\u0440\u0435\u043c\u0443\u043c\u044b.<\/li>\n<li>\u0412\u044b\u0432\u043e\u0434\u0438\u043c \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b \u2014 \u043d\u0430\u0439\u0434\u0435\u043d\u043d\u044b\u0435 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u0438 \u0433\u0440\u0430\u0444\u0438\u043a\u0438. \u0417\u0430\u043e\u0434\u043d\u043e \u043f\u043e\u0441\u0447\u0438\u0442\u0430\u0435\u043c \u043f\u0440\u0435\u0434\u0441\u043a\u0430\u0437\u0430\u043d\u0438\u0435 \u0434\u043b\u044f 70 \u0434\u043d\u0435\u0439 \u0438 \u0441\u0440\u0430\u0432\u043d\u0438\u043c \u0435\u0433\u043e \u0441 \u0440\u0435\u0430\u043b\u044c\u043d\u044b\u043c\u0438 \u0434\u0430\u043d\u043d\u044b\u043c\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f <b>frcst.m<\/b> <\/li>\n<\/ol>\n<p>  \u0421\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u043e, \u043a\u043e\u0434:  <\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">otgr_ssm.m<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"matlab\">clear all; clc; close all; format long;  %------------------- 1. Load and prepare data ------------------------------ load otgruzka.mat;        % Structure ssmopt contains several important records used throughout the code ssmopt.frcst=70;                  % forecast length yend=y(end-ssmopt.frcst+1:end);   % saved last observation for the forecast comparison y=y(1:end-ssmopt.frcst); ssmopt.N=length(y);               ssmopt.trans=1;    \t\t\t% transform estimated parameters to preserve positiveness of variances ssmopt.sv=[5e+8;500;5e+8;5e+8;0.05;0.9];    % starting values  ssmopt.mle='f_obj';\t\t\t \t\t\t\t% name of the objective function for the maximization ssmopt.sv=transform(ssmopt.sv,'in',ssmopt); ssmopt.filter='kfmy2';\t\t\t\t\t % name of the function computing Kalman Filter ssmopt.smooth='ksmy2';\t\t\t\t\t % name of the function computing Kalman Smoother  %------------------- 2. Estimate the model ------------------------------ result=mle_my(y,ssmopt);\t\t\t\t % call Maximum Likelihood maximization function b=transform(result.b,'out',ssmopt);\t     % transform parameters back  % recompute data based on the correct non-transformed parameters ssmopt.trans=0;  ssmopt.sv=b; [LH,KF_out,Ksm_out] = feval(ssmopt.mle,b,y, ssmopt);  % Recover filtered states series - trend, cycle, and seasonal a_trend=KF_out.Afilt(1,:); a_cycle=KF_out.Afilt(3,:); a_seas=KF_out.Afilt(5,:)+KF_out.Afilt(7,:)+KF_out.Afilt(9,:); y_filt=a_trend+a_cycle+a_seas;\t% build the estimated filtered series Y  % Recover smoothed states series - trend, cycle, and seasonal a_trendsm=Ksm_out.Asm(1,:); a_cyclesm=Ksm_out.Asm(3,:); a_seassm=Ksm_out.Asm(5,:)+Ksm_out.Asm(7,:)+Ksm_out.Asm(9,:); y_smooth=a_trendsm+a_cyclesm+a_seassm;\t% build the estimated smoothed series Y  result=mle_my(y,ssmopt);\t\t% find correct Hessian for non-transformed parameters %------------------- 3. Compute estimation statistics ------------------------------ %Find standard errors, and p-values se=sqrt(abs(diag(inv(result.hessian)\/ssmopt.N)));         % s.e.(b) tstat=b.\/se;                             \t\t\t\t  % t-statistics   pval=2*(1-tcdf(abs(tstat),ssmopt.N-length(ssmopt.sv)));   % p-value  % Display output fprintf('Estimated parameters and p-values:\\n'); out=[b pval] period=2*pi\/b(end-1)  % Compute R-squared resid=y-y_filt;                                % estimation errors SSE=resid*resid';                              % Sum of Squared Errors    SST=(y-mean(y))*(y-mean(y))';                  % Sum of Squares Total R2=1-SSE\/SST                                   % R-squared'  %------------------- 4. Make Forecast ------------------------------ af0=KF_out.Afilt(:,end-ssmopt.frcst); [yf,af]=frcst(b,y,ssmopt, af0);  %------------------- 5. Plot results ------------------------------ %p=ssmopt.N; p=600; t=[1:1:p]; figure(1)\t plot(t,y(1:p),'k',t,y_filt(1:p),'b',t,y_smooth(1:p),'r--') title('Original, Filtered, and Smoothed data') legend('y(t)','y filtered','y smoothed');  figure(2)\t plot(t,y(1:p),'k',t,a_trend(1:p),'b',t,a_trendsm(1:p),'r--') title('Original data, Filtered and Smoothed trend') legend('y(t)','Filtered trend','Smoothed trend');  figure(3)    plot(t,a_cycle(1:p),'b',t,a_cyclesm(1:p),'r--') title('Filtered and Smoothed cycle') legend('Filtered cycle','Smoothed cycle');  figure(4)\t% Filtered + smoothed seasonal plot(t,a_seas(1:p),'b',t,a_seassm(1:p),'r--') title('Filtered and Smoothed weekly seasonal') legend('Filtered seasonal','Smoothed seasonal');  t=[1:1:ssmopt.frcst]; figure(5) plot(t,yend,'b',t,yf,'r--') title('Original data and Forecast') legend('Original data','Forecast');  RMSE=sqrt(sum((yend - yf).^2)\/ssmopt.frcst)  % Root Mean Squared Error <\/code><\/pre>\n<p>  <\/div>\n<\/div>\n<p>  <\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">mle_my.m<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"matlab\">function result_mle=mle_my(y,mleopt); warning off;  %---------------- 1. Set-up minimization options ---------------- options=optimset('fminunc');   options=optimset('LargeScale', 'off' , ...                  'HessUpdate', 'bfgs' , ...                  'LineSearchType', 'quadcubic' , ...                  'GradObj' , 'off'  , ...                    'Display','off' , ...                                    'MaxIter' ,  1000  , ...                  'TolX',  1e-12 , ...                  'TolFun' , 1e-12, ...                   'DerivativeCheck' , 'off' , ...                  'Diagnostics' , 'off' , ...                   'MaxFunEvals', 1000);  %---------------- 2. Run minimization ---------------- [b,fval,exitflag,output,grad,hessian]=fminunc(mleopt.mle,mleopt.sv,options,y,mleopt); warning on;  result_mle.b=b; result_mle.fval=fval; result_mle.output=output; result_mle.hessian=hessian; <\/code><\/pre>\n<p>  <\/div>\n<\/div>\n<p>  <\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">f_obj.m<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"matlab\">function [obj,KF_out,Ksm_out]=f_obj_tr(b,y,ssmopt);     %---------------- 1. Recover parameters ------------------------------------ b=transform(b,'out',ssmopt); s2_irr=b(1); s2_tr=b(2); s2_cyc=b(3); s2_seas=b(4); freq=b(5); rho=b(6);  %----------------  2. Build the model  ------------------------------------ ssmopt.ssmodel.states=10; ssmopt.ssmodel.Z=[1 0 1 0 1 0 1 0 1 0];  T1 = [1 1 0 0; 0 1 0 0; 0 0 rho*cos(freq) rho*sin(freq); 0 0 -rho*sin(freq) rho*cos(freq)]; T2=[cos(2*pi\/7) sin(2*pi\/7) 0 0 0 0;...     -sin(2*pi\/7) cos(2*pi\/7) 0 0 0 0;... \t 0 0 cos(4*pi\/7) sin(4*pi\/7) 0 0;... \t 0 0 -sin(4*pi\/7) cos(4*pi\/7) 0 0;... \t 0 0 0 0 cos(6*pi\/7) sin(6*pi\/7);... \t 0 0 0 0 -sin(6*pi\/7) cos(6*pi\/7)];  ssmopt.ssmodel.T = [T1 zeros(rows(T1),cols(T2));zeros(rows(T2),cols(T1)) T2]; ssmopt.ssmodel.R=eye(10); ssmopt.ssmodel.R(1,1)=0;  H=s2_irr;  Q=zeros(10,10); Q(2,2)=s2_tr; Q(3,3)=s2_cyc; Q(4,4)=s2_cyc;  Q(5,5)=s2_seas; Q(6,6)=s2_seas; Q(7,7)=s2_seas; Q(8,8)=s2_seas; Q(9,9)=s2_seas; Q(10,10)=s2_seas;  %----------------  3. Suggest starting conditions for the states ------------------------ a0=[y(1);0;0;0;0;0;0;0;0;0]; P0=eye(ssmopt.ssmodel.states)*1e+10;  %---------------- 4. Run Kalman filter ------------------------ KF_out = feval(ssmopt.filter,y, ssmopt, Q, H, a0, P0); obj=KF_out.LH;  %---------------- 5. Run Kalman smoother ------------------------ if nargout&gt;2 \tssmopt.ssmodel.num_etas=3;\t\t\t\t % number of the state variances (required for Kalman smoother) \tKsm_out = feval(ssmopt.smooth,KF_out, ssmopt); end <\/code><\/pre>\n<p>  <\/div>\n<\/div>\n<p>  <\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">kfmy2.m<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"matlab\">% Kalman filter  %     y[t] = Z*alpha[t] + eps,  eps ~ N(0,H). %     alpha[t] = T*alpha[t-1] + R*eta,  eta ~ N(0,Q). %     v[t]=y[t]-E(y[t]) = y[t]-Z*a[t]  %     F[t]=var(v[t])  function KF_out = kfmy_koop(y, ssmopt, Q, H, a, P);  N=ssmopt.N; m=ssmopt.ssmodel.states; %---------------- 1. Recover parameters and prepare matrices ---------------- T=ssmopt.ssmodel.T; Z=ssmopt.ssmodel.Z; R=ssmopt.ssmodel.R; KF_out.Vmat=zeros(1,N);  KF_out.Fmat=zeros(1,N); KF_out.Afilt=zeros(m,N); KF_out.Pfilt=zeros(m,m,N); KF_out.Kmat=zeros(m,N);  KF_out.Lmat=zeros(m,m,N); LHmat=zeros(1,N);  if ~isfield(ssmopt,'exactcheck'); \t\tssmopt.exactcheck=1;       % set exact filter initialization by default end;  %---------------- 2. Set default starting values for a and P , if none provided  ---------------- Pinf=eye(m);    if nargin &lt; 6\t\t\t\t\t\t   \tif ssmopt.exactcheck==1 \t\tP=zeros(m,m); \telse \t\tP=eye(m)*1000000000; \tend\t end      if nargin &lt; 5     a=[y(1); zeros(m-1,1)]; end    KF_out.Afilt(:,1)= a; KF_out.Pfilt(:,:,1) = P; d=0;  %---------------- 3. Exact Filtering ---------------- if ssmopt.exactcheck==1 \tevals=10;      % number of time steps to evaluate until Pinf converges to zero \tKF_out.exact.F1=zeros(1,evals); \tKF_out.exact.F2=zeros(1,evals); \tKF_out.exact.L1=zeros(m,m,evals); \tKF_out.exact.Pinf=zeros(m,m,evals); KF_out.exact.Pinf(:,:,1)=Pinf; \tfor i=1:evals \t\tif sum(sum(Pinf))&lt;1e-20; \t\t\td=i-1;                  % time point after which Pinf--&gt;0, and after which we may start regular Kalman filter \t\t\tbreak; \t\telse \t\t\tif  sum(Pinf*Z')&gt;0\t\t% Pinf is not singular \t\t\t\tF1=inv(Z*Pinf*Z');\tF2=-F1*(Z*P*Z'+H)*F1; \t\t\t\tK=T*Pinf*Z'*F1;\t\tK1=T*(P*Z'*F1+Pinf*Z'*F2); \t\t\t\tL=T-K*Z;\t\t\tL1=-K1*Z; \t\t\t\tP=T*Pinf*L1' + T*P*L' + R*Q*R'; \t\t\t\tPinf=T*Pinf*L'; \t\t\telse \t\t\t\tF1=Z*P*Z'+H;\t\tF2=F1; \t\t\t\tK=T*P*Z'\/F1; \t\t\t\tL=T-K*Z;\t\t\tL1=L;\t \t\t\t\tP=T*P*L' + R*Q*R'; \t\t\t\tPinf=T*Pinf*T'; \t\t\tend \t\t\tv=y(i) - Z*a; \t\t\ta=T*a+K*v; \t\t \t\t\t%save filtered estimates \t\t\tKF_out.Afilt(:,i+1)=a;  KF_out.Pfilt(:,:,i+1)=P; \t\t\tKF_out.Vmat(i)=v;       KF_out.Fmat(i)=F1; \t\t\tKF_out.Kmat(:,i)=K;     KF_out.Lmat(:,:,i)=L;       \t\t\tLHmat(i) = -0.5*(log(2*pi*F1) + v^2\/F1); \t\t\t \t\t\t%save exact values for smoother \t\t\tKF_out.exact.F1(i)=F1; \t\t\tKF_out.exact.F2(i)=F2; \t\t\tKF_out.exact.L1(:,:,i)=L1; \t\t\tKF_out.exact.Pinf(:,:,i+1)=Pinf; \t\tend \tend end  %---------------- 4.  Regular Filtering ---------------- for i=d+1:N   v=y(i) - Z*a;   f=Z*P*Z' + H;      K=T*P*Z'\/f;   L=T-K*Z;      a=T*a+K*v;   P=T*P*L'+R*Q*R';    if i&lt;N     KF_out.Afilt(:,i+1)=a;     KF_out.Pfilt(:,:,i+1)=P;   end        KF_out.Vmat(i)=v;       KF_out.Fmat(i)=f;   KF_out.Kmat(:,i)=K;     KF_out.Lmat(:,:,i)=L;         LHmat(i) = -0.5*(log(2*pi*f) + v^2\/f);  end  %---------------- 5. Prepare output ---------------- KF_out.LH=-sum(LHmat); KF_out.Q=Q; KF_out.H=H; KF_out.exact.d=d; end   <\/code><\/pre>\n<p>   <\/div>\n<\/div>\n<p>  <\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">ksmy2.m<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"matlab\">function [Ksm_out, Kdism_out] = ksmy2(KF_out, ssmopt);   [m,N]=size(KF_out.Afilt); meta=ssmopt.ssmodel.num_etas;  %---------------- 1. Recover filtered matrices ---------------- Fmat=KF_out.Fmat; Vmat=KF_out.Vmat; Pfilt=KF_out.Pfilt; Afilt=KF_out.Afilt; Q=KF_out.Q; H=KF_out.H;  %---------------- 2. Recover Model structure ---------------- Z=ssmopt.ssmodel.Z; T=ssmopt.ssmodel.T; R=ssmopt.ssmodel.R; Asm=zeros(m,N); Psm=zeros(m,m,N); rmat=zeros(m,N); Nmat=zeros(m,m,N); Eps=zeros(1,N); Eta=zeros(meta,N); Kmat=KF_out.Kmat; Lmat=KF_out.Lmat;  if ~isfield(KF_out,'exact');\t\t \tKF_out.exact.d=0; end  d=KF_out.exact.d;  if KF_out.exact.d&gt;0 \tL1=KF_out.exact.L1; \tF1=KF_out.exact.F1; \tF2=KF_out.exact.F2; \tPinf=KF_out.exact.Pinf; end %---------------- 3. Regular Smoothing for t=N..d+1 observations ---------------- for i=N:-1:d+1 \tr=Z'\/Fmat(i)*Vmat(i) + Lmat(:,:,i)'*rmat(:,i); \tN=Z'\/Fmat(i)*Z + Lmat(:,:,i)'*Nmat(:,:,i)*Lmat(:,:,i); \tAsm(:,i)=Afilt(:,i) + Pfilt(:,:,i)*r; \tPsm(:,:,i)=Pfilt(:,:,i)-Pfilt(:,:,i)*N*Pfilt(:,:,i);      if i&gt;1     rmat(:,i-1)=r;     Nmat(:,:,i-1)=N;   end        if nargout&gt;1     Eps(i)=H*(1\/(Fmat(i))*Vmat(i)-Kmat(:,i)'*rmat(:,i));     Eta(:,i)=Q*R'*rmat(:,i);   end   end %---------------- 4. Exact Smoothing for t=d..1 observations ---------------- if KF_out.exact.d&gt;0 \tr1=zeros(m,1);\tN1=zeros(m,m); N2=zeros(m,m); \tfor i=d:-1:1 \t\tif  sum(Pinf(:,:,i)*Z')&gt;0\t\t%cond(Pinf)&lt;1e+12\t% Pinf is not singular \t\t\tr1=Z'*F1(i)*Vmat(i) + Lmat(:,:,i)'*r1 + L1(:,:,i)'*rmat(:,i); \t\t\tN2=Z'*F2(i)*Z + Lmat(:,:,i)'*N2*Lmat(:,:,i) + Lmat(:,:,i)'*N1*L1(:,:,i) + L1(:,:,i)'*N1*Lmat(:,:,i) + L1(:,:,i)'*Nmat(:,:,i)*L1(:,:,i); \t\t\tN1=Z'*F1(i)*Z + Lmat(:,:,i)'*N1*Lmat(:,:,i) + L1(:,:,i)'*Nmat(:,:,i)*Lmat(:,:,i);  \t\t\tr=Lmat(:,:,i)'*r1; \t\t\tN=Lmat(:,:,i)'*Nmat(:,:,i)*Lmat(:,:,i); \t\t\t \t\t\tif nargout&gt;1 \t\t\t\tEps(i)=-H*Kmat(:,i)'*rmat(:,i); \t\t\t\tEta(:,i)=Q*R'*rmat(:,i); \t\t\tend      \t\telse\t\t\t\t% Pinf is singular \t\t\tr1=T'*rmat(:,i); \t\t\tN2=T'*N2*T; \t\t\tN1=T'*N1*Lmat(:,:,i); \t\t\t \t\t\tr=Z'\/(Fmat(i))*Vmat(i) + Lmat(:,:,i)'*rmat(:,i); \t\t\tN=Z'\/(Fmat(i))*Z + Lmat(:,:,i)'*Nmat(:,:,i)*Lmat(:,:,i); \t\t\t \t\t\tif nargout&gt;1 \t\t\t\tEps(i)=H*(1\/Fmat(i)*Vmat(i) - Kmat(:,i)'*rmat(:,i)); \t\t\t\tEta(:,i)=Q*R'*rmat(:,i); \t\t\tend   \t\tend\t\t \t\t \t\tif i&gt;1 \t\t\trmat(:,i-1)=r; \t\t\tNmat(:,:,i-1)=N; \t\tend \t\tAsm(:,i)=Afilt(:,i) + Pfilt(:,:,i)*r + Pinf(:,:,i)*r1; \t\tPsm(:,:,i)=Pfilt(:,:,i)-Pfilt(:,:,i)*N*Pfilt(:,:,i) - (Pinf(:,:,i)*N1*Pfilt(:,:,i))' - Pinf(:,:,i)*N1*Pfilt(:,:,i) -  Pinf(:,:,i)*N2*Pinf(:,:,i);  \tend end %---------------- 5. Prepare output ---------------- Ksm_out.Asm=Asm; Ksm_out.Psm=Psm; Ksm_out.Kmat=Kmat; Ksm_out.Lmat=Lmat; Ksm_out.Nmat=Nmat; Ksm_out.rmat=rmat;  Kdism_out.Eps=Eps; Kdism_out.Eta=Eta; <\/code><\/pre>\n<p>  <\/div>\n<\/div>\n<p>  <\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">transform.m<\/b><\/p>\n<div class=\"spoiler_text\">\n<pre><code class=\"matlab\">function b=transform(b,howto,ssmopt); k=length(b);  if strcmp(howto,'in') % in-transformation    if ssmopt.trans==0  % no transformation      b=b;   end;    if ssmopt.trans==1  % transformation to preserve the positiveness of variances      b(1:k-1,:)=log(b(1:k-1,:));            b(k)=log(1\/b(k)-1);   end;  else   % out-transformation    if ssmopt.trans==0  % no transformation      b=b;   end;    if ssmopt.trans==1     b(1:k-1,:)=exp(b(1:k-1,:));     b(k)=1\/(1+exp(b(k)));      end; end <\/code><\/pre>\n<p>  <\/div>\n<\/div>\n<p>  <\/p>\n<h4>5. \u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b<\/h4>\n<p>  (p-values \u043d\u0430\u0439\u0434\u0435\u043d\u043d\u044b\u0445 \u043e\u0446\u0435\u043d\u043e\u043a \u0443\u043a\u0430\u0437\u0430\u043d\u044b \u0432 \u0441\u043a\u043e\u0431\u043a\u0430\u0445)  <\/p>\n<table border=\"1\" width=\"400\">\n<tr>\n<td>\u0414\u0438\u0441\u043f\u0435\u0440\u0441\u0438\u044f \u043e\u0448\u0438\u0431\u043a\u0438 \u043d\u0430\u0431\u043b\u044e\u0434\u0430\u0435\u043c\u043e\u0433\u043e \u0440\u044f\u0434\u0430 <img decoding=\"async\" src=\"http:\/\/habr.habrastorage.org\/post_images\/838\/7eb\/1ce\/8387eb1ceecb4475b7ab056a535b570a.png\" height=\"30\"\/><\/td>\n<td>1.77E+009 (0.00)<\/td>\n<\/tr>\n<tr>\n<td>\u0414\u0438\u0441\u043f\u0435\u0440\u0441\u0438\u044f \u043e\u0448\u0438\u0431\u043a\u0438 \u0442\u0440\u0435\u043d\u0434\u0430 <img decoding=\"async\" src=\"http:\/\/habr.habrastorage.org\/post_images\/7b4\/feb\/bb1\/7b4febbb1bc4f2e373d79c9d9645598d.png\" height=\"30\"\/><\/td>\n<td>348.73 (0.00)<\/td>\n<\/tr>\n<tr>\n<td>\u0414\u0438\u0441\u043f\u0435\u0440\u0441\u0438\u044f \u0446\u0438\u043a\u043b\u0430 <img decoding=\"async\" src=\"http:\/\/habr.habrastorage.org\/post_images\/684\/5ef\/6dc\/6845ef6dc79108f1fc3418c843f29ccd.png\" height=\"30\"\/><\/td>\n<td>6.07E+008 (0.00)<\/td>\n<\/tr>\n<tr>\n<td>\u0414\u0438\u0441\u043f\u0435\u0440\u0441\u0438\u044f \u043e\u0448\u0438\u0431\u043a\u0438 \u0441\u0435\u0437\u043e\u043d\u043d\u043e\u0439 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u044b <img decoding=\"async\" src=\"http:\/\/habr.habrastorage.org\/post_images\/2eb\/143\/2ad\/2eb1432adb43d5f7fc59a6cf9e530a2e.png\" height=\"30\"\/><\/td>\n<td>3.91E+006 (0.00)<\/td>\n<\/tr>\n<tr>\n<td>\u0427\u0430\u0441\u0442\u043e\u0442\u0430 \u0446\u0438\u043a\u043b\u0430 <img decoding=\"async\" src=\"http:\/\/habr.habrastorage.org\/post_images\/064\/7c8\/2e0\/0647c82e00b4223868c9135176930c2c.png\" height=\"25\"\/><\/td>\n<td>3.91E+006 (0.00)<\/td>\n<\/tr>\n<tr>\n<td>\u041f\u0435\u0440\u0438\u043e\u0434 \u0446\u0438\u043a\u043b\u0430 (\u0432 \u0434\u043d\u044f\u0445)<\/td>\n<td>362.6 (0.00)<\/td>\n<\/tr>\n<tr>\n<td>\u041a\u043e\u044d\u0444\u0444\u0438\u0446\u0438\u0435\u043d\u0442 \u0437\u0430\u0442\u0443\u0445\u0430\u043d\u0438\u044f \u0446\u0438\u043a\u043b\u0430<img decoding=\"async\" src=\"http:\/\/habr.habrastorage.org\/post_images\/3be\/c8c\/d5d\/3bec8cd5dec32cd8942567cf28ba14d8.png\" height=\"30\"\/><\/td>\n<td>0.891 (0.00)<\/td>\n<\/tr>\n<tr>\n<td>R-\u043a\u0432\u0430\u0434\u0440\u0430\u0442 \u0440\u0435\u0433\u0440\u0435\u0441\u0441\u0438\u0438<\/td>\n<td>0.78<\/td>\n<\/tr>\n<\/table>\n<p>  <\/p>\n<h4>6. \u0413\u0440\u0430\u0444\u0438\u043a\u0438<\/h4>\n<p>  \u0414\u043b\u044f \u0443\u0434\u043e\u0431\u0441\u0442\u0432\u0430 \u0432\u043e\u0441\u043f\u0440\u0438\u044f\u0442\u0438\u044f, \u043f\u043e\u043a\u0430\u0437\u0430\u043d\u044b \u0433\u0440\u0430\u0444\u0438\u043a\u0438 \u0442\u043e\u043b\u044c\u043a\u043e \u0434\u043b\u044f \u043f\u0435\u0440\u0432\u044b\u0445 600 \u0434\u043d\u0435\u0439, \u0434\u043b\u044f \u0432\u0441\u0435\u0433\u043e \u0440\u044f\u0434\u0430 \u0441\u043f\u0440\u044f\u0442\u0430\u043d\u044b \u043f\u043e\u0434 \u0441\u043f\u043e\u0439\u043b\u0435\u0440\u044b.<br \/>  <b>a. \u0418\u0441\u0445\u043e\u0434\u043d\u044b\u0435, \u043e\u0442\u0444\u0438\u043b\u044c\u0442\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0435 \u0438 \u0441\u0433\u043b\u0430\u0436\u0435\u043d\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 <\/b><br \/>  <img decoding=\"async\" src=\"http:\/\/habr.habrastorage.org\/post_images\/3a9\/5e2\/0b3\/3a95e20b3fab1f22ac3d4a67ad8248b2.png\"\/>  <\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u0412\u0435\u0441\u044c \u0440\u044f\u0434<\/b><\/p>\n<div class=\"spoiler_text\"><img decoding=\"async\" src=\"http:\/\/habr.habrastorage.org\/post_images\/389\/63d\/dad\/38963ddad940b1f4002ca8b5638c171f.png\"\/><\/div>\n<\/div>\n<p>  <b>b. \u0418\u0441\u0445\u043e\u0434\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435, \u043e\u0442\u0444\u0438\u043b\u044c\u0442\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u0442\u0440\u0435\u043d\u0434, \u0441\u0433\u043b\u0430\u0436\u0435\u043d\u043d\u044b\u0439 \u0442\u0440\u0435\u043d\u0434<\/b> <br \/>  \u041a\u0430\u043a \u0432\u0438\u0434\u043d\u043e, \u0444\u0438\u043b\u044c\u0442\u0440 \u041a\u0430\u043b\u043c\u0430\u043d\u0430 \u043f\u044b\u0442\u0430\u0435\u0442\u0441\u044f \u0443\u0433\u0430\u0434\u0430\u0442\u044c \u0442\u0440\u0435\u043d\u0434 \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0438\u0445 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439, \u0438 \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043a\u043e\u043b\u0435\u0431\u043b\u0435\u0442\u0441\u044f \u0432\u043c\u0435\u0441\u0442\u0435 \u0441 \u043b\u0438\u043d\u0438\u0435\u0439 \u043f\u0430\u0440\u0442\u0438\u0438, \u043d\u043e \u043d\u0435\u043c\u043d\u043e\u0433\u043e \u0437\u0430\u043f\u0430\u0437\u0434\u044b\u0432\u0430\u044f, \u043f\u044b\u0442\u0430\u044f\u0441\u044c \u0443\u0433\u0430\u0434\u0430\u0442\u044c \u043a\u0443\u0434\u0430 \u0434\u0430\u043b\u044c\u0448\u0435 \u043d\u0430\u043f\u0440\u0430\u0432\u044f\u0442\u0441\u044f \u043d\u0430\u0448\u0438 \u0434\u0430\u043d\u043d\u044b\u0435. \u0421\u0433\u043b\u0430\u0436\u0438\u0432\u0430\u0442\u0435\u043b\u044c \u041a\u0430\u043b\u043c\u0430\u043d\u0430 \u0436\u0435 \u00ab\u0432\u0438\u0434\u0438\u0442\u00bb \u0432\u0435\u0441\u044c \u0440\u044f\u0434, \u0438 \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0442\u0440\u0435\u043d\u0434 \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u043d\u0430\u043c\u043d\u043e\u0433\u043e \u0440\u043e\u0432\u043d\u0435\u0435 \u0438 \u0441\u043f\u043e\u043a\u043e\u0439\u043d\u0435\u0435: <br \/>  <img decoding=\"async\" src=\"http:\/\/habr.habrastorage.org\/post_images\/62e\/1ab\/09a\/62e1ab09a33325591f7e0407f1ccc618.png\"\/>  <\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u0412\u0435\u0441\u044c \u0440\u044f\u0434<\/b><\/p>\n<div class=\"spoiler_text\"><img decoding=\"async\" src=\"http:\/\/habr.habrastorage.org\/post_images\/c33\/185\/a69\/c33185a691ab0dd9a8ccf4f106c4fd82.png\"\/><\/div>\n<\/div>\n<p>  <b>c. \u041e\u0442\u0444\u0438\u043b\u044c\u0442\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u0438 \u0441\u0433\u043b\u0430\u0436\u0435\u043d\u043d\u044b\u0439 \u0446\u0438\u043a\u043b<\/b> <br \/>  \u041a\u0430\u043a \u0432\u0438\u0434\u043d\u043e \u0438\u0437 \u0442\u0430\u0431\u043b\u0438\u0446\u044b \u0441 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0430\u043c\u0438, \u0441\u0440\u0435\u0434\u043d\u044f\u044f \u0434\u043b\u0438\u043d\u0430 \u0446\u0438\u043a\u043b\u0430 \u0441\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u043f\u043e\u0440\u044f\u0434\u043a\u0430 362 \u0434\u043d\u044f, \u0438\u043b\u0438 \u043f\u0440\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u043e\u0434\u0438\u043d \u0433\u043e\u0434 (\u043a\u0442\u043e \u0431\u044b \u0443\u0434\u0438\u0432\u043b\u044f\u043b\u0441\u044f). \u0422\u0430\u043a\u0436\u0435 \u0432\u0438\u0434\u043d\u043e \u043a\u0430\u043a \u0432 \u0441\u0430\u043c\u043e\u043c \u043d\u0430\u0447\u0430\u043b\u0435 \u0444\u0438\u043b\u044c\u0442\u0440 \u043d\u0430\u0447\u0438\u043d\u0430\u0435\u0442 \u043a\u0430\u043b\u0438\u0431\u0440\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u0438 \u0441\u043e\u0432\u0435\u0440\u0448\u0435\u043d\u043d\u043e \u043d\u0435 \u043f\u043e\u043f\u0430\u0434\u0430\u0435\u0442 \u0432 \u0434\u0430\u043d\u043d\u044b\u0435, \u0432\u0435\u0434\u044c \u043c\u044b \u0437\u0430\u0434\u0430\u043b\u0438 \u043d\u0430\u0447\u0430\u043b\u044c\u043d\u044b\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u043b\u0430\u0442\u0435\u043d\u0442\u043d\u044b\u0445 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445 \u0440\u0430\u0432\u043d\u044b\u043c\u0438 \u043d\u0443\u043b\u044e \u0438 \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u044c\u043d\u043e \u043e\u0447\u0435\u043d\u044c \u0431\u043e\u043b\u044c\u0448\u043e\u0439 \u0434\u0438\u0441\u043f\u0435\u0440\u0441\u0438\u0435\u0439 \u043f\u043e\u0440\u044f\u0434\u043a\u0430 1e+10. \u041d\u043e \u043e\u0431\u044b\u0447\u043d\u043e \u0434\u043e\u0441\u0442\u043e\u0430\u0442\u043e\u0447\u043d\u043e \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e (2-5) \u043f\u0435\u0440\u0432\u044b\u0445 \u043f\u043e\u043f\u044b\u0442\u043e\u043a \u0447\u0442\u043e\u0431\u044b \u043f\u043e\u043f\u0430\u0441\u0442\u044c \u0432 \u0440\u0438\u0442\u043c. \u041a\u0441\u0442\u0430\u0442\u0438, \u0432 \u044d\u0442\u043e\u0439 \u0440\u0430\u0431\u043e\u0442\u0435 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043b\u0430\u0441\u044c \u0442\u043e\u0447\u043d\u0430\u044f \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u0444\u0438\u043b\u044c\u0442\u0440\u0430 (exact initialization), \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u043f\u043e\u043c\u043e\u0433\u0430\u0435\u0442 \u043e\u0442\u0444\u0438\u043b\u044c\u0442\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u043c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f\u043c \u0431\u044b\u0441\u0442\u0440\u0435\u0435 \u0441\u0431\u0435\u0436\u0430\u0442\u044c\u0441\u044f \u0441 \u0434\u0430\u043d\u043d\u044b\u043c\u0438.<br \/>  <img decoding=\"async\" src=\"http:\/\/habr.habrastorage.org\/post_images\/e7d\/908\/57a\/e7d90857a201b40077a58673e2e6b40b.png\"\/>  <\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u0412\u0435\u0441\u044c \u0440\u044f\u0434<\/b><\/p>\n<div class=\"spoiler_text\"><img decoding=\"async\" src=\"http:\/\/habr.habrastorage.org\/post_images\/c0b\/1d2\/6a0\/c0b1d26a09e676a7608f5f557005c15f.png\"\/><\/div>\n<\/div>\n<p>  <b>d. \u041e\u0442\u0444\u0438\u043b\u044c\u0442\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u0438 \u0441\u0433\u043b\u0430\u0436\u0435\u043d\u043d\u044b\u0439 \u043d\u0435\u0434\u0435\u043b\u044c\u043d\u044b\u0439 \u0441\u0435\u0437\u043e\u043d\u043d\u044b\u0439 \u0444\u0430\u043a\u0442\u043e\u0440<\/b><br \/>  \u041f\u043e\u0441\u0442\u0435\u043f\u0435\u043d\u043d\u043e \u0440\u0430\u0441\u0442\u0435\u0442 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043e\u0442\u0433\u0440\u0443\u0437\u043e\u043a, \u0443\u0432\u0435\u043b\u0438\u0447\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u0438 \u0434\u043d\u0435\u0432\u043d\u0430\u044f \u0432\u043e\u043b\u0430\u0442\u0438\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u2014 \u043b\u0438\u0448\u044c \u043c\u0433\u043d\u043e\u0432\u0435\u043d\u0438\u0435 \u0442\u044b \u043d\u0430\u0432\u0435\u0440\u0445\u0443 \u0438 \u0441\u0442\u0440\u0435\u043c\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u043f\u0430\u0434\u0430\u0435\u0448\u044c \u0432\u043d\u0438\u0437.<br \/>  <img decoding=\"async\" src=\"http:\/\/habr.habrastorage.org\/post_images\/ea1\/204\/8d7\/ea12048d78422d27660d041be6a49e51.png\"\/>  <\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u0412\u0435\u0441\u044c \u0440\u044f\u0434<\/b><\/p>\n<div class=\"spoiler_text\"><img decoding=\"async\" src=\"http:\/\/habr.habrastorage.org\/post_images\/687\/3d1\/5da\/6873d15da2130973c1d4f10ebdf1f623.png\"\/><\/div>\n<\/div>\n<h4>6. \u041f\u0440\u043e\u0433\u043d\u043e\u0437<\/h4>\n<p>  \u041d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u043d\u044b\u0445 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432 \u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u043e\u0442\u0444\u0438\u043b\u044c\u0442\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0445 \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0445, \u0441\u0442\u0440\u043e\u0438\u043c \u043f\u0440\u043e\u0433\u043d\u043e\u0437 \u043d\u0430 70 \u0434\u043d\u0435\u0439 (10 \u043d\u0435\u0434\u0435\u043b\u044c) \u0438 \u0441\u0440\u0430\u0432\u043d\u0438\u0432\u0430\u0435\u043c \u0441 \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u044e\u0449\u0438\u043c\u0438 \u0434\u0430\u043d\u043d\u044b\u043c\u0438. \u0412 \u0446\u0435\u043b\u043e\u043c \u043f\u0440\u043e\u0433\u043d\u043e\u0437 \u0432\u044b\u0433\u043b\u044f\u0434\u0438\u0442 \u043d\u0435\u043f\u043b\u043e\u0445\u043e, \u0432\u043e\u0442 \u0447\u0442\u043e \u0444\u0438\u043b\u044c\u0442\u0440 \u0436\u0438\u0432\u043e\u0442\u0432\u043e\u0440\u044f\u0449\u0438\u0439 \u0434\u0435\u043b\u0430\u0435\u0442. \u041e\u0441\u043e\u0431\u0435\u043d\u043d\u043e \u0440\u0430\u0434\u0443\u0435\u0442 \u0443\u0433\u0430\u0434\u0430\u043d\u043d\u0430\u044f \u0432\u043e\u043b\u0430\u0442\u0438\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u043f\u043e \u0434\u043d\u044f\u043c \u043d\u0435\u0434\u0435\u043b\u0438. \u0415\u0441\u043b\u0438 \u043f\u0440\u0438\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c\u0441\u044f \u043a\u043e \u0432\u0441\u0435\u0439 \u0434\u043b\u0438\u043d\u0435 \u043f\u043e\u0441\u0442\u0440\u043e\u0435\u043d\u043d\u043e\u0433\u043e \u043f\u0440\u043e\u0433\u043d\u043e\u0437\u0430 \u0438 \u0432\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u0432\u043e\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0435, \u0442\u043e \u0432\u0438\u0434\u043d\u043e \u0435\u0449\u0435 \u0438 \u043a\u0430\u043a \u043f\u0440\u043e\u0433\u043d\u043e\u0437 \u043f\u0440\u043e\u0433\u0438\u0431\u0430\u0435\u0442\u0441\u044f \u043f\u043e\u0434 \u0433\u043e\u0434\u043e\u0432\u043e\u0439 \u0446\u0438\u043a\u043b\u0430 \u043e\u0442\u0433\u0440\u0443\u0437\u043a\u0438. \u0415\u0434\u0438\u043d\u0441\u0442\u0432\u0435\u043d\u043d\u044b\u0439 \u043c\u043e\u043c\u0435\u043d\u0442 \u0433\u0434\u0435 \u043f\u0440\u043e\u0433\u043d\u043e\u0437 \u043d\u0435 \u0441\u0440\u0430\u0431\u043e\u0442\u0430\u043b \u2014 \u0441 26 \u043f\u043e 32 \u0434\u0435\u043d\u044c. \u041d\u043e \u0442\u0430\u043c \u044f\u0432\u043d\u043e \u0441\u043b\u0443\u0447\u0438\u043b\u043e\u0441\u044c \u043f\u043e\u0447\u0442\u0438 \u043d\u0435\u0434\u0435\u043b\u044c\u043d\u043e\u0435 \u043f\u0430\u0434\u0435\u043d\u0438\u0435 \u043e\u0442\u0433\u0440\u0443\u0437\u043a\u0438, \u0442\u0430\u043a \u0436\u0435 \u043a\u0430\u043a \u0438 \u0440\u0435\u0437\u043a\u0438\u0439 \u0441\u043a\u0430\u0447\u043e\u043a \u0441\u0440\u0430\u0437\u0443 \u0437\u0430 \u043d\u0435\u0439, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0432\u0440\u044f\u0434-\u043b\u0438 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e \u0431\u044b\u043b\u043e \u043f\u0440\u0435\u0434\u0432\u0438\u0434\u0435\u0442\u044c, \u0442\u0430\u043a \u043a\u0430\u043a \u043f\u043e\u0434\u043e\u0431\u043d\u044b\u0439 \u0441\u043b\u0443\u0447\u0430\u0439 \u0432\u0441\u0442\u0440\u0435\u0447\u0430\u043b\u0441\u044f \u0442\u043e\u043b\u044c\u043a\u043e \u0435\u0434\u0438\u043d\u043e\u0436\u0434\u044b \u0432 \u0441\u0430\u043c\u043e\u043c \u043d\u0430\u0447\u0430\u043b\u0435 \u0441\u0435\u0440\u0438\u0439, \u0432 \u043e\u0431\u0449\u0435\u043c, \u0430 \u0447\u0442\u043e \u0443\u043f\u0430\u043b, \u0442\u0430\u043a \u0442\u043e \u043e\u0442 \u043f\u043e\u043c\u0443\u0442\u043d\u0435\u043d\u044c\u044f.<br \/>  <img decoding=\"async\" src=\"http:\/\/habr.habrastorage.org\/post_images\/8bc\/ee6\/e70\/8bcee6e7063ed1f2944c67582ade05f2.png\"\/><br \/>  RMSE \u043f\u0440\u043e\u0433\u043d\u043e\u0437\u0430 \u2014 1.112e+005, \u043d\u0430 \u0441\u043b\u0443\u0447\u0430\u0439 \u0435\u0441\u043b\u0438 \u043c\u044b \u0437\u0430\u0445\u043e\u0442\u0438\u043c \u0441\u0440\u0430\u0432\u043d\u0438\u0442\u044c \u043c\u043e\u0434\u0435\u043b\u044c.<\/p>\n<p>  \u041d\u0443 \u0432\u043e\u0442 \u0438 \u0432\u0441\u0435. <\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u041f\u0440\u0438\u043c\u0435\u0447\u0430\u043d\u0438\u0435<\/b><\/p>\n<div class=\"spoiler_text\">\u041d\u0435 \u0441\u043b\u0435\u0434\u0443\u0435\u0442 \u0432\u043e\u0441\u043f\u0440\u0438\u043d\u0438\u043c\u0430\u0442\u044c State Space Models \u043a\u0430\u043a \u0447\u0442\u043e-\u0442\u043e \u0441\u0442\u043e\u044f\u0449\u0435\u0435 \u043e\u0441\u0442\u043e\u0440\u043e\u043d\u044c \u0432 \u044d\u043a\u043e\u043d\u043e\u043c\u0435\u0442\u0440\u0438\u043a\u0435. \u041d\u0430\u043e\u0431\u043e\u0440\u043e\u0442, \u043e\u043d\u0438 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u044e\u0442 \u0441\u043e\u0431\u043e\u0439 \u043e\u0431\u043e\u0431\u0449\u0435\u043d\u043d\u044b\u0439 \u0432\u0430\u0440\u0438\u0430\u043d\u0442 \u0434\u043b\u044f \u043c\u043d\u043e\u0433\u0438\u0445 \u0431\u043e\u043b\u0435\u0435 \u0441\u043f\u0435\u0446\u0438\u0444\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u043c\u043e\u0434\u0435\u043b\u0435\u0439. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, MA(1) \u043f\u0440\u043e\u0446\u0435\u0441\u0441 <br \/>  <img decoding=\"async\" src=\"http:\/\/habr.habrastorage.org\/post_images\/d20\/bf3\/813\/d20bf3813166bfabe346d13115c84cdf.png\" width=\"600\"\/><br \/>  \u043b\u0435\u0433\u043a\u043e \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u0432 \u0444\u043e\u0440\u043c\u0435 SSM:<br \/>  <img decoding=\"async\" src=\"http:\/\/habr.habrastorage.org\/post_images\/7ea\/a95\/e7b\/7eaa95e7bd766ec630d4f1d691b585fb.png\" width=\"600\"\/><br \/>  \u0418\u043b\u0438 \u0436\u0435 ARMA(2,1) \u043f\u0440\u043e\u0446\u0435\u0441\u0441:<br \/>  <img decoding=\"async\" src=\"http:\/\/habr.habrastorage.org\/post_images\/4bd\/ea0\/e11\/4bdea0e11ebadf465288b22609b556a3.png\" width=\"600\"\/><br \/>  \u0423\u043f\u0430\u043a\u043e\u0432\u0430\u043d\u043d\u044b\u0439 \u0432 \u0444\u043e\u0440\u043c\u0430\u0442 SSM:<br \/>  <img decoding=\"async\" src=\"http:\/\/habr.habrastorage.org\/post_images\/3fc\/ac5\/ea1\/3fcac5ea1de4d90c9f19b9f4bbe90aaf.png\" width=\"600\"\/>  <\/div>\n<\/div>\n<p>  <\/p>\n<div class=\"spoiler\"><b class=\"spoiler_title\">\u041b\u0438\u0442\u0435\u0440\u0430\u0442\u0443\u0440\u0430 \u043f\u043e \u0442\u0435\u043c\u0435<\/b><\/p>\n<div class=\"spoiler_text\">\n<ul>\n<li>Durbin, J., and Koopman, S.J. \u00abTime Series Analysis by State Space Methods\u00bb. Oxford: Oxford University Press, 2001.<\/li>\n<li>Durbin, J., and Koopman, S.J. \u00abA simple and efficient simulation smoother for state space time series analysis\u00bb Biometrika vol. 89, issue 3, 2002.<\/li>\n<li>Harvey, A.C., and Jaeger, A. \u201cDetrending, stylised facts and the business cycle.\u201d Journal of Applied Econometrics (8), 1993.<\/li>\n<li>Harvey, A.C. \u00abForecasting, Structural Time Series Models and the Kalman Filter\u00bb. Cambridge: Cambridge University Press, 1989.<\/li>\n<\/ul>\n<p>  <\/div>\n<\/div>\n<div class=\"clear\"><\/div>\n<\/p><\/div>\n<p> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"http:\/\/habrahabr.ru\/post\/209640\/\"> http:\/\/habrahabr.ru\/post\/209640\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<div class=\"content html_format\">   \t\u041d\u0435\u0434\u0430\u0432\u043d\u043e <a href=\"http:\/\/habrahabr.ru\/users\/kuznetsovin\/\" class=\"user_link\">kuznetsovin<\/a> \u043e\u043f\u0443\u0431\u043b\u0438\u043a\u043e\u0432\u0430\u043b <a href=\"http:\/\/habrahabr.ru\/post\/207160\/\">\u043f\u043e\u0441\u0442<\/a> \u043e\u0431 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0438 \u041f\u0438\u0442\u043e\u043d\u0430 \u0434\u043b\u044f \u0430\u043d\u0430\u043b\u0438\u0437\u0430 \u0432\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445 \u0440\u044f\u0434\u043e\u0432 \u0432 \u044d\u043a\u043e\u043d\u043e\u043c\u0438\u043a\u0435. \u0412 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u043c\u043e\u0434\u0435\u043b\u0438 \u0431\u044b\u043b\u0430 \u0432\u044b\u0431\u0440\u0430\u043d\u0430 \u00ab\u0440\u0430\u0431\u043e\u0447\u0430\u044f \u043b\u043e\u0448\u0430\u0434\u043a\u0430\u00bb \u044d\u043a\u043e\u043d\u043e\u043c\u0435\u0442\u0440\u0438\u043a\u0438 \u2014 ARIMA, \u043f\u043e\u0436\u0430\u043b\u0443\u0439, \u043e\u0434\u043d\u0430 \u0438\u0437 \u043d\u0430\u0438\u0431\u043e\u043b\u0435\u0435 \u0440\u0430\u0441\u043f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0435\u043d\u043d\u044b\u0445 \u043c\u043e\u0434\u0435\u043b\u0435\u0439 \u0434\u043b\u044f \u0432\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445. \u0412 \u0442\u043e \u0436\u0435 \u0432\u0440\u0435\u043c\u044f, \u0433\u043b\u0430\u0432\u043d\u044b\u0439 \u043d\u0435\u0434\u043e\u0441\u0442\u0430\u0442\u043e\u043a \u0410RIMA-\u043f\u043e\u0434\u043e\u0431\u043d\u044b\u0445 \u043c\u043e\u0434\u0435\u043b\u0435\u0439 \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e \u043e\u043d\u0438 \u043d\u0435 \u043f\u0440\u0438\u0441\u043f\u043e\u0441\u043e\u0431\u043b\u0435\u043d\u044b \u0434\u043b\u044f \u0440\u0430\u0431\u043e\u0442\u044b \u0441 \u043d\u0435\u0441\u0442\u0430\u0446\u0438\u043e\u043d\u0430\u0440\u043d\u044b\u043c\u0438 \u0440\u044f\u0434\u0430\u043c\u0438. \u041d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0435\u0441\u043b\u0438 \u0432 \u0434\u0430\u043d\u043d\u044b\u0445 \u043f\u0440\u0438\u0441\u0443\u0442\u0441\u0442\u0432\u0443\u0435\u0442 \u0442\u0440\u0435\u043d\u0434 \u0438\u043b\u0438 \u0441\u0435\u0437\u043e\u043d\u043d\u043e\u0441\u0442\u044c, \u0442\u043e \u043c\u0430\u0442\u0435\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0435 \u043e\u0436\u0438\u0434\u0430\u043d\u0438\u0435 \u0431\u0443\u0434\u0435\u0442 \u0438\u043c\u0435\u0442\u044c \u0440\u0430\u0437\u043d\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0432 \u0440\u0430\u0437\u043d\u044b\u0445 \u0443\u0447\u0430\u0441\u0442\u043a\u0430\u0445 \u0441\u0435\u0440\u0438\u0438 \u2014 <img decoding=\"async\" src=\"http:\/\/habr.habrastorage.org\/post_images\/582\/dda\/a4c\/582ddaa4cdc1feca2d42daab4d29a29e.png\" height=\"25\"\/>, \u0447\u0442\u043e \u043d\u0435 \u0435\u0441\u0442\u044c \u0445\u043e\u0440\u043e\u0448\u043e. \u0414\u043b\u044f \u0438\u0437\u0431\u0435\u0436\u0430\u043d\u0438\u044f \u044d\u0442\u043e\u0433\u043e, \u0410RIMA \u043f\u0440\u0435\u0434\u043f\u043e\u043b\u0430\u0433\u0430\u0435\u0442 \u0440\u0430\u0431\u043e\u0442\u0430\u0442\u044c \u043d\u0435 \u0441 \u0438\u0441\u0445\u043e\u0434\u043d\u044b\u043c\u0438 \u0434\u0430\u043d\u043d\u044b\u043c\u0438, \u0430 \u0441 \u0438\u0445 \u0440\u0430\u0437\u043d\u043e\u0441\u0442\u044c\u044e (\u0442\u0430\u043a \u043d\u0430\u0437\u044b\u0432\u0430\u0435\u043c\u043e\u0435 \u0434\u0438\u0444\u0444\u0435\u0440\u0435\u043d\u0446\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u2014 \u043e\u0442 \u00abtaking a difference\u00bb). \u0412\u0441\u0435 \u0431\u044b \u0445\u043e\u0440\u043e\u0448\u043e, \u043d\u043e \u0442\u0443\u0442 \u0432\u043e\u0437\u043d\u0438\u043a\u0430\u044e\u0442 \u0434\u0432\u0435 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u044b \u2014 (\u0430) \u043c\u044b \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e \u0442\u0435\u0440\u044f\u0435\u043c \u0437\u043d\u0430\u0447\u0438\u043c\u0443\u044e \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u0431\u0435\u0440\u044f \u0440\u0430\u0437\u043d\u0438\u0446\u0443 \u0440\u044f\u0434\u0430, \u0438 (\u0431) \u0443\u043f\u0443\u0441\u043a\u0430\u0435\u0442\u0441\u044f \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0440\u0430\u0437\u043b\u043e\u0436\u0438\u0442\u044c \u0440\u044f\u0434 \u0434\u0430\u043d\u043d\u044b\u0445 \u043d\u0430 \u0441\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u044e\u0449\u0438\u0435 \u043a\u043e\u043c\u043f\u043e\u043d\u0435\u043d\u0442\u044b \u2014 \u0442\u0440\u0435\u043d\u0434, \u0446\u0438\u043a\u043b, \u0438 \u0442.\u043f. \u041f\u043e\u044d\u0442\u043e\u043c\u0443, \u0432 \u0434\u0430\u043d\u043d\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u044f \u0445\u043e\u0442\u0435\u043b \u0431\u044b \u043f\u0440\u0438\u0432\u0435\u0441\u0442\u0438 \u0430\u043b\u044c\u0442\u0435\u0440\u043d\u0430\u0442\u0438\u0432\u043d\u044b\u0439 \u043c\u0435\u0442\u043e\u0434 \u0430\u043d\u0430\u043b\u0438\u0437\u0430 \u2014 State Space Modeling (SSM), \u0432 \u0440\u0443\u0441\u0441\u043a\u043e\u043c \u043f\u0435\u0440\u0435\u0432\u043e\u0434\u0435 \u2014 \u041c\u043e\u0434\u0435\u043b\u044c \u041f\u0440\u043e\u0441\u0442\u0440\u0430\u043d\u0441\u0442\u0432\u0430 \u0421\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u0439.  <\/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-209640","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/209640","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=209640"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/209640\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=209640"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=209640"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=209640"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}