{"id":351319,"date":"2024-05-20T12:17:28","date_gmt":"2024-05-20T12:17:28","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=351319"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=351319","title":{"rendered":"<span>\u0410\u043d\u0430\u043b\u0438\u0437 \u0432\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445 \u0440\u044f\u0434\u043e\u0432, \u0438\u043b\u0438 \u043a\u0430\u043a \u043f\u0440\u0435\u0434\u0441\u043a\u0430\u0437\u0430\u0442\u044c \u043f\u043e\u0433\u043e\u0434\u0443 \u043d\u0430 \u0437\u0430\u0432\u0442\u0440\u0430<\/span>"},"content":{"rendered":"<div><!--[--><!--]--><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<h2>\u0412\u0432\u0435\u0434\u0435\u043d\u0438\u0435<\/h2>\n<p><em>\u0441\u0442\u0430\u0442\u044c\u044f \u043f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u043b\u0435\u043d\u0430 <\/em><a href=\"https:\/\/github.com\/Ultrageopro1966\" rel=\"noopener noreferrer nofollow\"><em>UltraGeoPro<\/em><\/a><\/p>\n<p><strong>\u0412 \u0434\u0430\u043d\u043d\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u0431\u0443\u0434\u0443\u0442 \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0435\u043d\u044b \u0441\u043f\u043e\u0441\u043e\u0431\u044b \u0430\u043d\u0430\u043b\u0438\u0437\u0430 \u0432\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445 \u0440\u044f\u0434\u043e\u0432.<\/strong> \u0420\u0430\u0437\u0431\u0435\u0440\u0435\u043c \u043e\u0441\u043d\u043e\u0432\u043d\u044b\u0435 \u043c\u0435\u0442\u043e\u0434\u044b \u043f\u0440\u043e\u0433\u043d\u043e\u0437\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0443\u043f\u043e\u0440\u044f\u0434\u043e\u0447\u0435\u043d\u043d\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445.<\/p>\n<p>\u041f\u0440\u043e\u0441\u0442\u044b\u043c\u0438 \u0441\u043b\u043e\u0432\u0430\u043c\u0438, <strong>\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 \u0440\u044f\u0434<\/strong> &#8212; \u044d\u0442\u043e \u0434\u0430\u043d\u043d\u044b\u0435, \u0443\u043f\u043e\u0440\u044f\u0434\u043e\u0447\u0435\u043d\u043d\u044b\u0435 \u043f\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u0438 (\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043a\u0443\u0440\u0441 \u0434\u043e\u043b\u043b\u0430\u0440\u0430).<br \/> \u0410\u043d\u0430\u043b\u0438\u0437 \u0432\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445 \u0440\u044f\u0434\u043e\u0432 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u044c \u043e\u0441\u043d\u043e\u0432\u043d\u044b\u0435 \u0437\u0430\u043a\u043e\u043d\u043e\u043c\u0435\u0440\u043d\u043e\u0441\u0442\u0438 \u0432 \u0434\u0430\u043d\u043d\u044b\u0445 \u0438 \u043f\u0440\u043e\u0433\u043d\u043e\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0438\u0445.<\/p>\n<figure class=\"\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w780q1\/getpro\/habr\/post_images\/50c\/d63\/ba8\/50cd63ba8eb093ff8e7b76a390d21693.jpg\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/post_images\/50c\/d63\/ba8\/50cd63ba8eb093ff8e7b76a390d21693.jpg\" data-blurred=\"true\"\/><\/figure>\n<blockquote>\n<p>\u041f\u0440\u0438\u043c\u0435\u0440 \u0432\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0433\u043e \u0440\u044f\u0434\u0430 (\u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u044c \u043f\u0440\u043e\u0434\u0430\u0436 \u043e\u0442 \u0432\u0440\u0435\u043c\u0435\u043d\u0438)<\/p>\n<\/blockquote>\n<p>\u041d\u0430 \u0442\u0435\u043a\u0443\u0449\u0438\u0439 \u043c\u043e\u043c\u0435\u043d\u0442 \u0431\u044b\u043b\u043e \u0438\u0437\u043e\u0431\u0440\u0435\u0442\u0435\u043d\u043e \u0431\u043e\u043b\u044c\u0448\u043e\u0435 \u043a\u043e\u043b-\u0432\u043e \u043c\u0435\u0442\u043e\u0434\u043e\u0432 \u0440\u0430\u0431\u043e\u0442\u044b \u0441\u043e \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u043c\u0438 \u0434\u0430\u043d\u043d\u044b\u043c\u0438, \u0442\u0430\u043a \u0447\u0442\u043e \u043c\u044b \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u043b\u0438\u0448\u044c \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0438\u0437 \u043d\u0438\u0445 \u043d\u0430 \u043f\u0440\u0438\u043c\u0435\u0440\u0435 \u0434\u0430\u043d\u043d\u044b\u0445 \u043e \u043f\u043e\u0433\u043e\u0434\u0435 \u0441 2013 \u0433\u043e\u0434\u0430 \u043f\u043e 2017.<\/p>\n<h2>\u041e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0430 \u0434\u0430\u043d\u043d\u044b\u0445<\/h2>\n<hr\/>\n<p><em>\u0414\u043b\u044f \u0430\u043d\u0430\u043b\u0438\u0437\u0430 \u0432\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445 \u0440\u044f\u0434\u043e\u0432 \u0438 \u0438\u0445 \u043f\u0440\u043e\u0433\u043d\u043e\u0437\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0431\u0443\u0434\u0435\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d \u044f\u0437\u044b\u043a Python \u0432 \u0441\u0432\u044f\u0437\u043a\u0435 \u0441\u043e \u0441\u0442\u043e\u0440\u043e\u043d\u043d\u0438\u043c\u0438 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430\u043c\u0438 (pandas, numpy, tensorflow, matplotlib). \u0421\u0442\u0430\u0442\u044c\u044f \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e\u0435 \u043a\u043e\u043b-\u0432\u043e \u0432\u0438\u0437\u0443\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0439 \u0438 \u043f\u043e\u044f\u0441\u043d\u0435\u043d\u0438\u0439 \u0434\u043b\u044f \u043f\u043e\u043d\u0438\u043c\u0430\u043d\u0438\u044f \u0435\u0435 \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u043d\u0438\u044f.<\/em><\/p>\n<h3>\u0417\u0430\u0433\u0440\u0443\u0437\u043a\u0430 \u0434\u0430\u0442\u0430\u0441\u0435\u0442\u0430<\/h3>\n<pre><code class=\"python\"># \u0418\u043c\u043f\u043e\u0440\u0442 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a from datetime import datetime  import numpy as np import pandas as pd from matplotlib import pyplot as plt  # \u0412\u044b\u0433\u0440\u0443\u0437\u043a\u0430 \u0434\u0430\u043d\u043d\u044b\u0445 \u0438\u0437 \u0442\u0430\u0431\u043b\u0438\u0446\u044b \u0441 \u0442\u0440\u0435\u043d\u0438\u0440\u043e\u0432\u043e\u0447\u043d\u044b\u043c\u0438 \u0434\u0430\u043d\u043d\u044b\u043c\u0438 train_data: np.ndarray = pd.read_csv(\"DailyDelhiClimateTrain.csv\").values  # \u0412\u044b\u0433\u0440\u0443\u0437\u043a\u0430 \u0434\u0430\u043d\u043d\u044b\u0445 \u0438\u0437 \u0442\u0430\u0431\u043b\u0438\u0446\u044b \u0441 \u0442\u0435\u0441\u0442\u043e\u0432\u044b\u043c\u0438 \u0434\u0430\u043d\u043d\u044b\u043c\u0438 test_data: np.ndarray = pd.read_csv(\"DailyDelhiClimateTest.csv\").values <\/code><\/pre>\n<p>\u0418\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0435 \u043f\u0435\u0440\u0432\u044b\u0445 \u0441\u0442\u0440\u043e\u043a \u0442\u0435\u0441\u0442\u043e\u0432\u043e\u0439 \u0442\u0430\u0431\u043b\u0438\u0446\u044b:<\/p>\n<figure class=\"\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/post_images\/ca6\/d55\/0a0\/ca6d550a025b94c33b8724052cb7b11b.png\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/post_images\/ca6\/d55\/0a0\/ca6d550a025b94c33b8724052cb7b11b.png\"\/><\/figure>\n<blockquote>\n<p><a href=\"https:\/\/www.kaggle.com\/datasets\/sumanthvrao\/daily-climate-time-series-data\" rel=\"noopener noreferrer nofollow\">\u0421\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u0442\u0430\u0431\u043b\u0438\u0446\u0443<\/a><\/p>\n<\/blockquote>\n<h3>\u041d\u043e\u0440\u043c\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u0434\u0430\u043d\u043d\u044b\u0445<\/h3>\n<p><em>\u0412 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u0434\u043b\u044f \u0443\u0434\u043e\u0431\u0441\u0442\u0432\u0430 \u043c\u044b \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u0442\u043e\u043b\u044c\u043a\u043e \u0442\u0435\u043c\u043f\u0435\u0440\u0430\u0442\u0443\u0440\u0443, \u043d\u043e \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0432\u0437\u044f\u0442\u044c \u043b\u044e\u0431\u043e\u0439 \u0434\u0440\u0443\u0433\u043e\u0439 \u0441\u0442\u043e\u043b\u0431\u0435\u0446 \u0434\u0430\u0442\u0430\u0441\u0435\u0442\u0430. \u0418\u043b\u0438 \u0434\u0430\u0436\u0435 \u0432\u0441\u0435 \u0441\u0440\u0430\u0437\u0443.<\/em><\/p>\n<p>\u0415\u0441\u0442\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u043e, \u043d\u0438 \u043e\u0434\u043d\u0430 \u043c\u043e\u0434\u0435\u043b\u044c \u043d\u0435 \u0441\u043c\u043e\u0436\u0435\u0442 \u043f\u043e\u043d\u044f\u0442\u044c, \u0447\u0442\u043e \u0437\u043d\u0430\u0447\u0438\u0442 \u0441\u0442\u0440\u043e\u043a\u043e\u0432\u043e\u0435 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u0434\u0430\u0442\u044b &#171;2017-01-01&#187;, \u0442\u0430\u043a \u0447\u0442\u043e \u0434\u0430\u0432\u0430\u0439\u0442\u0435 \u043f\u0440\u0438\u0432\u0435\u0434\u0435\u043c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u043f\u0435\u0440\u0432\u043e\u0433\u043e \u0441\u0442\u043e\u043b\u0431\u0446\u0430 \u043a \u0446\u0435\u043b\u044b\u043c \u0447\u0438\u0441\u043b\u0430\u043c (\u043a\u043e\u043b-\u0432\u043e \u0434\u043d\u0435\u0439 \u0441 \u043d\u0430\u0447\u0430\u043b\u0430 \u043e\u0442\u0441\u0447\u0435\u0442\u0430)<\/p>\n<p>\u0424\u0443\u043d\u043a\u0446\u0438\u044f \u043f\u0435\u0440\u0435\u0432\u043e\u0434\u0430 \u0434\u0430\u0442\u044b \u0432 \u043a\u043e\u043b-\u0432\u043e \u0434\u043d\u0435\u0439 \u043e\u0442 2013-01-01 (\u0441\u0430\u043c\u0430\u044f \u043f\u0435\u0440\u0432\u0430\u044f \u0434\u0430\u0442\u0430 \u0432 \u0442\u0430\u0431\u043b\u0438\u0446\u0435):<\/p>\n<pre><code class=\"python\">def days_since_zero_date(date_str: str) -> int: # \u041f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u0441\u0442\u0440\u043e\u043a\u0438 \u0432 \u043e\u0431\u044a\u0435\u043a\u0442 datetime date_format: str = \"%Y-%m-%d\" date_obj = datetime.strptime(date_str, date_format)  # \u041d\u0443\u043b\u0435\u0432\u0430\u044f \u0434\u0430\u0442\u0430 zero_date = datetime.strptime(\"2013-01-01\", date_format)  # \u0412\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u0435 \u0440\u0430\u0437\u043d\u0438\u0446\u044b \u0432 \u0434\u043d\u044f\u0445 delta = date_obj - zero_date days = delta.days   return days <\/code><\/pre>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u043f\u0435\u0440\u0435\u0432\u0435\u0434\u0435\u043c \u0432\u0441\u0435 \u0434\u0430\u0442\u044b \u0432 \u0437\u0430\u0433\u0440\u0443\u0436\u0435\u043d\u043d\u044b\u0445 \u0442\u0430\u0431\u043b\u0438\u0446\u0430\u0445 \u0432 \u0434\u043d\u0438 \u0438 \u0432\u044b\u0432\u0435\u0434\u0435\u043c \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442:<\/p>\n<pre><code class=\"python\"># \u041f\u0440\u0438\u043c\u0435\u043d\u044f\u0435\u043c \u0440\u0430\u043d\u0435\u0435 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u0443\u044e \u0444\u0443\u043d\u043a\u0446\u0438\u044e \u043a\u043e \u0432\u0441\u0435\u043c \u0434\u0430\u0442\u0430\u043c \u0434\u0430\u0442\u0430\u0441\u0435\u0442\u0430 train_data[:, 0] = np.vectorize(days_since_zero_date)(train_data[:, 0]) test_data[:, 0] = np.vectorize(days_since_zero_date)(test_data[:, 0])  train_data = train_data.astype(\"float\") test_data = test_data.astype(\"float\")  print(train_data[0]) # \u0412\u044b\u0432\u043e\u0434 - [0 10.0 84.5 0.0 1015.6666666666666] # \u0412\u0438\u0434\u043d\u043e, \u0447\u0442\u043e \u0432\u0441\u0435 \u0434\u0430\u0442\u044b \u043f\u0440\u0435\u0432\u0440\u0430\u0442\u0438\u043b\u0438\u0441\u044c \u0432 \u0434\u043d\u0438 <\/code><\/pre>\n<p>\u0414\u0430\u043b\u0435\u0435 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u043d\u043e\u0440\u043c\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0435 \u043f\u043e \u0444\u043e\u0440\u043c\u0443\u043b\u0435 (\u043c\u0435\u0442\u043e\u0434 Z-\u041d\u043e\u0440\u043c\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f)<\/p>\n<p><img decoding=\"async\" class=\"formula\" source=\"x_{i}' = \\frac{x_{i} - \\overline{X}}{\\sigma_{x}}\" alt=\"x_{i}' = \\frac{x_{i} - \\overline{X}}{\\sigma_{x}}\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/6\/62\/623\/623b5cd9f3daa7eb3488b8bcb21f989f.svg\" width=\"auto\" height=\"auto\"\/><\/p>\n<p>\u0413\u0434\u0435:<\/p>\n<ol>\n<li>\n<p><img decoding=\"async\" class=\"formula inline\" source=\"\\overline{X}\" alt=\"\\overline{X}\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/1\/1c\/1ce\/1ce0cdaf66b9bf4b74d1f118c30080ef.svg\" width=\"auto\" height=\"auto\"\/> &#8212; \u0441\u0440\u0435\u0434\u043d\u0435\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0432\u044b\u0431\u043e\u0440\u043a\u0438<\/p>\n<\/li>\n<li>\n<p><img decoding=\"async\" class=\"formula inline\" source=\"\\sigma_{x}\" alt=\"\\sigma_{x}\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/4\/41\/41e\/41e8b908e5377bca288dab37d9e6116a.svg\" width=\"auto\" height=\"auto\"\/> &#8212; \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u043e\u0435 \u043e\u0442\u043a\u043b\u043e\u043d\u0435\u043d\u0438\u0435 \u0432\u044b\u0431\u043e\u0440\u043a\u0438<\/p>\n<\/li>\n<li>\n<p><img decoding=\"async\" class=\"formula inline\" source=\"x_{i}\" alt=\"x_{i}\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/0\/05\/05e\/05e42209d67fe1eb15a055e9d3b3770e.svg\" width=\"auto\" height=\"auto\"\/> &#8212; \u043d\u0435\u043d\u043e\u0440\u043c\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043d\u043d\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435<\/p>\n<\/li>\n<li>\n<p><img decoding=\"async\" class=\"formula inline\" source=\"x_{i}'\" alt=\"x_{i}'\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/d\/d6\/d64\/d64ab5a44c581f95fea0c03114af7c69.svg\" width=\"auto\" height=\"auto\"\/> &#8212; \u043d\u043e\u0440\u043c\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043d\u043d\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435<\/p>\n<\/li>\n<\/ol>\n<pre><code class=\"python\">class Normalize: def __init__(self, data: np.ndarray) -> None: self.data: np.ndarray = np.copy(data) # \u0417\u0430\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u043c \u043a\u043e\u043f\u0438\u044e \u0434\u0430\u043d\u043d\u044b\u0445  # \u0412\u044b\u0447\u0438\u0441\u043b\u044f\u0435\u043c \u0441\u0440\u0435\u0434\u043d\u0435\u0435 \u043f\u043e \u043a\u0430\u0436\u0434\u043e\u043c\u0443 \u0441\u0442\u043e\u043b\u0431\u0446\u0443 self.__mean: np.ndarray = data.mean(axis=0) # \u0412\u044b\u0447\u0438\u0441\u043b\u044f\u0435\u043c \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u043e\u0435 \u043e\u0442\u043a\u043b\u043e\u043d\u0435\u043d\u0438\u0435 \u043f\u043e \u043a\u0430\u0436\u0434\u043e\u043c\u0443 \u0441\u0442\u043e\u043b\u0431\u0446\u0443 self.__std_dev: np.ndarray = data.std(axis=0)  def normalizeData(self) -> np.ndarray: # \u0412\u043e\u0437\u0432\u0440\u0430\u0442 \u043d\u043e\u0440\u043c\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043d\u043d\u044b\u0445 \u0434\u0430\u043d\u043d\u0430\u0445 \u043f\u043e \u0444\u043e\u0440\u043c\u0443\u043b\u0435 return (self.data - self.__mean) \/ self.__std_dev  def DeNormalizeData( self, normalized_data: np.ndarray, axes: list[int] = [0, 1, 2, 3] ) -> np.ndarray: # \u0414\u0435\u043d\u043e\u0440\u043c\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u0434\u043d\u0430\u043d\u043d\u044b\u0445 \u043f\u043e \u0443\u043a\u0430\u0437\u0430\u043d\u043d\u043e\u0439 \u043e\u0441\u0438 return normalized_data * self.__std_dev[axes] + self.__mean[axes]  # \u041d\u043e\u0440\u043c\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u0442\u0435\u043c\u043f\u0435\u0440\u0430\u0442\u0443\u0440\u044b train_normalize_class = Normalize(train_data[:, 1:]) train_data[:, 1:] = train_normalize_class.normalizeData() <\/code><\/pre>\n<p>\u0412 \u0434\u0430\u043d\u043d\u043e\u043c \u0444\u0440\u0430\u0433\u043c\u0435\u043d\u0442\u0435 \u043c\u044b \u0441\u043e\u0437\u0434\u0430\u043b\u0438 \u043a\u043b\u0430\u0441\u0441, \u0440\u0435\u0430\u043b\u0438\u0437\u0443\u044e\u0449\u0438\u0439 \u043b\u043e\u0433\u0438\u043a\u0443 \u043d\u043e\u0440\u043c\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u0434\u0430\u043d\u043d\u044b\u0445. \u0412 \u0434\u0432\u0443\u0445 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u0445 \u0441\u0442\u0440\u043e\u043a\u0430\u0445 \u043d\u043e\u0440\u043c\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043b\u0438 \u043e\u0431\u0443\u0447\u0430\u044e\u0449\u0443\u044e \u0432\u044b\u0431\u043e\u0440\u043a\u0443 (\u043a\u0440\u043e\u043c\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439 \u0434\u043d\u0435\u0439). \u041c\u0435\u0442\u043e\u0434 <code>DeNormalizeData<\/code> \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0438\u043d\u0442\u0435\u0440\u043f\u0440\u0435\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043b\u044e\u0431\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435, \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u043d\u044b\u0435 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043c\u043e\u0434\u0435\u043b\u0438, \u0432 \u043f\u0440\u0438\u0432\u044b\u0447\u043d\u043e\u0439 \u043d\u0430\u043c \u0444\u043e\u0440\u043c\u0435.<\/p>\n<p>\u041f\u043e\u0441\u0442\u0440\u043e\u0438\u043c \u0433\u0440\u0430\u0444\u0438\u043a \u0442\u0435\u043c\u043f\u0435\u0440\u0430\u0442\u0443\u0440\u044b \u0434\u043b\u044f \u043d\u0430\u0433\u043b\u044f\u0434\u043d\u043e\u0441\u0442\u0438.<\/p>\n<pre><code class=\"python\"># \u0421\u043e\u0437\u0434\u0430\u0435\u043c \u043f\u043e\u043b\u0435 \u0433\u0440\u0430\u0444\u0438\u043a\u0430 fig, ax = plt.subplots(1, 2)  # \u041b\u0438\u043c\u0438\u0442\u044b \u043d\u0430 \u043e\u0441\u044f\u0445 ax[0].set_ylim([-10, 40]) ax[1].set_ylim([-10, 40])  # \u041f\u043e\u0434\u043f\u0438\u0441\u0438 \u043e\u0441\u0435\u0439 ax[0].set_ylabel(\"\u0422\u0435\u043c\u043f\u0435\u0440\u0435\u0442\u0443\u0440\u0430\") ax[0].set_xlabel(\"\u0414\u0435\u043d\u044c\") ax[1].set_xlabel(\"\u0414\u0435\u043d\u044c\")  ax[0].set_title(\"\u041d\u043e\u0440\u043c\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043d\u043d\u0430\u044f \u0442\u0435\u043c\u043f\u0435\u0440\u0430\u0442\u0443\u0440\u0430\") ax[1].set_title(\"\u0420\u0435\u0430\u043b\u044c\u043d\u0430\u044f \u0442\u0435\u043c\u043f\u0435\u0440\u0430\u0442\u0443\u0440\u0430\")  # \u0421\u0435\u0442\u043a\u0430 \u043d\u0430 \u043e\u0441\u044f\u0445 ax[0].grid() ax[1].grid()  # \u041e\u0442\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0435 \u043d\u043e\u0440\u043c\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043d\u043d\u044b\u0445 \u0438 \u043d\u0435\u043d\u043e\u0440\u043c\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043d\u043d\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445 ax[0].plot(train_data[:, 1], c=\"b\", linewidth=1) ax[1].plot( train_normalize_class.DeNormalizeData(train_data[:, 1], axes=[0]), c=\"r\", linewidth=1, )  plt.show() <\/code><\/pre>\n<figure class=\"\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/post_images\/a5d\/a40\/9c3\/a5da409c3381eeec5b162ee09208c330.png\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/post_images\/a5d\/a40\/9c3\/a5da409c3381eeec5b162ee09208c330.png\"\/><\/figure>\n<blockquote>\n<p>\u0412\u0438\u0434\u043d\u043e, \u0447\u0442\u043e \u043d\u043e\u0440\u043c\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043d\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 \u043d\u0435 \u043f\u043e\u0442\u0435\u0440\u044f\u043b\u0438 \u0441\u0432\u043e\u044e \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u043e\u043d\u043d\u0443\u044e \u0446\u0435\u043d\u043d\u043e\u0441\u0442\u044c, \u043b\u0435\u0433\u043a\u043e \u0432\u043e\u0441\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u044e\u0442\u0441\u044f \u0432 \u0440\u0435\u0430\u043b\u044c\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 (\u0432\u0442\u043e\u0440\u043e\u0439 \u0433\u0440\u0430\u0444\u0438\u043a) \u0438 \u0431\u043e\u043b\u0435\u0435 \u0443\u0434\u043e\u0431\u043d\u044b \u0434\u043b\u044f \u0430\u043d\u0430\u043b\u0438\u0437\u0430 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043c\u043e\u0434\u0435\u043b\u0435\u0439 \u043c\u0430\u0448\u0438\u043d\u043d\u043e\u0433\u043e \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f. <a href=\"https:\/\/medium.com\/@urvashilluniya\/why-data-normalization-is-necessary-for-machine-learning-models-681b65a05029#:~:text=Normalization%20is%20a%20technique%20often,dataset%20does%20not%20require%20normalization.\" rel=\"noopener noreferrer nofollow\">\u041e \u043f\u043e\u043b\u044c\u0437\u0435 \u043d\u043e\u0440\u043c\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438<\/a><\/p>\n<\/blockquote>\n<h3>\u0421\u0433\u043b\u0430\u0436\u0438\u0432\u0430\u043d\u0438\u0435 \u0448\u0443\u043c\u0430<\/h3>\n<p>\u0421\u0433\u043b\u0430\u0436\u0438\u0432\u0430\u0442\u044c \u0448\u0443\u043c \u0431\u0443\u0434\u0435\u043c \u043c\u0435\u0442\u043e\u0434\u043e\u043c \u0441\u043a\u043e\u043b\u044c\u0437\u044f\u0449\u0435\u0439 \u0441\u0440\u0435\u0434\u043d\u0435\u0439. \u0421\u0443\u0442\u044c \u043c\u0435\u0442\u043e\u0434\u0430 \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e \u043c\u044b \u043f\u0440\u043e\u0445\u043e\u0434\u0438\u043c\u0441\u044f \u043f\u043e \u0432\u0441\u0435\u043c\u0443 \u0433\u0440\u0430\u0444\u0438\u043a\u0443 &#171;\u043e\u043a\u043d\u043e\u043c&#187; \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u043e\u0433\u043e \u0440\u0430\u0437\u043c\u0435\u0440\u0430. \u041f\u0435\u0440\u0435\u043c\u0435\u0449\u0430\u044f \u043e\u043a\u043d\u043e, \u0432\u044b\u0447\u0438\u0441\u043b\u044f\u0435\u043c \u0441\u0440\u0435\u0434\u043d\u0435\u0435 \u0432\u0441\u0435\u0445 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0432 \u043d\u0435\u0433\u043e \u043f\u043e\u043f\u0430\u043b\u0438. \u0422\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c \u043c\u044b \u0441\u0433\u043b\u0430\u0436\u0438\u0432\u0430\u0435\u043c \u0432\u0435\u0441\u044c \u0448\u0443\u043c \u0433\u0440\u0430\u0444\u0438\u043a\u0430, \u0442\u0430\u043a \u043a\u0430\u043a \u043e\u043d \u043a\u043e\u043c\u043f\u0435\u043d\u0441\u0438\u0440\u0443\u0435\u0442 \u0441\u0430\u043c \u0441\u0435\u0431\u044f.<br \/> <em>\u041d\u0430 \u0441\u0430\u043c\u043e\u043c \u0434\u0435\u043b\u0435, \u0434\u043b\u044f \u0440\u0435\u0448\u0435\u043d\u0438\u044f \u043d\u0430\u0448\u0435\u0439 \u0437\u0430\u0434\u0430\u0447\u0438 \u043f\u0440\u0438\u043c\u0435\u043d\u0435\u043d\u0438\u0435 \u0434\u0430\u043d\u043d\u043e\u0433\u043e \u043c\u0435\u0442\u043e\u0434\u0430 \u043d\u0435 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u043c, \u0432 \u0441\u0442\u0430\u0442\u044c\u0435 \u043e\u043d \u043f\u0440\u0438\u0432\u0435\u0434\u0435\u043d \u0441\u043a\u043e\u0440\u0435\u0435 \u0432 \u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0445 \u0446\u0435\u043b\u044f\u0445<\/em><\/p>\n<p><img decoding=\"async\" class=\"formula\" source=\"SMA_{t}=\\frac{1}{n}\\sum^{n-1}_{i=0}p_{t-i}\" alt=\"SMA_{t}=\\frac{1}{n}\\sum^{n-1}_{i=0}p_{t-i}\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/e\/e2\/e27\/e27f672389ee771df339b1bf01faa032.svg\" width=\"auto\" height=\"auto\"\/><\/p>\n<p><img decoding=\"async\" class=\"formula inline\" source=\"SMA_{t}\" alt=\"SMA_{t}\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/1\/1e\/1ed\/1edf571462221c6a25c256377a99de7b.svg\" width=\"auto\" height=\"auto\"\/>\u00a0&#8212; \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u043f\u0440\u043e\u0441\u0442\u043e\u0433\u043e \u0441\u043a\u043e\u043b\u044c\u0437\u044f\u0449\u0435\u0433\u043e \u0441\u0440\u0435\u0434\u043d\u0435\u0433\u043e \u0432 \u0442\u043e\u0447\u043a\u0435 <img decoding=\"async\" class=\"formula inline\" source=\"t\" alt=\"t\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/e\/e3\/e35\/e358efa489f58062f10dd7316b65649e.svg\" width=\"auto\" height=\"auto\"\/><br \/> <img decoding=\"async\" class=\"formula inline\" source=\"n\" alt=\"n\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/7\/7b\/7b8\/7b8b965ad4bca0e41ab51de7b31363a1.svg\" width=\"auto\" height=\"auto\"\/>\u00a0&#8212; \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439 \u0438\u0441\u0445\u043e\u0434\u043d\u043e\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0434\u043b\u044f \u0440\u0430\u0441\u0447\u0451\u0442\u0430 \u0441\u043a\u043e\u043b\u044c\u0437\u044f\u0449\u0435\u0433\u043e \u0441\u0440\u0435\u0434\u043d\u0435\u0433\u043e (\u0440\u0430\u0437\u043c\u0435\u0440 &#171;\u043e\u043a\u043d\u0430&#187;)<br \/> <img decoding=\"async\" class=\"formula inline\" source=\"p_{t-i}\" alt=\"p_{t-i}\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/5\/5b\/5b0\/5b0ad1c8e6c0152a933073ba3e5adac7.svg\" width=\"auto\" height=\"auto\"\/> &#8212; \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0438\u0441\u0445\u043e\u0434\u043d\u043e\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0432 \u0442\u043e\u0447\u043a\u0435 <img decoding=\"async\" class=\"formula inline\" source=\"t-i\" alt=\"t-i\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/2\/22\/221\/22150284e081dd34ed5b3f94703212f0.svg\" width=\"auto\" height=\"auto\"\/><\/p>\n<figure class=\"\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/post_images\/8c1\/34f\/d3f\/8c134fd3f559fefe00191ed0a7a1c0ad.png\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/post_images\/8c1\/34f\/d3f\/8c134fd3f559fefe00191ed0a7a1c0ad.png\"\/><\/figure>\n<blockquote>\n<p>\u041f\u0440\u0438\u043c\u0435\u0440 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f <img decoding=\"async\" class=\"formula inline\" source=\"SMA\" alt=\"SMA\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/3\/37\/371\/371bd54577d68567ed50af283052e0d1.svg\" width=\"auto\" height=\"auto\"\/> (\u0432\u0437\u044f\u0442\u043e \u0438\u0437 \u0438\u043d\u0442\u0435\u0440\u043d\u0435\u0442\u0430)<\/p>\n<\/blockquote>\n<p>\u0420\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u0432 \u043a\u043e\u0434\u0435 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e <code>pandas<\/code>:<\/p>\n<pre><code class=\"python\">window_size = train_data.shape[0] \/\/ 70 denoised_data: np.ndarray = ( pd.Series(train_data[:, 1]) .rolling(window=window_size) .mean() .iloc[window_size - 1 :] .values ) <\/code><\/pre>\n<p>\u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442:<\/p>\n<figure class=\"\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/post_images\/114\/b55\/37b\/114b5537ba17753e9fb379a1b6c15bf0.png\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/post_images\/114\/b55\/37b\/114b5537ba17753e9fb379a1b6c15bf0.png\"\/><\/figure>\n<blockquote>\n<p><em>\u042f \u043d\u0435 \u0431\u0443\u0434\u0443 \u043f\u0440\u0438\u043a\u0440\u0435\u043f\u043b\u044f\u0442\u044c \u043a\u043e\u0434 \u043f\u043e\u0441\u0442\u0440\u043e\u0435\u043d\u0438\u044f \u0433\u0440\u0430\u0444\u0438\u043a\u0430, \u0442\u0430\u043a \u043a\u0430\u043a \u043d\u0438\u0447\u0435\u0433\u043e \u043d\u043e\u0432\u043e\u0433\u043e \u0432\u044b \u0442\u0430\u043c \u043d\u0435 \u043d\u0430\u0439\u0434\u0435\u0442\u0435.<\/em><\/p>\n<\/blockquote>\n<h2>\u041f\u0440\u043e\u0433\u043d\u043e\u0437\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0434\u0430\u043d\u043d\u044b\u0445<\/h2>\n<hr\/>\n<p>\u0412\u0438\u0434\u043d\u043e, \u0447\u0442\u043e \u0433\u0440\u0430\u0444\u0438\u043a \u0442\u0435\u043c\u043f\u0435\u0440\u0430\u0442\u0443\u0440\u044b \u043e\u0431\u043b\u0430\u0434\u0430\u0435\u0442 \u044f\u0440\u043a\u043e \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u043d\u043e\u0439 \u043f\u0435\u0440\u0438\u043e\u0434\u0438\u0447\u043d\u043e\u0441\u0442\u044c\u044e \u0438 \u0441\u0438\u043b\u044c\u043d\u043e \u043d\u0430\u043f\u043e\u043c\u0438\u043d\u0430\u0435\u0442 \u0441\u0438\u043d\u0443\u0441\u043e\u0438\u0434\u0443.<br \/> \u0418\u0437 \u044d\u0442\u043e\u0433\u043e \u0432\u044b\u0442\u0435\u043a\u0430\u0435\u0442 \u0446\u0435\u043b\u044c &#8212; <strong>\u043f\u043e\u0434\u043e\u0431\u0440\u0430\u0442\u044c \u043d\u0430\u0438\u0431\u043e\u043b\u0435\u0435 \u043f\u043e\u0434\u0445\u043e\u0434\u044f\u0449\u0443\u044e \u0441\u0438\u043d\u0443\u0441\u043e\u0438\u0434\u0443<\/strong> (\u0438\u043b\u0438 \u0441\u0443\u043c\u043c\u0443 \u0441\u0438\u043d\u0443\u0441\u043e\u0438\u0434), \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0431\u0443\u0434\u0435\u0442 \u043d\u0430\u0438\u043b\u0443\u0447\u0448\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u043e\u0432\u0430\u0442\u044c \u0442\u0435\u043c\u043f\u0435\u0440\u0430\u0442\u0443\u0440\u0435.<\/p>\n<h3>\u041f\u043e\u0434\u0431\u043e\u0440 \u043f\u043e\u0434\u0445\u043e\u0434\u044f\u0449\u0435\u0439 \u043a\u0440\u0438\u0432\u043e\u0439 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u0424\u0443\u0440\u044c\u0435 \u0438 \u0433\u0440\u0430\u0434\u0438\u0435\u043d\u0442\u043d\u043e\u0433\u043e \u0441\u043f\u0443\u0441\u043a\u0430.<\/h3>\n<h4>\u041f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u0424\u0443\u0440\u044c\u0435<\/h4>\n<p><strong>\u041f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u0424\u0443\u0440\u044c\u0435<\/strong> &#8212; \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u044f, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0441\u043e\u043f\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u043f\u0435\u0440\u0432\u043e\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0432\u0442\u043e\u0440\u0443\u044e: \u0432\u0442\u043e\u0440\u0430\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u043e\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u0442 \u043a\u043e\u044d\u0444\u0444\u0438\u0446\u0438\u0435\u043d\u0442\u044b (\u00ab\u0430\u043c\u043f\u043b\u0438\u0442\u0443\u0434\u044b\u00bb) \u043f\u0440\u0438 \u0440\u0430\u0437\u043b\u043e\u0436\u0435\u043d\u0438\u0438 \u043f\u0435\u0440\u0432\u043e\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u043d\u0430 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430\u0440\u043d\u044b\u0435 \u0441\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u044e\u0449\u0438\u0435\u00a0\u2014\u00a0\u0433\u0430\u0440\u043c\u043e\u043d\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u043a\u043e\u043b\u0435\u0431\u0430\u043d\u0438\u044f \u0441 \u0440\u0430\u0437\u043d\u044b\u043c\u0438 \u0447\u0430\u0441\u0442\u043e\u0442\u0430\u043c\u0438. \u0422\u043e \u0435\u0441\u0442\u044c \u0444\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u0434\u0430\u043d\u043d\u043e\u0435 \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u0440\u0430\u0441\u043a\u043b\u0430\u0434\u044b\u0432\u0430\u0435\u0442 \u0444\u0443\u043d\u043a\u0446\u0438\u044e \u043d\u0430 \u0441\u0443\u043c\u043c\u0443 \u0441\u0438\u043d\u0443\u0441\u043e\u0432 \u0440\u0430\u0437\u043d\u043e\u0439 \u0447\u0430\u0441\u0442\u043e\u0442\u044b.<\/p>\n<p>\u0424\u043e\u0440\u043c\u0430\u043b\u044c\u043d\u043e \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u0442\u0441\u044f \u0442\u0430\u043a:<\/p>\n<p><img decoding=\"async\" class=\"formula\" source=\"G(t) = \\int_{-\\infty}^{\\infty} g(t) e^{-2\\pi ift} \\, dt \" alt=\"G(t) = \\int_{-\\infty}^{\\infty} g(t) e^{-2\\pi ift} \\, dt \" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/6\/6b\/6bd\/6bd1aa1f80767084c3193226a07dedfb.svg\" width=\"auto\" height=\"auto\"\/><\/p>\n<p>\u0413\u0434\u0435 <img decoding=\"async\" class=\"formula inline\" source=\"f\" alt=\"f\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/8\/8f\/8fa\/8fa14cdd754f91cc6554c9e71929cce7.svg\" width=\"auto\" height=\"auto\"\/> &#8212; \u0438\u0441\u0441\u043b\u0435\u0434\u0443\u0435\u043c\u044b\u0439 \u0434\u0438\u0430\u043f\u0430\u0437\u043e\u043d \u0447\u0430\u0441\u0442\u043e\u0442, \u0430 <img decoding=\"async\" class=\"formula inline\" source=\"G(t)\" alt=\"G(t)\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/f\/f0\/f04\/f0487acb3b3b6bf473f26db446e73cd2.svg\" width=\"auto\" height=\"auto\"\/> &#8212; \u0430\u043c\u043f\u043b\u0438\u0442\u0443\u0434\u0430 \u0441\u0438\u043d\u0443\u0441\u043e\u0438\u0434\u044b \u0447\u0430\u0441\u0442\u043e\u0442\u044b <img decoding=\"async\" class=\"formula inline\" source=\"f\" alt=\"f\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/8\/8f\/8fa\/8fa14cdd754f91cc6554c9e71929cce7.svg\" width=\"auto\" height=\"auto\"\/>, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0441\u043b\u0430\u0433\u0430\u0435\u043c\u044b\u043c \u0438\u0441\u0445\u043e\u0434\u043d\u043e\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u0438.<br \/> <em>\u0414\u043b\u044f \u0431\u043e\u043b\u0435\u0435 \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u043e\u0433\u043e \u043e\u0437\u043d\u0430\u043a\u043e\u043c\u043b\u0435\u043d\u0438\u044f \u0441 \u043a\u043e\u043d\u0446\u0435\u043f\u0446\u0438\u0435\u0439 \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u0424\u0443\u0440\u044c\u0435 \u0441\u043e\u0432\u0435\u0442\u0443\u044e \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u0434\u0430\u043d\u043d\u043e\u0435 <\/em><a href=\"https:\/\/www.youtube.com\/watch?v=spUNpyF58BY\" rel=\"noopener noreferrer nofollow\"><em>\u0432\u0438\u0434\u0435\u043e<\/em><\/a><\/p>\n<figure class=\"\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/post_images\/7cf\/92c\/9b9\/7cf92c9b9336c07e5e00b83acab18a97.gif\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/post_images\/7cf\/92c\/9b9\/7cf92c9b9336c07e5e00b83acab18a97.gif\"\/><\/figure>\n<blockquote>\n<p>\u0412\u0438\u0437\u0443\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u043d\u0438\u044f<\/p>\n<\/blockquote>\n<p>\u0422\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c, \u0435\u0441\u043b\u0438 \u043c\u044b \u0432\u043e\u0437\u044c\u043c\u0435\u043c \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0441\u0438\u043d\u0443\u0441\u043e\u0438\u0434 \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u043e\u0439 \u0430\u043c\u043f\u043b\u0438\u0442\u0443\u0434\u044b (\u0442\u0435, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043b\u0443\u0447\u0448\u0435 \u0432\u0441\u0435\u0433\u043e \u0430\u043f\u043f\u0440\u043e\u043a\u0441\u0438\u043c\u0438\u0440\u0443\u044e\u0442 \u043d\u0430\u0448\u0438 \u0434\u0430\u043d\u043d\u044b\u0435) \u0438 \u043f\u043e\u0441\u0442\u0440\u043e\u0438\u043c \u0433\u0440\u0430\u0444\u0438\u043a \u0438\u0445 \u0441\u0443\u043c\u043c\u044b, \u0442\u043e \u043c\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u043c \u043d\u0435\u043f\u043b\u043e\u0445\u0443\u044e \u0430\u043f\u043f\u0440\u043e\u043a\u0441\u0438\u043c\u0430\u0446\u0438\u044e \u0442\u0435\u043c\u043f\u0435\u0440\u0430\u0442\u0443\u0440\u044b (\u0432 \u043d\u0430\u0448\u0435\u043c \u0441\u043b\u0443\u0447\u0430\u0435).<\/p>\n<p>\u041d\u043e, \u043a \u0441\u043e\u0436\u0430\u043b\u0435\u043d\u0438\u044e, \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u0424\u0443\u0440\u044c\u0435 \u043d\u0435 \u0432\u044b\u0434\u0430\u0435\u0442 \u043d\u0430\u043c \u0432\u0441\u0435 \u0432\u0435\u0441\u0430 \u0438\u0434\u0435\u0430\u043b\u044c\u043d\u043e\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u0438, \u043d\u043e \u0438 \u043d\u0430\u043c \u043d\u0443\u0436\u043d\u0430 \u0442\u043e\u043b\u044c\u043a\u043e \u0447\u0430\u0441\u0442\u043e\u0442\u0430, \u0432\u0435\u0434\u044c \u043e\u0441\u0442\u0430\u043b\u044c\u043d\u044b\u0435 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u043c\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u043c \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043c\u0435\u0442\u043e\u0434\u0430 \u0433\u0440\u0430\u0434\u0438\u0435\u043d\u0442\u043d\u043e\u0433\u043e \u0441\u043f\u0443\u0441\u043a\u0430. \u041d\u043e \u0434\u0430\u0432\u0430\u0439\u0442\u0435 \u043f\u043e \u043f\u043e\u0440\u044f\u0434\u043a\u0443 \u0438 \u0432 \u043a\u043e\u0434\u0435:<\/p>\n<pre><code class=\"python\"># \u0417\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u043d\u0430 \u043e\u0441\u0438 X (\u0430\u0431\u0441\u0446\u0438\u0441\u0441\u0435), \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u043c\u043e\u0434\u0435\u043b\u044c \u0431\u0443\u0434\u0435\u0442 \u0434\u0435\u043b\u0430\u0442\u044c \u043f\u0440\u0435\u0434\u0441\u043a\u0430\u0437\u0430\u043d\u0438\u044f x_data:np.ndarray = np.linspace(0, len(denoised_data), len(denoised_data))  # \u0414\u0438\u0441\u043a\u0440\u0435\u0442\u043d\u043e\u0435 \u041f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u0424\u0443\u0440\u044c\u0435, \u0441\u043f\u0438\u0441\u043e\u043a \u0430\u043c\u043f\u043b\u0438\u0442\u0443\u0434 mfft:np.ndarray = np.fft.fft(denoised_data)  # \u041f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u0438\u043d\u0434\u0435\u043a\u0441\u044b \u0447\u0430\u0441\u0442\u043e\u0442, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0442 \u0441\u0430\u043c\u044b\u043c \u0437\u043d\u0430\u0447\u0438\u043c\u044b\u043c (\u0441 \u0432\u044b\u0441\u043e\u043a\u043e\u0439 \u0430\u043c\u043f\u043b\u0438\u0442\u0443\u0434\u043e\u0439) \u0441\u0438\u043d\u0443\u0441\u043e\u0438\u0434\u0430\u043c. imax:np.ndarray = np.argsort(np.absolute(mfft))[::-1] <\/code><\/pre>\n<p>\u0414\u043b\u044f \u043f\u0440\u043e\u0441\u0442\u043e\u0442\u044b \u043c\u044b \u0431\u0443\u0434\u0435\u043c \u0440\u0430\u0441\u043a\u043b\u0430\u0434\u044b\u0432\u0430\u0442\u044c \u043d\u0430\u0448\u0438 \u0434\u0430\u043d\u043d\u044b\u0435 \u043d\u0430 \u0441\u0443\u043c\u043c\u0443 \u043f\u044f\u0442\u0438 \u0441\u0438\u043d\u0443\u0441\u043e\u0438\u0434. \u041d\u0435 \u0431\u0443\u0434\u0435\u043c \u0431\u0440\u0430\u0442\u044c \u0441\u043b\u0438\u0448\u043a\u043e\u043c \u043c\u043d\u043e\u0433\u043e \u0441\u043b\u0430\u0433\u0430\u0435\u043c\u044b\u0445, \u0447\u0442\u043e\u0431\u044b \u043c\u043e\u0434\u0435\u043b\u044c \u043d\u0435 \u043f\u043e\u0442\u0435\u0440\u044f\u043b\u0430 \u043e\u0431\u043e\u0431\u0449\u0430\u044e\u0449\u0443\u044e \u0441\u043f\u043e\u0441\u043e\u0431\u043d\u043e\u0441\u0442\u044c.<\/p>\n<pre><code class=\"python\"># \u041a\u043e\u043b-\u0432\u043e \u0441\u0438\u043d\u0443\u0441\u043e\u0432, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043c\u044b \u0431\u0443\u0434\u0435\u043c \u0441\u0443\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u0442\u044c number_of_sinuses: int = 5  # \u0411\u0435\u0440\u0435\u043c \u043f\u0435\u0440\u0432\u044b\u0435 number_of_sinuses \u0441\u0430\u043c\u044b\u0445 \u0432\u044b\u0441\u043e\u043a\u0438\u0445 \u0430\u043c\u043f\u043b\u0438\u0442\u0443\u0434 (\u043e\u043d\u0438 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0442 \u0447\u0430\u0441\u0442\u043e\u0442\u0430\u043c) imax = imax[:number_of_sinuses]  # \u0412\u044b\u0447\u0438\u0441\u043b\u044f\u0435\u043c \u0447\u0430\u0441\u0442\u043e\u0442\u0443 \u043a\u0430\u0436\u0434\u043e\u0439 \u0441\u0438\u043d\u0443\u0441\u043e\u0438\u0434\u044b frequency:np.ndarray = np.array(imax) \/ len(denoised_data) <\/code><\/pre>\n<h4>\u041e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u044f \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432<\/h4>\n<p>\u0414\u043b\u044f \u043d\u0430\u0447\u0430\u043b\u0430 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u043c \u0444\u0443\u043d\u043a\u0446\u0438\u044e, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0431\u0443\u0434\u0435\u0442 \u0430\u043f\u043f\u0440\u043e\u043a\u0441\u0438\u043c\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043d\u0430\u0448\u0438 \u0434\u0430\u043d\u043d\u044b\u0435 \u043e \u0442\u0435\u043c\u043f\u0435\u0440\u0430\u0442\u0443\u0440\u0435. \u0418\u0437-\u0437\u0430 \u0442\u043e\u0433\u043e, \u0447\u0442\u043e \u043c\u044b \u0440\u0430\u0441\u0441\u043c\u0430\u0442\u0440\u0438\u0432\u0430\u0435\u043c \u0441\u0443\u043c\u043c\u0443 \u043f\u044f\u0442\u0438 \u0441\u0438\u043d\u0443\u0441\u043e\u0432, \u0442\u043e \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u043d\u0430\u0448\u0435\u0439 \u043c\u043e\u0434\u0435\u043b\u0438 \u043d\u0430\u043f\u0440\u0430\u0448\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u0441\u0430\u043c\u043e:<\/p>\n<p><img decoding=\"async\" class=\"formula\" source=\"Y(w, x) = b + \\sum_{i=0}^{4} w_{3i}\\sin(w_{3i+1}x + w_{3i+2})\" alt=\"Y(w, x) = b + \\sum_{i=0}^{4} w_{3i}\\sin(w_{3i+1}x + w_{3i+2})\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/7\/78\/780\/7802fbd0f9bae3c5f9d55fec4d1d3f3a.svg\" width=\"auto\" height=\"auto\"\/><\/p>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u043d\u0443\u0436\u043d\u043e \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043d\u0430\u0448\u0438 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u0442\u0430\u043a, \u0447\u0442\u043e\u0431\u044b \u0438\u0445 \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u043e\u0441\u044c \u0432\u0435\u0440\u043d\u043e \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c (\u0431\u043e\u043b\u044c\u0448\u0438\u043d\u0441\u0442\u0432\u043e \u043c\u043e\u0434\u0435\u043b\u0435\u0439 \u043f\u043b\u043e\u0445\u043e \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0438\u0440\u0443\u044e\u0442 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\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 \u0441\u043e \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u043e \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u0439 \u0447\u0430\u0441\u0442\u043e\u0442\u043e\u0439).<\/p>\n<ol>\n<li>\n<p>\u041f\u0430\u0440\u0430\u043c\u0435\u0442\u0440 <img decoding=\"async\" class=\"formula inline\" source=\"w_{3i}\" alt=\"w_{3i}\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/0\/0f\/0f9\/0f949ebf27442e524d96a0646bc7c5d7.svg\" width=\"auto\" height=\"auto\"\/>  \u0431\u0443\u0434\u0435\u043c \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435\u043c \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u043e\u0433\u043e \u043e\u0442\u043a\u043b\u043e\u043d\u0435\u043d\u0438\u044f \u0432\u0441\u0435\u0439 \u0432\u044b\u0431\u043e\u0440\u043a\u0438 (<img decoding=\"async\" class=\"formula inline\" source=\"w_{3i} = \\sigma_{x}\" alt=\"w_{3i} = \\sigma_{x}\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/0\/05\/053\/0530654c71c69af23a6631ed83f2cb90.svg\" width=\"auto\" height=\"auto\"\/>).<\/p>\n<\/li>\n<li>\n<p>\u041f\u0430\u0440\u0430\u043c\u0435\u0442\u0440 <img decoding=\"async\" class=\"formula inline\" source=\"w_{3i+1}\" alt=\"w_{3i+1}\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/3\/30\/30b\/30b82e04b58abf24d0a0fed5c2676404.svg\" width=\"auto\" height=\"auto\"\/> (\u0441\u0430\u043c\u044b\u0439 \u0432\u0430\u0436\u043d\u044b\u0439)  \u0431\u0443\u0434\u0435\u043c \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u043d\u043e\u0439 \u0447\u0430\u0441\u0442\u043e\u0442\u043e\u0439 (\u0443\u043c\u043d\u043e\u0436\u0435\u043d\u043d\u043e\u0439 \u043d\u0430 <img decoding=\"async\" class=\"formula inline\" source=\"2\\pi\" alt=\"2\\pi\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/c\/c3\/c31\/c3198a6dbef629ca31403b4ccdff3fc7.svg\" width=\"auto\" height=\"auto\"\/>) \u0434\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u0441\u0438\u043d\u0443\u0441\u0430 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0435\u043d\u043d\u043e (<img decoding=\"async\" class=\"formula inline\" source=\"w_{3i+1}=2\\pi f_{i}\" alt=\"w_{3i+1}=2\\pi f_{i}\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/7\/73\/73b\/73bc1871dafc5ce5d8e5612446c9743e.svg\" width=\"auto\" height=\"auto\"\/>). \u042d\u0442\u043e \u043d\u0443\u0436\u043d\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c, \u0447\u0442\u043e\u0431\u044b \u043c\u043e\u0434\u0435\u043b\u044c \u043d\u0435 \u043f\u043e\u0434\u0431\u0438\u0440\u0430\u043b\u0430 \u0447\u0430\u0441\u0442\u043e\u0442\u0443 \u0432\u043e\u043b\u043d\u044b, \u0432 \u043f\u0440\u043e\u0442\u0438\u0432\u043d\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u043d\u0435 \u0431\u0443\u0434\u0443\u0442 \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043d\u044b.<\/p>\n<\/li>\n<li>\n<p>\u041f\u0430\u0440\u0430\u043c\u0435\u0442\u0440 \u0441\u0434\u0432\u0438\u0433\u0430 \u043f\u043e \u0430\u0431\u0441\u0446\u0438\u0441\u0441\u0435 \u043c\u044b \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0438\u0440\u0443\u0435\u043c <img decoding=\"async\" class=\"formula inline\" source=\"0\" alt=\"0\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/c\/cf\/cfc\/cfcd208495d565ef66e7dff9f98764da.svg\" width=\"auto\" height=\"auto\"\/><\/p>\n<\/li>\n<li>\n<p>\u041f\u0430\u0440\u0430\u043c\u0435\u0442\u0440 <img decoding=\"async\" class=\"formula inline\" source=\"b\" alt=\"b\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/9\/92\/92e\/92eb5ffee6ae2fec3ad71c777531578f.svg\" width=\"auto\" height=\"auto\"\/> \u043c\u044b \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0438\u0440\u0443\u0435\u043c \u043c\u0430\u0442\u0435\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u043c \u043e\u0436\u0438\u0434\u0430\u043d\u0438\u0435\u043c \u0432\u044b\u0431\u043e\u0440\u043a\u0438 (<img decoding=\"async\" class=\"formula inline\" source=\"b = \\overline{X}\" alt=\"b = \\overline{X}\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/4\/49\/49c\/49c9ff57554db2c8265c79fa43427dc4.svg\" width=\"auto\" height=\"auto\"\/>)<\/p>\n<\/li>\n<\/ol>\n<pre><code class=\"python\"># \u041d\u0430\u0447\u0430\u043b\u044c\u043d\u044b\u0435 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b init_params: np.ndarray = np.array( [ np.array([np.std(denoised_data), frequency[i] * 2 * np.pi, 0.0]) for i in range(number_of_sinuses) ] )  bias: float = np.mean(denoised_data) <\/code><\/pre>\n<p>\u041e\u043f\u0442\u0438\u043c\u0438\u0437\u0438\u0440\u0443\u0435\u043c \u043d\u0430\u0448\u0438 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u043f\u0443\u0442\u0435\u043c \u0433\u0440\u0430\u0434\u0438\u0435\u043d\u0442\u043d\u043e\u0433\u043e \u0441\u043f\u0443\u0441\u043a\u0430 \u0432 \u0441\u0432\u044f\u0437\u043a\u0435 \u0441 \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0442\u043e\u0440\u043e\u043c Adam. \u0412 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u043e\u0448\u0438\u0431\u043a\u0438 \u043c\u043e\u0434\u0435\u043b\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c <img decoding=\"async\" class=\"formula inline\" source=\"MSE\" alt=\"MSE\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/a\/a9\/a9f\/a9fc1a03386ae38b64e06c8172994963.svg\" width=\"auto\" height=\"auto\"\/>.<\/p>\n<hr\/>\n<p><strong>\u0424\u0443\u043d\u043a\u0446\u0438\u044f \u043e\u0448\u0438\u0431\u043a\u0438 (MSE), \u043a\u043e\u0442\u043e\u0440\u0443\u044e \u043d\u0430\u0448 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c \u0431\u0443\u0434\u0435\u0442 \u043f\u044b\u0442\u0430\u0442\u044c\u0441\u044f \u043c\u0438\u043d\u0438\u043c\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c<\/strong><\/p>\n<p><img decoding=\"async\" class=\"formula\" source=\"MSE = \\frac{1}{n}\\sum_{i=1}^{n}(y-\\overline y)^{2}\" alt=\"MSE = \\frac{1}{n}\\sum_{i=1}^{n}(y-\\overline y)^{2}\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/5\/5e\/5e4\/5e4c9455c3758d8886657f1856d7ad57.svg\" width=\"auto\" height=\"auto\"\/><\/p>\n<p><img decoding=\"async\" class=\"formula inline\" source=\"y\" alt=\"y\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/4\/41\/415\/415290769594460e2e485922904f345d.svg\" width=\"auto\" height=\"auto\"\/> &#8212; \u0440\u0435\u0430\u043b\u044c\u043d\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0446\u0435\u043b\u0435\u0432\u043e\u0439 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 (\u043c\u0435\u0442\u043a\u0430)<br \/> <img decoding=\"async\" class=\"formula inline\" source=\"\\overline y\" alt=\"\\overline y\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/c\/ce\/ced\/ced80df57aeb1fccb9ec65e0376ef5d1.svg\" width=\"auto\" height=\"auto\"\/> &#8212; \u043f\u0440\u0435\u0434\u0441\u043a\u0430\u0437\u0430\u043d\u0438\u0435 \u043c\u043e\u0434\u0435\u043b\u0438<\/p>\n<p><strong>\u0413\u0440\u0430\u0434\u0438\u0435\u043d\u0442\u043d\u044b\u0439 \u0441\u043f\u0443\u0441\u043a<\/strong><br \/> \u0413\u0440\u0430\u0434\u0438\u0435\u043d\u0442\u043d\u044b\u0439 \u0441\u043f\u0443\u0441\u043a \u0437\u0430\u043a\u043b\u044e\u0447\u0430\u0435\u0442\u0441\u044f \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e \u043f\u043e \u043c\u0435\u0440\u0435 \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f \u043c\u043e\u0434\u0435\u043b\u0438 \u043c\u044b \u0432\u044b\u0447\u0438\u0442\u0430\u0435\u043c \u0438\u0437 \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u0432\u0435\u0441\u0430 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0435\u0433\u043e \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u043e\u0439 \u0447\u0430\u0441\u0442\u043d\u043e\u0439 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u043d\u043e\u0439 \u043e\u0442 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u043e\u0448\u0438\u0431\u043a\u0438. \u0414\u0430\u043d\u043d\u044b\u0439 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c \u043f\u0440\u0438\u0432\u043e\u0434\u0438\u0442 \u043a \u0435\u0435 \u043c\u0438\u043d\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u0438, \u0442\u043e \u0435\u0441\u0442\u044c \u043a \u043d\u0430\u0438\u0431\u043e\u043b\u0435\u0435 \u0442\u043e\u0447\u043d\u044b\u043c \u043e\u0442\u0432\u0435\u0442\u0430\u043c \u043c\u043e\u0434\u0435\u043b\u0438. \u041e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435:<\/p>\n<p><img decoding=\"async\" class=\"formula\" source=\"w_{n} = w_{n} - \\frac{\\delta E}{\\delta w_{n}}\\cdot \\eta\" alt=\"w_{n} = w_{n} - \\frac{\\delta E}{\\delta w_{n}}\\cdot \\eta\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/a\/ae\/aed\/aed0af9c4229560f18657dbeb4abe632.svg\" width=\"auto\" height=\"auto\"\/><\/p>\n<p><img decoding=\"async\" class=\"formula inline\" source=\"E\" alt=\"E\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/3\/3a\/3a3\/3a3ea00cfc35332cedf6e5e9a32e94da.svg\" width=\"auto\" height=\"auto\"\/> &#8212; \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u043e\u0448\u0438\u0431\u043a\u0438<br \/> <img decoding=\"async\" class=\"formula inline\" source=\"w_{n}\" alt=\"w_{n}\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/4\/40\/407\/407d98f0278ab9ff009e9ff9e6d5466d.svg\" width=\"auto\" height=\"auto\"\/> &#8212; \u0434\u0430\u043d\u043d\u044b\u0439 \u0432\u0435\u0441<br \/> <img decoding=\"async\" class=\"formula inline\" source=\"\\eta\" alt=\"\\eta\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/f\/ff\/ffe\/ffe9f913124f345732e9f00fa258552e.svg\" width=\"auto\" height=\"auto\"\/> &#8212; \u043a\u043e\u044d\u0444\u0444\u0438\u0446\u0438\u0435\u043d\u0442 \u0441\u043a\u043e\u0440\u043e\u0441\u0442\u0438 \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f (\u0447\u0435\u043c \u0431\u043e\u043b\u044c\u0448\u0435, \u0442\u0435\u043c \u0430\u0433\u0440\u0435\u0441\u0441\u0438\u0432\u043d\u0435\u0435 \u043e\u0431\u0443\u0447\u0430\u0435\u0442\u0441\u044f \u043c\u043e\u0434\u0435\u043b\u044c, \u0447\u0430\u0441\u0442\u043e \u0432\u044b\u0431\u0438\u0440\u0430\u044e\u0442 <img decoding=\"async\" class=\"formula inline\" source=\"10^{-3}\" alt=\"10^{-3}\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/5\/59\/599\/599ba39d43ef5e5056aa8b82d12608b2.svg\" width=\"auto\" height=\"auto\"\/>)<\/p>\n<p><strong>\u041e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0442\u043e\u0440 Adam<\/strong> <em>(\u043d\u0435\u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u043e \u0434\u043b\u044f \u043f\u0440\u043e\u0447\u0442\u0435\u043d\u0438\u044f)<\/em><br \/> \u0418\u0434\u0435\u044f Adam \u0437\u0430\u043a\u043b\u044e\u0447\u0430\u0435\u0442\u0441\u044f \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e\u0431\u044b \u0430\u0434\u0430\u043f\u0442\u0438\u0432\u043d\u043e \u0438\u0437\u043c\u0435\u043d\u044f\u0442\u044c \u0441\u043a\u043e\u0440\u043e\u0441\u0442\u044c \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f \u0434\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u0432\u0435\u0441\u0430 \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 \u0434\u0432\u0443\u0445 \u043c\u043e\u043c\u0435\u043d\u0442\u043e\u0432 \u043f\u0435\u0440\u0432\u043e\u0433\u043e \u0438 \u0432\u0442\u043e\u0440\u043e\u0433\u043e \u043f\u043e\u0440\u044f\u0434\u043a\u043e\u0432 \u0433\u0440\u0430\u0434\u0438\u0435\u043d\u0442\u0430. \u0412\u0435\u0441\u0430 \u0441 \u0431\u043e\u043b\u044c\u0448\u0438\u043c \u0433\u0440\u0430\u0434\u0438\u0435\u043d\u0442\u043e\u043c \u043f\u043e\u043b\u0443\u0447\u0430\u044e\u0442 \u043c\u0435\u043d\u044c\u0448\u0438\u0439 \u0448\u0430\u0433, \u0430 \u0432\u0435\u0441\u0430 \u0441 \u043c\u0435\u043d\u044c\u0448\u0438\u043c \u0433\u0440\u0430\u0434\u0438\u0435\u043d\u0442\u043e\u043c \u043f\u043e\u043b\u0443\u0447\u0430\u044e\u0442 \u0431\u043e\u043b\u044c\u0448\u0438\u0439 \u0448\u0430\u0433.<\/p>\n<p>\u041e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0442\u043e\u0440 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u043f\u043e \u0434\u0430\u043d\u043d\u043e\u043c\u0443 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u0443:<br \/> <img decoding=\"async\" class=\"formula inline\" source=\"m_t = \\beta_1 m_{t-1} + (1 - \\beta_1)g_t\" alt=\"m_t = \\beta_1 m_{t-1} + (1 - \\beta_1)g_t\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/0\/0b\/0bc\/0bccc9012febab444f969d814ce34672.svg\" width=\"auto\" height=\"auto\"\/><br \/> <img decoding=\"async\" class=\"formula inline\" source=\"v_t = \\beta_2 v_{t-1} + (1 - \\beta_2)g_t^2\" alt=\"v_t = \\beta_2 v_{t-1} + (1 - \\beta_2)g_t^2\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/7\/74\/74d\/74d2fc62a79a21e26d9546308bb86456.svg\" width=\"auto\" height=\"auto\"\/><br \/> <img decoding=\"async\" class=\"formula inline\" source=\"\\hat{m_t} = \\frac{m_t}{1 - \\beta_1^t}\" alt=\"\\hat{m_t} = \\frac{m_t}{1 - \\beta_1^t}\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/e\/e8\/e86\/e86467180fc89e404665acbc8415f239.svg\" width=\"auto\" height=\"auto\"\/><br \/> <img decoding=\"async\" class=\"formula inline\" source=\"\\hat{v_t} = \\frac{v_t}{1 - \\beta_2^t}\" alt=\"\\hat{v_t} = \\frac{v_t}{1 - \\beta_2^t}\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/9\/99\/99f\/99f0ccc47e6da25755031a260209ddde.svg\" width=\"auto\" height=\"auto\"\/><\/p>\n<p>\u041e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u044f \u0432\u0435\u0441\u043e\u0432:<\/p>\n<p><img decoding=\"async\" class=\"formula\" source=\"w_t = w_{t-1} - \\frac{\\eta}{\\sqrt{\\hat{v_t}}+\\epsilon} \\hat{m_t}\" alt=\"w_t = w_{t-1} - \\frac{\\eta}{\\sqrt{\\hat{v_t}}+\\epsilon} \\hat{m_t}\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/1\/1c\/1c1\/1c17098d8fe9bbe3f468f114385cb68a.svg\" width=\"auto\" height=\"auto\"\/><\/p>\n<p>\u0413\u0434\u0435:<br \/> <img decoding=\"async\" class=\"formula inline\" source=\"t\" alt=\"t\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/e\/e3\/e35\/e358efa489f58062f10dd7316b65649e.svg\" width=\"auto\" height=\"auto\"\/> &#8212; \u043d\u043e\u043c\u0435\u0440 \u0438\u0442\u0435\u0440\u0430\u0446\u0438\u0438<br \/> <img decoding=\"async\" class=\"formula inline\" source=\"w_t\" alt=\"w_t\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/7\/7e\/7e9\/7e990213067fee3e3312f0fcca325204.svg\" width=\"auto\" height=\"auto\"\/> &#8212; \u0432\u0435\u043a\u0442\u043e\u0440 \u0432\u0435\u0441\u043e\u0432 \u0432 \u043c\u043e\u043c\u0435\u043d\u0442 \u0432\u0440\u0435\u043c\u0435\u043d\u0438 <img decoding=\"async\" class=\"formula inline\" source=\"t\" alt=\"t\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/e\/e3\/e35\/e358efa489f58062f10dd7316b65649e.svg\" width=\"auto\" height=\"auto\"\/><br \/> <img decoding=\"async\" class=\"formula inline\" source=\"g_t\" alt=\"g_t\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/f\/f7\/f75\/f752008a78c8519e9f8f178faf0b87ed.svg\" width=\"auto\" height=\"auto\"\/> &#8212; \u0432\u0435\u043a\u0442\u043e\u0440 \u0433\u0440\u0430\u0434\u0438\u0435\u043d\u0442\u043e\u0432 \u0432 \u043c\u043e\u043c\u0435\u043d\u0442 \u0432\u0440\u0435\u043c\u0435\u043d\u0438 <img decoding=\"async\" class=\"formula inline\" source=\"t\" alt=\"t\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/e\/e3\/e35\/e358efa489f58062f10dd7316b65649e.svg\" width=\"auto\" height=\"auto\"\/><br \/> <img decoding=\"async\" class=\"formula inline\" source=\"m_t\" alt=\"m_t\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/a\/a6\/a69\/a693c996212e83f7c6fde2de0bbbf9d4.svg\" width=\"auto\" height=\"auto\"\/> &#8212; \u043e\u0446\u0435\u043d\u043a\u0430 \u043f\u0435\u0440\u0432\u043e\u0433\u043e \u043c\u043e\u043c\u0435\u043d\u0442\u0430 (\u0441\u0440\u0435\u0434\u043d\u0435\u0433\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f) \u0433\u0440\u0430\u0434\u0438\u0435\u043d\u0442\u0430 \u0432 \u043c\u043e\u043c\u0435\u043d\u0442 \u0432\u0440\u0435\u043c\u0435\u043d\u0438 <img decoding=\"async\" class=\"formula inline\" source=\"t\" alt=\"t\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/e\/e3\/e35\/e358efa489f58062f10dd7316b65649e.svg\" width=\"auto\" height=\"auto\"\/><br \/> <img decoding=\"async\" class=\"formula inline\" source=\"v_t\" alt=\"v_t\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/a\/a9\/a98\/a982b93a2e1e092545ca69bcd09d8147.svg\" width=\"auto\" height=\"auto\"\/> &#8212; \u043e\u0446\u0435\u043d\u043a\u0430 \u0432\u0442\u043e\u0440\u043e\u0433\u043e \u043c\u043e\u043c\u0435\u043d\u0442\u0430 (\u0441\u0440\u0435\u0434\u043d\u0435\u0433\u043e \u043a\u0432\u0430\u0434\u0440\u0430\u0442\u0430) \u0433\u0440\u0430\u0434\u0438\u0435\u043d\u0442\u0430 \u0432 \u043c\u043e\u043c\u0435\u043d\u0442 \u0432\u0440\u0435\u043c\u0435\u043d\u0438 <img decoding=\"async\" class=\"formula inline\" source=\"t\" alt=\"t\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/e\/e3\/e35\/e358efa489f58062f10dd7316b65649e.svg\" width=\"auto\" height=\"auto\"\/><br \/> <img decoding=\"async\" class=\"formula inline\" source=\"\\beta_1\" alt=\"\\beta_1\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/b\/b4\/b4c\/b4ceec2c4656f5c1e7fc76c59c4f80f3.svg\" width=\"auto\" height=\"auto\"\/> \u0438 <img decoding=\"async\" class=\"formula inline\" source=\"\\beta_2\" alt=\"\\beta_2\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/d\/d9\/d9f\/d9f51e864a6151f57e727294da7ac28c.svg\" width=\"auto\" height=\"auto\"\/> &#8212; \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b, \u043e\u0431\u044b\u0447\u043d\u043e \u0440\u0430\u0432\u043d\u044b\u0435 0.9 \u0438 0.999 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0435\u043d\u043d\u043e<br \/> <img decoding=\"async\" class=\"formula inline\" source=\"\\eta\" alt=\"\\eta\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/f\/ff\/ffe\/ffe9f913124f345732e9f00fa258552e.svg\" width=\"auto\" height=\"auto\"\/> &#8212; \u0441\u043a\u043e\u0440\u043e\u0441\u0442\u044c \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f<br \/> <img decoding=\"async\" class=\"formula inline\" source=\"\\epsilon\" alt=\"\\epsilon\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/9\/92\/92e\/92e4da341fe8f4cd46192f21b6ff3aa7.svg\" width=\"auto\" height=\"auto\"\/> &#8212; \u043c\u0430\u043b\u043e\u0435 \u0447\u0438\u0441\u043b\u043e, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u043e\u0435 \u0434\u043b\u044f \u0441\u0442\u0430\u0431\u0438\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u0434\u0435\u043b\u0435\u043d\u0438\u044f<\/p>\n<figure class=\"\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/post_images\/883\/62e\/00e\/88362e00e815d4b20c2f078e3c598709.gif\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/post_images\/883\/62e\/00e\/88362e00e815d4b20c2f078e3c598709.gif\"\/><\/figure>\n<blockquote>\n<p>\u041f\u0440\u0438\u043c\u0435\u0440 \u043f\u043e\u0438\u0441\u043a\u0430 \u043c\u0438\u043d\u0438\u043c\u0443\u043c\u043e\u0432 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u043c\u0435\u0442\u043e\u0434\u043e\u043c \u0433\u0440\u0430\u0434\u0438\u0435\u043d\u0442\u043d\u043e\u0433\u043e \u0441\u043f\u0443\u0441\u043a\u0430<\/p>\n<\/blockquote>\n<hr\/>\n<h4>\u041c\u043e\u0434\u0435\u043b\u044c<\/h4>\n<p>\u0421\u043e\u0437\u0434\u0430\u0434\u0438\u043c \u043c\u043e\u0434\u0435\u043b\u044c \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438 tensorflow. \u041e\u0441\u0442\u0430\u043b\u044c\u043d\u044b\u0435 \u043f\u043e\u043f\u0443\u043b\u044f\u0440\u043d\u044b\u0435 \u0432\u0430\u0440\u0438\u0430\u043d\u0442\u044b (\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, scipy) \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u044f\u044e\u0442 \u0441\u043a\u0443\u0434\u043d\u044b\u0435 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e\u0441\u0442\u0438 \u0434\u043b\u044f \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044f \u0438 \u0432\u0438\u0437\u0443\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f, \u0442\u0430\u043a \u0447\u0442\u043e \u043d\u0430\u043f\u0438\u0448\u0435\u043c \u0441\u043e\u0431\u0441\u0442\u0432\u0435\u043d\u043d\u0443\u044e \u043c\u043e\u0434\u0435\u043b\u044c \u0438 \u043e\u0431\u0443\u0447\u0438\u043c \u0435\u0435.<\/p>\n<p><strong>\u0412\u0430\u0436\u043d\u043e!<\/strong> \u0422\u0430\u043a \u043a\u0430\u043a \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0442\u043e\u0440 <code>Adam<\/code> \u043e\u0431\u043b\u0430\u0434\u0430\u0435\u0442 \u0441\u0442\u043e\u0445\u0430\u0441\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0439 \u043f\u0440\u0438\u0440\u043e\u0434\u043e\u0439, \u043d\u0443\u0436\u043d\u043e \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u0442\u044c \u043a\u043e\u043c\u0430\u043d\u0434\u0443 <code>tf.random.set_seed()<\/code>, \u0447\u0442\u043e\u0431\u044b \u0432\u0441\u0435, \u043a\u0442\u043e \u0437\u0430\u043f\u0443\u0441\u0442\u0438\u0442 \u043a\u043e\u0434 \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u0438 \u043e\u0434\u0438\u043d\u0430\u043a\u043e\u0432\u044b\u0435 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b.<\/p>\n<p><strong>\u041e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u0430 \u043c\u043e\u0434\u0435\u043b\u0438 \u0438 \u0435\u0435 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432 (\u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e <\/strong><code><strong>keras.layers.Layer<\/strong><\/code><strong>)<\/strong><\/p>\n<pre><code class=\"python\"># \u0418\u043c\u043f\u043e\u0440\u0442 \u043c\u043e\u0434\u0443\u043b\u0435\u0439 import tensorflow as tf from keras import layers from keras.optimizers import Adam  tf.random.set_seed(8)  # \u041e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u043c \u0441\u043b\u043e\u0439 class SinLayer(layers.Layer): def __init__(self): # \u0418\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0438\u0440\u0443\u0435\u043c \u043c\u0435\u0442\u043e\u0434\u044b \u0438 \u0430\u0442\u0440\u0438\u0431\u0443\u0442\u044b \u0440\u043e\u0434\u0438\u0442\u0435\u043b\u044c\u0441\u043a\u043e\u0433\u043e \u043a\u043b\u0430\u0441\u0441\u0430 super(SinLayer, self).__init__()  def build(self, _): # \u0417\u0430\u0434\u0430\u0435\u043c \u043d\u0430\u0447\u0430\u043b\u044c\u043d\u044b\u0435 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b self.kernel = self.add_weight( \"kernel\", shape=(number_of_sinuses, 3), trainable=True ) # \u0412\u0435\u0441\u0430 \u043c\u043e\u0434\u0435\u043b\u0438  # \u0421\u0432\u043e\u0431\u043e\u0434\u043d\u044b\u0439 \u043a\u043e\u044d\u0444\u0444\u0438\u0446\u0438\u0435\u043d\u0442 self.bias = self.add_weight(name=\"bias\", shape=(), trainable=True)   def call(self, inputs): # \u0420\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u0430 \u043d\u0430\u0448\u0435\u0439 \u043c\u043e\u0434\u0435\u043b\u0438 (\u0440\u0430\u043d\u0435\u0435 \u0432 \u0441\u0442\u0430\u0442\u044c\u0435) result: float = 0 for i in range(number_of_sinuses): result += self.kernel[i][0] * tf.sin( self.kernel[i][1] * inputs + self.kernel[i][2] ) return result + self.bias # \u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0440\u0430\u0431\u043e\u0442\u044b \u043c\u043e\u0434\u0435\u043b\u0438 <\/code><\/pre>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u043c \u0441\u0430\u043c\u0443 \u043c\u043e\u0434\u0435\u043b\u044c \u0438 \u0441\u043a\u043e\u043c\u043f\u0438\u043b\u0438\u0440\u0443\u0435\u043c \u0435\u0435:<\/p>\n<pre><code class=\"python\"># \u041e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u043c\u043e\u0434\u0435\u043b\u0438 model = tf.keras.Sequential( [ layers.Input(shape=(1,)), SinLayer(), ] )  # \u041a\u043e\u043c\u043f\u0438\u043b\u0438\u0440\u0443\u0435\u043c \u043c\u043e\u0434\u0435\u043b\u044c \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0442\u043e\u0440\u043e\u043c Adam (\u0441 \u043d\u0430\u0438\u0431\u043e\u043b\u0435\u0435 \u043f\u043e\u0434\u0445\u043e\u0434\u044f\u0449\u0438\u043c\u0438 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430\u043c\u0438) # \u0438 \u043e\u0448\u0438\u0431\u043a\u043e\u0439 MSE model.compile(Adam(0.001, 0.8, 0.9), \"mean_squared_error\")  # \u0417\u0430\u0434\u0430\u0435\u043c \u043c\u043e\u0434\u0435\u043b\u0438 \u0440\u0430\u043d\u0435\u0435 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u044b\u0435 \u0432\u0435\u0441\u0430 \u0434\u043b\u044f \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u043e\u0439 \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u0438 \u0432\u0435\u0441\u043e\u0432 model.set_weights([init_params, bias]) <\/code><\/pre>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u043e\u0431\u0443\u0447\u0438\u043c \u043d\u0430\u0448\u0443 \u043c\u043e\u0434\u0435\u043b\u044c \u043d\u0430 \u0442\u0440\u0435\u043d\u0438\u0440\u043e\u0432\u043e\u0447\u043d\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445 \u0438 \u043f\u043e\u0441\u0442\u0440\u043e\u0438\u043c \u0433\u0440\u0430\u0444\u0438\u043a \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u043e\u0448\u0438\u0431\u043a\u0438 \u043f\u043e \u043c\u0435\u0440\u0435 \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f.<\/p>\n<pre><code class=\"python\"># \u041f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u0438\u0441\u0442\u043e\u0440\u0438\u044e \u043e\u0448\u0438\u0431\u043a\u0438 \u043c\u043e\u0434\u0435\u043b\u0438 history = model.fit(x_data, denoised_data, epochs=70)  # \u041e\u0442\u043e\u0431\u0440\u0430\u0436\u0430\u0435\u043c \u0435\u0435 \u043d\u0430 \u0433\u0440\u0430\u0444\u0438\u043a\u0435 plt.plot(history.history[\"loss\"]) plt.grid() plt.xlabel(\"\u042d\u043f\u043e\u0445\u0430\") plt.ylabel(\"\u0417\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u043e\u0448\u0438\u0431\u043a\u0438 MSE \u043d\u0430 \u0434\u0430\u043d\u043d\u043e\u0439 \u044d\u043f\u043e\u0445\u0435\") plt.show() <\/code><\/pre>\n<p><em>\u042d\u043f\u043e\u0445\u0430 \u2014 \u044d\u0442\u043e\u00a0<\/em><strong><em>\u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u043f\u043e\u043b\u043d\u044b\u0445 \u043f\u0440\u043e\u0445\u043e\u0436\u0434\u0435\u043d\u0438\u0439 \u0432\u0441\u0435\u0433\u043e \u0434\u0430\u0442\u0430\u0441\u0435\u0442\u0430<\/em><\/strong><em>. \u0427\u0435\u043c \u0431\u043e\u043b\u044c\u0448\u0435 \u044d\u043f\u043e\u0445, \u0442\u0435\u043c \u043b\u0443\u0447\u0448\u0435 \u043d\u0430\u0442\u0440\u0435\u043d\u0438\u0440\u043e\u0432\u0430\u043d\u0430 \u043d\u0435\u0439\u0440\u043e\u0441\u0435\u0442\u044c.<\/em><\/p>\n<figure class=\"\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/post_images\/14f\/a21\/daf\/14fa21daf06d878b58bbbb4b4671fcf7.png\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/post_images\/14f\/a21\/daf\/14fa21daf06d878b58bbbb4b4671fcf7.png\"\/><\/figure>\n<blockquote>\n<p>\u0412\u0438\u0434\u043d\u043e, \u0447\u0442\u043e \u043e\u0448\u0438\u0431\u043a\u0430 \u043c\u043e\u0434\u0435\u043b\u0438 \u0441\u0438\u043b\u044c\u043d\u043e \u0443\u043c\u0435\u043d\u044c\u0448\u0438\u043b\u0430\u0441\u044c, \u0437\u043d\u0430\u0447\u0438\u0442, \u043e\u043d\u0430 \u043d\u0430\u0442\u0440\u0435\u043d\u0438\u0440\u043e\u0432\u0430\u043b\u0430\u0441\u044c<\/p>\n<\/blockquote>\n<p><strong>\u0412\u0430\u0436\u043d\u043e\u0435 \u0437\u0430\u043c\u0435\u0447\u0430\u043d\u0438\u0435!<\/strong> \u041a \u043e\u0442\u0432\u0435\u0442\u0443 \u0440\u0435\u0433\u0440\u0435\u0441\u0441\u0438\u043e\u043d\u043d\u043e\u0439 \u043c\u043e\u0434\u0435\u043b\u0438 \u043f\u0440\u0438\u043d\u044f\u0442\u043e \u0434\u043e\u0431\u0430\u0432\u043b\u044f\u0442\u044c \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u044b\u0439 \u0448\u0443\u043c (\u043c\u044b \u0442\u043e\u0436\u0435 \u0442\u0430\u043a \u0431\u0443\u0434\u0435\u043c \u0434\u0435\u043b\u0430\u0442\u044c):<\/p>\n<p><img decoding=\"async\" class=\"formula\" source=\"y = Y(w, x) + \\epsilon\" alt=\"y = Y(w, x) + \\epsilon\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/c\/c8\/c80\/c80bd198b3e6f06e4c2d93c1170fa49a.svg\" width=\"auto\" height=\"auto\"\/><\/p>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u043c, \u043a\u0430\u043a \u043d\u0430\u0448\u0430 \u043c\u043e\u0434\u0435\u043b\u044c \u043f\u0440\u0435\u0434\u0441\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442 \u0434\u0430\u043d\u043d\u044b\u0435 \u0442\u0440\u0435\u043d\u0438\u0440\u043e\u0432\u043e\u0447\u043d\u043e\u0439 \u0432\u044b\u0431\u043e\u0440\u043a\u0438. \u0414\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u0442\u0430\u043a\u0436\u0435 \u043f\u043e\u0441\u0442\u0440\u043e\u0438\u043c \u0433\u0440\u0430\u0444\u0438\u043a (\u043d\u043e \u043f\u0435\u0440\u0435\u0434 \u043e\u0442\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0435\u043c \u043d\u0443\u0436\u043d\u043e \u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u043e \u0434\u0435\u043d\u043e\u0440\u043c\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0435 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0440\u0430\u043d\u0435\u0435 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u043e\u0433\u043e \u043c\u0435\u0442\u043e\u0434\u0430 <code>DeNormalizeData<\/code>): <\/p>\n<figure class=\"\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/post_images\/dc9\/a6f\/5c4\/dc9a6f5c47928e7fcfd0f8c9f48beda8.png\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/post_images\/dc9\/a6f\/5c4\/dc9a6f5c47928e7fcfd0f8c9f48beda8.png\"\/><\/figure>\n<blockquote>\n<p>\u0412\u0438\u0434\u043d\u043e, \u0447\u0442\u043e \u043d\u0430\u0448\u0430 \u043c\u043e\u0434\u0435\u043b\u044c \u0443\u0441\u043f\u0435\u0448\u043d\u043e \u0443\u043b\u043e\u0432\u0438\u043b\u0430 \u0432\u0441\u0435 \u0442\u0440\u0435\u043d\u0434\u044b \u0438 \u043f\u0435\u0440\u0438\u043e\u0434\u0438\u0437\u0430\u0446\u0438\u044e. \u0425\u043e\u0440\u043e\u0448\u0438\u0439 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442.<\/p>\n<\/blockquote>\n<h4>\u0412\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u0435 \u043e\u0448\u0438\u0431\u043a\u0438 \u043c\u043e\u0434\u0435\u043b\u0438 \u043d\u0430 \u0442\u0435\u0441\u0442\u043e\u0432\u043e\u0439 \u0432\u044b\u0431\u043e\u0440\u043a\u0435<\/h4>\n<hr\/>\n<p>\u0414\u043b\u044f \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u044f \u043e\u0448\u0438\u0431\u043a\u0438 \u043c\u043e\u0434\u0435\u043b\u0438  \u0431\u0443\u0434\u0435\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0444\u0443\u043d\u043a\u0446\u0438\u044e MAE:<\/p>\n<p><img decoding=\"async\" class=\"formula\" source=\"MAE(y, \\overline{y}) = \\frac{1}{n}\\sum\\mid y-\\overline{y}\\mid\" alt=\"MAE(y, \\overline{y}) = \\frac{1}{n}\\sum\\mid y-\\overline{y}\\mid\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/formulas\/2\/24\/247\/2474c03483b75c42593bc9e08761e424.svg\" width=\"auto\" height=\"auto\"\/><\/p>\n<p>\u0424\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u0438, \u0434\u0430\u043d\u043d\u0430\u044f \u043e\u0448\u0438\u0431\u043a\u0430 &#8212; \u0441\u0440\u0435\u0434\u043d\u0435\u0435 \u043e\u0442\u043a\u043b\u043e\u043d\u0435\u043d\u0438\u0435 \u043f\u0440\u0435\u0434\u0441\u043a\u0430\u0437\u0430\u043d\u043d\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445 \u043e\u0442 \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u0445.<\/p>\n<p>\u0412\u044b\u0447\u0438\u0441\u043b\u0438\u043c \u043e\u0448\u0438\u0431\u043a\u0443 \u043d\u0430 \u0442\u0435\u0441\u0442\u043e\u0432\u043e\u0439 \u0432\u044b\u0431\u043e\u0440\u043a\u0435 (\u043d\u0430 \u0434\u0435\u043d\u043e\u0440\u043c\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043d\u043d\u044b\u0445, \u0440\u0435\u0430\u043b\u044c\u043d\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445):<\/p>\n<pre><code class=\"python\"># \u041e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u043c \u0444\u0443\u043d\u043a\u0446\u0438\u044e \u043e\u0448\u0438\u0431\u043a\u0438 def MAE(predictions: np.ndarray, labels: np.ndarray) -> float: return np.mean(np.abs(predictions - labels))  # \u0412\u044b\u0432\u043e\u0434\u0438\u043c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u043e\u0448\u0438\u0431\u043a\u0438 print( MAE( train_normalize_class.DeNormalizeData( model(test_data[:, 0]).numpy().T[0], axis=[0] ) + np.random.normal(size=test_data[:, 0].shape), test_data[:, 1], ) ) <\/code><\/pre>\n<p><em>\u041c\u044b \u0432\u044b\u043f\u043e\u043b\u043d\u044f\u0435\u043c \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u043d\u0438\u0435 <\/em><code><em>data.numpy().T[0]<\/em><\/code><em> \u0438\u0437-\u0437\u0430 \u0442\u043e\u0433\u043e, \u0447\u0442\u043e \u043c\u043e\u0434\u0435\u043b\u044c \u0432\u044b\u0432\u043e\u0434\u0438\u0442 \u0442\u0435\u043d\u0437\u043e\u0440 Tensorflow \u0444\u043e\u0440\u043c\u044b (114, 1). \u0414\u0430\u043d\u043d\u043e\u0435 \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u043f\u0435\u0440\u0435\u0432\u043e\u0434\u0438\u0442 \u043e\u0442\u0432\u0435\u0442 \u043c\u043e\u0434\u0435\u043b\u0438 \u0432 \u0432\u0435\u043a\u0442\u043e\u0440 numpy \u0438 \u0432\u044b\u0434\u0435\u043b\u044f\u0435\u0442 114 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u044f\u0432\u043b\u044f\u044e\u0442\u0441\u044f \u043e\u0442\u0432\u0435\u0442\u043e\u043c<\/em><\/p>\n<p>\u041f\u043e\u0441\u043b\u0435 \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u043a\u043e\u0434\u0430 \u043e\u0448\u0438\u0431\u043a\u0430 \u043c\u043e\u0434\u0435\u043b\u0438 \u0441\u043e\u0441\u0442\u0430\u0432\u0438\u043b\u0430 <code>2.2743354568119476<\/code> \u0433\u0440\u0430\u0434\u0443\u0441\u043e\u0432 \u0446\u0435\u043b\u044c\u0441\u0438\u044f. \u0422\u043e \u0435\u0441\u0442\u044c \u043d\u0430\u0448\u0430 \u0440\u0435\u0433\u0440\u0435\u0441\u0441\u0438\u043e\u043d\u043d\u0430\u044f \u043c\u043e\u0434\u0435\u043b\u044c \u043f\u0440\u0435\u0434\u0441\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442 \u0442\u0435\u043c\u043f\u0435\u0440\u0430\u0442\u0443\u0440\u0443 \u043d\u0430 114 \u0434\u043d\u0435\u0439 (\u0434\u043b\u0438\u043d\u0430 \u0442\u0435\u0441\u0442\u043e\u0432\u043e\u0439 \u0432\u044b\u0431\u043e\u0440\u043a\u0438) \u0432\u043f\u0435\u0440\u0435\u0434 \u0441 \u043f\u043e\u0433\u0440\u0435\u0448\u043d\u043e\u0441\u0442\u044c\u044e \u0447\u0443\u0442\u044c \u0431\u043e\u043b\u0435\u0435 2 \u0433\u0440\u0430\u0434\u0443\u0441\u043e\u0432.<\/p>\n<p><em>\u0412\u0430\u0436\u043d\u043e \u0437\u0430\u043c\u0435\u0442\u0438\u0442\u044c, \u0447\u0442\u043e \u0434\u0430\u043d\u043d\u0430\u044f \u043c\u043e\u0434\u0435\u043b\u044c &#8212; \u043b\u0438\u0448\u044c \u043f\u0440\u0438\u043c\u0435\u0440, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0431\u044b\u043b \u043f\u0440\u0438\u0432\u0435\u0434\u0435\u043d \u0432 \u0446\u0435\u043b\u044f\u0445 \u0443\u043a\u0430\u0437\u0430\u0442\u044c \u043d\u0430 \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u044b\u0435 \u0441\u043f\u043e\u0441\u043e\u0431\u044b \u043f\u043e\u0438\u0441\u043a\u0430 \u043f\u0435\u0440\u0438\u043e\u0434\u0438\u0437\u0430\u0446\u0438\u0438 \u0438 \u0442\u0440\u0435\u043d\u0434\u043e\u0432 \u0432 \u0434\u0430\u043d\u043d\u044b\u0445. \u0415\u0441\u043b\u0438 \u0443 \u0432\u0430\u0441 \u0435\u0441\u0442\u044c \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435, \u043d\u0435 \u0442\u0430\u043a\u0438\u0435 \u0441\u043b\u043e\u0436\u043d\u044b\u0435 \u043a\u0430\u043a \u043f\u043e\u0433\u043e\u0434\u0430, \u0442\u043e \u043e\u043f\u0438\u0441\u0430\u043d\u043d\u044b\u0439 \u0432 \u0441\u0442\u0430\u0442\u044c\u0435 \u043c\u0435\u0442\u043e\u0434 \u043c\u043e\u0436\u0435\u0442 \u043e\u043a\u0430\u0437\u0430\u0442\u044c\u0441\u044f \u0431\u043e\u043b\u0435\u0435 \u0447\u0435\u043c \u044d\u0444\u0444\u0435\u043a\u0442\u0438\u0432\u043d\u044b\u043c. \u041d\u043e \u0432 \u0441\u043b\u0443\u0447\u0430\u0435 \u0441 \u043f\u043e\u0433\u043e\u0434\u043e\u0439, \u0435\u0441\u0442\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u043e, \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u044b\u043c \u0431\u0443\u0434\u0435\u0442 \u043e\u0431\u0440\u0430\u0449\u0430\u0442\u044c\u0441\u044f \u0437\u0430 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043a \u043c\u0435\u0442\u0435\u043e\u0440\u043e\u043b\u043e\u0433\u0438\u0447\u0435\u0441\u043a\u043e\u0439 \u0441\u043b\u0443\u0436\u0431\u0435.<\/em><\/p>\n<h2>\u0417\u0430\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0435<\/h2>\n<hr\/>\n<p>\u041a\u0440\u043e\u043c\u0435 \u043c\u0435\u0442\u043e\u0434\u043e\u0432, \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0435\u043d\u043d\u044b\u0445 \u0432\u044b\u0448\u0435, \u0441\u0443\u0449\u0435\u0441\u0442\u0432\u0443\u0435\u0442 \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u043e \u0440\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0445 \u0441\u043f\u043e\u0441\u043e\u0431\u043e\u0432 \u0430\u043d\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0438 \u043f\u0440\u043e\u0433\u043d\u043e\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0432\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0435 \u0440\u044f\u0434\u044b. \u041a \u043d\u0438\u043c \u043e\u0442\u043d\u043e\u0441\u044f\u0442\u0441\u044f \u043d\u0435\u0439\u0440\u043e\u0441\u0435\u0442\u0438 \u0438 \u043f\u0440\u043e\u0447\u0438\u0435 \u043c\u0430\u0442\u0435\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u043f\u0440\u0438\u0435\u043c\u044b.<\/p>\n<p>\u041c\u0430\u0442\u0435\u0440\u0438\u0430\u043b\u044b \u0438\u0437 \u0441\u0442\u0430\u0442\u044c\u0438:<\/p>\n<ul>\n<li>\n<p><a href=\"https:\/\/www.kaggle.com\/datasets\/sumanthvrao\/daily-climate-time-series-data\" rel=\"noopener noreferrer nofollow\">\u0414\u0430\u0442\u0430\u0441\u0435\u0442<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/medium.com\/@urvashilluniya\/why-data-normalization-is-necessary-for-machine-learning-models-681b65a05029#:~:text=Normalization%20is%20a%20technique%20often,dataset%20does%20not%20require%20normalization.\" rel=\"noopener noreferrer nofollow\">\u041e \u043f\u043e\u043b\u044c\u0437\u0435 \u043d\u043e\u0440\u043c\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/www.youtube.com\/watch?v=spUNpyF58BY\" rel=\"noopener noreferrer nofollow\">\u041f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u0424\u0443\u0440\u044c\u0435<\/a><\/p>\n<\/li>\n<\/ul>\n<p>\u0422\u0435\u043c, \u043a\u043e\u043c\u0443 \u0438\u043d\u0442\u0435\u0440\u0435\u0441\u043d\u0430 \u043a\u043e\u043d\u0446\u0435\u043f\u0446\u0438\u044f \u043f\u0440\u043e\u0433\u043d\u043e\u0437\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0432\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445 \u0440\u044f\u0434\u043e\u0432, \u043c\u043e\u0433\u0443 \u043f\u043e\u0441\u043e\u0432\u0435\u0442\u043e\u0432\u0430\u0442\u044c:<\/p>\n<ul>\n<li>\n<p><a href=\"https:\/\/www.tensorflow.org\/tutorials\/structured_data\/time_series\" rel=\"noopener noreferrer nofollow\">\u041f\u0440\u043e\u0433\u043d\u043e\u0437\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u0440\u0435\u043a\u0443\u0440\u0440\u0435\u043d\u0442\u043d\u044b\u0445 \u043d\u0435\u0439\u0440\u043e\u0441\u0435\u0442\u0435\u0439. \u041a\u0443\u0440\u0441 \u043e\u0442 tensorflow<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/towardsdatascience.com\/the-complete-guide-to-time-series-analysis-and-forecasting-70d476bfe775\" rel=\"noopener noreferrer nofollow\">\u0420\u0430\u0437\u043b\u0438\u0447\u043d\u044b\u0435 \u043c\u0435\u0442\u043e\u0434\u044b \u0430\u043d\u0430\u043b\u0438\u0437\u0430 \u0432\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445 \u0440\u044f\u0434\u043e\u0432<\/a><\/p>\n<\/li>\n<li>\n<p><a href=\"https:\/\/en.wikipedia.org\/wiki\/Time_series#Tools\" rel=\"noopener noreferrer nofollow\">\u0418\u043d\u0441\u0442\u0440\u0443\u043c\u0435\u043d\u0442\u044b \u0430\u043d\u0430\u043b\u0438\u0437\u0430 \u0432\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445 \u0440\u044f\u0434\u043e\u0432<\/a><\/p>\n<\/li>\n<\/ul>\n<\/div>\n<\/div>\n<\/div>\n<p><!----><!----><\/div>\n<p><!----><!----><br \/> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/articles\/752662\/\"> https:\/\/habr.com\/ru\/articles\/752662\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<div><!--[--><!--]--><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<h2>\u0412\u0432\u0435\u0434\u0435\u043d\u0438\u0435<\/h2>\n<p><em>\u0441\u0442\u0430\u0442\u044c\u044f \u043f\u043e\u0434\u0433\u043e\u0442\u043e\u0432\u043b\u0435\u043d\u0430 <\/em><a href=\"https:\/\/github.com\/Ultrageopro1966\" rel=\"noopener noreferrer nofollow\"><em>UltraGeoPro<\/em><\/a><\/p>\n<p><strong>\u0412 \u0434\u0430\u043d\u043d\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u0431\u0443\u0434\u0443\u0442 \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0435\u043d\u044b \u0441\u043f\u043e\u0441\u043e\u0431\u044b \u0430\u043d\u0430\u043b\u0438\u0437\u0430 \u0432\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445 \u0440\u044f\u0434\u043e\u0432.<\/strong> \u0420\u0430\u0437\u0431\u0435\u0440\u0435\u043c \u043e\u0441\u043d\u043e\u0432\u043d\u044b\u0435 \u043c\u0435\u0442\u043e\u0434\u044b \u043f\u0440\u043e\u0433\u043d\u043e\u0437\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0443\u043f\u043e\u0440\u044f\u0434\u043e\u0447\u0435\u043d\u043d\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445.<\/p>\n<p>\u041f\u0440\u043e\u0441\u0442\u044b\u043c\u0438 \u0441\u043b\u043e\u0432\u0430\u043c\u0438, <strong>\u0432\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 \u0440\u044f\u0434<\/strong> &#8212; \u044d\u0442\u043e \u0434\u0430\u043d\u043d\u044b\u0435, \u0443\u043f\u043e\u0440\u044f\u0434\u043e\u0447\u0435\u043d\u043d\u044b\u0435 \u043f\u043e \u0432\u0440\u0435\u043c\u0435\u043d\u0438 (\u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043a\u0443\u0440\u0441 \u0434\u043e\u043b\u043b\u0430\u0440\u0430).<br \/> \u0410\u043d\u0430\u043b\u0438\u0437 \u0432\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445 \u0440\u044f\u0434\u043e\u0432 \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u044c \u043e\u0441\u043d\u043e\u0432\u043d\u044b\u0435 \u0437\u0430\u043a\u043e\u043d\u043e\u043c\u0435\u0440\u043d\u043e\u0441\u0442\u0438 \u0432 \u0434\u0430\u043d\u043d\u044b\u0445 \u0438 \u043f\u0440\u043e\u0433\u043d\u043e\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0438\u0445.<\/p>\n<figure class=\"\"><\/figure>\n<blockquote>\n<p>\u041f\u0440\u0438\u043c\u0435\u0440 \u0432\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0433\u043e \u0440\u044f\u0434\u0430 (\u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0441\u0442\u044c \u043f\u0440\u043e\u0434\u0430\u0436 \u043e\u0442 \u0432\u0440\u0435\u043c\u0435\u043d\u0438)<\/p>\n<\/blockquote>\n<p>\u041d\u0430 \u0442\u0435\u043a\u0443\u0449\u0438\u0439 \u043c\u043e\u043c\u0435\u043d\u0442 \u0431\u044b\u043b\u043e \u0438\u0437\u043e\u0431\u0440\u0435\u0442\u0435\u043d\u043e \u0431\u043e\u043b\u044c\u0448\u043e\u0435 \u043a\u043e\u043b-\u0432\u043e \u043c\u0435\u0442\u043e\u0434\u043e\u0432 \u0440\u0430\u0431\u043e\u0442\u044b \u0441\u043e \u0441\u0442\u0440\u0443\u043a\u0442\u0443\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u044b\u043c\u0438 \u0434\u0430\u043d\u043d\u044b\u043c\u0438, \u0442\u0430\u043a \u0447\u0442\u043e \u043c\u044b \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u043b\u0438\u0448\u044c \u043d\u0435\u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0438\u0437 \u043d\u0438\u0445 \u043d\u0430 \u043f\u0440\u0438\u043c\u0435\u0440\u0435 \u0434\u0430\u043d\u043d\u044b\u0445 \u043e \u043f\u043e\u0433\u043e\u0434\u0435 \u0441 2013 \u0433\u043e\u0434\u0430 \u043f\u043e 2017.<\/p>\n<h2>\u041e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0430 \u0434\u0430\u043d\u043d\u044b\u0445<\/h2>\n<hr\/>\n<p><em>\u0414\u043b\u044f \u0430\u043d\u0430\u043b\u0438\u0437\u0430 \u0432\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445 \u0440\u044f\u0434\u043e\u0432 \u0438 \u0438\u0445 \u043f\u0440\u043e\u0433\u043d\u043e\u0437\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0431\u0443\u0434\u0435\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d \u044f\u0437\u044b\u043a Python \u0432 \u0441\u0432\u044f\u0437\u043a\u0435 \u0441\u043e \u0441\u0442\u043e\u0440\u043e\u043d\u043d\u0438\u043c\u0438 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0430\u043c\u0438 (pandas, numpy, tensorflow, matplotlib). \u0421\u0442\u0430\u0442\u044c\u044f \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u0434\u043e\u0441\u0442\u0430\u0442\u043e\u0447\u043d\u043e\u0435 \u043a\u043e\u043b-\u0432\u043e \u0432\u0438\u0437\u0443\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0439 \u0438 \u043f\u043e\u044f\u0441\u043d\u0435\u043d\u0438\u0439 \u0434\u043b\u044f \u043f\u043e\u043d\u0438\u043c\u0430\u043d\u0438\u044f \u0435\u0435 \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u043d\u0438\u044f.<\/em><\/p>\n<h3>\u0417\u0430\u0433\u0440\u0443\u0437\u043a\u0430 \u0434\u0430\u0442\u0430\u0441\u0435\u0442\u0430<\/h3>\n<pre><code class=\"python\"># \u0418\u043c\u043f\u043e\u0440\u0442 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a from datetime import datetime  import numpy as np import pandas as pd from matplotlib import pyplot as plt  # \u0412\u044b\u0433\u0440\u0443\u0437\u043a\u0430 \u0434\u0430\u043d\u043d\u044b\u0445 \u0438\u0437 \u0442\u0430\u0431\u043b\u0438\u0446\u044b \u0441 \u0442\u0440\u0435\u043d\u0438\u0440\u043e\u0432\u043e\u0447\u043d\u044b\u043c\u0438 \u0434\u0430\u043d\u043d\u044b\u043c\u0438 train_data: np.ndarray = pd.read_csv(\"DailyDelhiClimateTrain.csv\").values  # \u0412\u044b\u0433\u0440\u0443\u0437\u043a\u0430 \u0434\u0430\u043d\u043d\u044b\u0445 \u0438\u0437 \u0442\u0430\u0431\u043b\u0438\u0446\u044b \u0441 \u0442\u0435\u0441\u0442\u043e\u0432\u044b\u043c\u0438 \u0434\u0430\u043d\u043d\u044b\u043c\u0438 test_data: np.ndarray = pd.read_csv(\"DailyDelhiClimateTest.csv\").values <\/code><\/pre>\n<p>\u0418\u0437\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0435 \u043f\u0435\u0440\u0432\u044b\u0445 \u0441\u0442\u0440\u043e\u043a \u0442\u0435\u0441\u0442\u043e\u0432\u043e\u0439 \u0442\u0430\u0431\u043b\u0438\u0446\u044b:<\/p>\n<figure class=\"\"><\/figure>\n<blockquote>\n<p><a href=\"https:\/\/www.kaggle.com\/datasets\/sumanthvrao\/daily-climate-time-series-data\" rel=\"noopener noreferrer nofollow\">\u0421\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u0442\u0430\u0431\u043b\u0438\u0446\u0443<\/a><\/p>\n<\/blockquote>\n<h3>\u041d\u043e\u0440\u043c\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u0434\u0430\u043d\u043d\u044b\u0445<\/h3>\n<p><em>\u0412 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u0434\u043b\u044f \u0443\u0434\u043e\u0431\u0441\u0442\u0432\u0430 \u043c\u044b \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u0442\u043e\u043b\u044c\u043a\u043e \u0442\u0435\u043c\u043f\u0435\u0440\u0430\u0442\u0443\u0440\u0443, \u043d\u043e \u0432\u044b \u043c\u043e\u0436\u0435\u0442\u0435 \u0432\u0437\u044f\u0442\u044c \u043b\u044e\u0431\u043e\u0439 \u0434\u0440\u0443\u0433\u043e\u0439 \u0441\u0442\u043e\u043b\u0431\u0435\u0446 \u0434\u0430\u0442\u0430\u0441\u0435\u0442\u0430. \u0418\u043b\u0438 \u0434\u0430\u0436\u0435 \u0432\u0441\u0435 \u0441\u0440\u0430\u0437\u0443.<\/em><\/p>\n<p>\u0415\u0441\u0442\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u043e, \u043d\u0438 \u043e\u0434\u043d\u0430 \u043c\u043e\u0434\u0435\u043b\u044c \u043d\u0435 \u0441\u043c\u043e\u0436\u0435\u0442 \u043f\u043e\u043d\u044f\u0442\u044c, \u0447\u0442\u043e \u0437\u043d\u0430\u0447\u0438\u0442 \u0441\u0442\u0440\u043e\u043a\u043e\u0432\u043e\u0435 \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u0434\u0430\u0442\u044b &#171;2017-01-01&#187;, \u0442\u0430\u043a \u0447\u0442\u043e \u0434\u0430\u0432\u0430\u0439\u0442\u0435 \u043f\u0440\u0438\u0432\u0435\u0434\u0435\u043c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u043f\u0435\u0440\u0432\u043e\u0433\u043e \u0441\u0442\u043e\u043b\u0431\u0446\u0430 \u043a \u0446\u0435\u043b\u044b\u043c \u0447\u0438\u0441\u043b\u0430\u043c (\u043a\u043e\u043b-\u0432\u043e \u0434\u043d\u0435\u0439 \u0441 \u043d\u0430\u0447\u0430\u043b\u0430 \u043e\u0442\u0441\u0447\u0435\u0442\u0430)<\/p>\n<p>\u0424\u0443\u043d\u043a\u0446\u0438\u044f \u043f\u0435\u0440\u0435\u0432\u043e\u0434\u0430 \u0434\u0430\u0442\u044b \u0432 \u043a\u043e\u043b-\u0432\u043e \u0434\u043d\u0435\u0439 \u043e\u0442 2013-01-01 (\u0441\u0430\u043c\u0430\u044f \u043f\u0435\u0440\u0432\u0430\u044f \u0434\u0430\u0442\u0430 \u0432 \u0442\u0430\u0431\u043b\u0438\u0446\u0435):<\/p>\n<pre><code class=\"python\">def days_since_zero_date(date_str: str) -> int: # \u041f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u0441\u0442\u0440\u043e\u043a\u0438 \u0432 \u043e\u0431\u044a\u0435\u043a\u0442 datetime date_format: str = \"%Y-%m-%d\" date_obj = datetime.strptime(date_str, date_format)  # \u041d\u0443\u043b\u0435\u0432\u0430\u044f \u0434\u0430\u0442\u0430 zero_date = datetime.strptime(\"2013-01-01\", date_format)  # \u0412\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u0435 \u0440\u0430\u0437\u043d\u0438\u0446\u044b \u0432 \u0434\u043d\u044f\u0445 delta = date_obj - zero_date days = delta.days   return days <\/code><\/pre>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u043f\u0435\u0440\u0435\u0432\u0435\u0434\u0435\u043c \u0432\u0441\u0435 \u0434\u0430\u0442\u044b \u0432 \u0437\u0430\u0433\u0440\u0443\u0436\u0435\u043d\u043d\u044b\u0445 \u0442\u0430\u0431\u043b\u0438\u0446\u0430\u0445 \u0432 \u0434\u043d\u0438 \u0438 \u0432\u044b\u0432\u0435\u0434\u0435\u043c \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442:<\/p>\n<pre><code class=\"python\"># \u041f\u0440\u0438\u043c\u0435\u043d\u044f\u0435\u043c \u0440\u0430\u043d\u0435\u0435 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u0443\u044e \u0444\u0443\u043d\u043a\u0446\u0438\u044e \u043a\u043e \u0432\u0441\u0435\u043c \u0434\u0430\u0442\u0430\u043c \u0434\u0430\u0442\u0430\u0441\u0435\u0442\u0430 train_data[:, 0] = np.vectorize(days_since_zero_date)(train_data[:, 0]) test_data[:, 0] = np.vectorize(days_since_zero_date)(test_data[:, 0])  train_data = train_data.astype(\"float\") test_data = test_data.astype(\"float\")  print(train_data[0]) # \u0412\u044b\u0432\u043e\u0434 - [0 10.0 84.5 0.0 1015.6666666666666] # \u0412\u0438\u0434\u043d\u043e, \u0447\u0442\u043e \u0432\u0441\u0435 \u0434\u0430\u0442\u044b \u043f\u0440\u0435\u0432\u0440\u0430\u0442\u0438\u043b\u0438\u0441\u044c \u0432 \u0434\u043d\u0438 <\/code><\/pre>\n<p>\u0414\u0430\u043b\u0435\u0435 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u043d\u043e\u0440\u043c\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0435 \u043f\u043e \u0444\u043e\u0440\u043c\u0443\u043b\u0435 (\u043c\u0435\u0442\u043e\u0434 Z-\u041d\u043e\u0440\u043c\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f)<\/p>\n<p>\u0413\u0434\u0435:<\/p>\n<ol>\n<li>\n<p> &#8212; \u0441\u0440\u0435\u0434\u043d\u0435\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0432\u044b\u0431\u043e\u0440\u043a\u0438<\/p>\n<\/li>\n<li>\n<p> &#8212; \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u043e\u0435 \u043e\u0442\u043a\u043b\u043e\u043d\u0435\u043d\u0438\u0435 \u0432\u044b\u0431\u043e\u0440\u043a\u0438<\/p>\n<\/li>\n<li>\n<p> &#8212; \u043d\u0435\u043d\u043e\u0440\u043c\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043d\u043d\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435<\/p>\n<\/li>\n<li>\n<p> &#8212; \u043d\u043e\u0440\u043c\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043d\u043d\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435<\/p>\n<\/li>\n<\/ol>\n<pre><code class=\"python\">class Normalize: def __init__(self, data: np.ndarray) -> None: self.data: np.ndarray = np.copy(data) # \u0417\u0430\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u043c \u043a\u043e\u043f\u0438\u044e \u0434\u0430\u043d\u043d\u044b\u0445  # \u0412\u044b\u0447\u0438\u0441\u043b\u044f\u0435\u043c \u0441\u0440\u0435\u0434\u043d\u0435\u0435 \u043f\u043e \u043a\u0430\u0436\u0434\u043e\u043c\u0443 \u0441\u0442\u043e\u043b\u0431\u0446\u0443 self.__mean: np.ndarray = data.mean(axis=0) # \u0412\u044b\u0447\u0438\u0441\u043b\u044f\u0435\u043c \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u043e\u0435 \u043e\u0442\u043a\u043b\u043e\u043d\u0435\u043d\u0438\u0435 \u043f\u043e \u043a\u0430\u0436\u0434\u043e\u043c\u0443 \u0441\u0442\u043e\u043b\u0431\u0446\u0443 self.__std_dev: np.ndarray = data.std(axis=0)  def normalizeData(self) -> np.ndarray: # \u0412\u043e\u0437\u0432\u0440\u0430\u0442 \u043d\u043e\u0440\u043c\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043d\u043d\u044b\u0445 \u0434\u0430\u043d\u043d\u0430\u0445 \u043f\u043e \u0444\u043e\u0440\u043c\u0443\u043b\u0435 return (self.data - self.__mean) \/ self.__std_dev  def DeNormalizeData( self, normalized_data: np.ndarray, axes: list[int] = [0, 1, 2, 3] ) -> np.ndarray: # \u0414\u0435\u043d\u043e\u0440\u043c\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u0434\u043d\u0430\u043d\u043d\u044b\u0445 \u043f\u043e \u0443\u043a\u0430\u0437\u0430\u043d\u043d\u043e\u0439 \u043e\u0441\u0438 return normalized_data * self.__std_dev[axes] + self.__mean[axes]  # \u041d\u043e\u0440\u043c\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u0442\u0435\u043c\u043f\u0435\u0440\u0430\u0442\u0443\u0440\u044b train_normalize_class = Normalize(train_data[:, 1:]) train_data[:, 1:] = train_normalize_class.normalizeData() <\/code><\/pre>\n<p>\u0412 \u0434\u0430\u043d\u043d\u043e\u043c \u0444\u0440\u0430\u0433\u043c\u0435\u043d\u0442\u0435 \u043c\u044b \u0441\u043e\u0437\u0434\u0430\u043b\u0438 \u043a\u043b\u0430\u0441\u0441, \u0440\u0435\u0430\u043b\u0438\u0437\u0443\u044e\u0449\u0438\u0439 \u043b\u043e\u0433\u0438\u043a\u0443 \u043d\u043e\u0440\u043c\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438 \u0434\u0430\u043d\u043d\u044b\u0445. \u0412 \u0434\u0432\u0443\u0445 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0438\u0445 \u0441\u0442\u0440\u043e\u043a\u0430\u0445 \u043d\u043e\u0440\u043c\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043b\u0438 \u043e\u0431\u0443\u0447\u0430\u044e\u0449\u0443\u044e \u0432\u044b\u0431\u043e\u0440\u043a\u0443 (\u043a\u0440\u043e\u043c\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439 \u0434\u043d\u0435\u0439). \u041c\u0435\u0442\u043e\u0434 <code>DeNormalizeData<\/code> \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0438\u043d\u0442\u0435\u0440\u043f\u0440\u0435\u0442\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043b\u044e\u0431\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435, \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u043d\u044b\u0435 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043c\u043e\u0434\u0435\u043b\u0438, \u0432 \u043f\u0440\u0438\u0432\u044b\u0447\u043d\u043e\u0439 \u043d\u0430\u043c \u0444\u043e\u0440\u043c\u0435.<\/p>\n<p>\u041f\u043e\u0441\u0442\u0440\u043e\u0438\u043c \u0433\u0440\u0430\u0444\u0438\u043a \u0442\u0435\u043c\u043f\u0435\u0440\u0430\u0442\u0443\u0440\u044b \u0434\u043b\u044f \u043d\u0430\u0433\u043b\u044f\u0434\u043d\u043e\u0441\u0442\u0438.<\/p>\n<pre><code class=\"python\"># \u0421\u043e\u0437\u0434\u0430\u0435\u043c \u043f\u043e\u043b\u0435 \u0433\u0440\u0430\u0444\u0438\u043a\u0430 fig, ax = plt.subplots(1, 2)  # \u041b\u0438\u043c\u0438\u0442\u044b \u043d\u0430 \u043e\u0441\u044f\u0445 ax[0].set_ylim([-10, 40]) ax[1].set_ylim([-10, 40])  # \u041f\u043e\u0434\u043f\u0438\u0441\u0438 \u043e\u0441\u0435\u0439 ax[0].set_ylabel(\"\u0422\u0435\u043c\u043f\u0435\u0440\u0435\u0442\u0443\u0440\u0430\") ax[0].set_xlabel(\"\u0414\u0435\u043d\u044c\") ax[1].set_xlabel(\"\u0414\u0435\u043d\u044c\")  ax[0].set_title(\"\u041d\u043e\u0440\u043c\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043d\u043d\u0430\u044f \u0442\u0435\u043c\u043f\u0435\u0440\u0430\u0442\u0443\u0440\u0430\") ax[1].set_title(\"\u0420\u0435\u0430\u043b\u044c\u043d\u0430\u044f \u0442\u0435\u043c\u043f\u0435\u0440\u0430\u0442\u0443\u0440\u0430\")  # \u0421\u0435\u0442\u043a\u0430 \u043d\u0430 \u043e\u0441\u044f\u0445 ax[0].grid() ax[1].grid()  # \u041e\u0442\u043e\u0431\u0440\u0430\u0436\u0435\u043d\u0438\u0435 \u043d\u043e\u0440\u043c\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043d\u043d\u044b\u0445 \u0438 \u043d\u0435\u043d\u043e\u0440\u043c\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043d\u043d\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445 ax[0].plot(train_data[:, 1], c=\"b\", linewidth=1) ax[1].plot( train_normalize_class.DeNormalizeData(train_data[:, 1], axes=[0]), c=\"r\", linewidth=1, )  plt.show() <\/code><\/pre>\n<figure class=\"\"><\/figure>\n<blockquote>\n<p>\u0412\u0438\u0434\u043d\u043e, \u0447\u0442\u043e \u043d\u043e\u0440\u043c\u0430\u043b\u0438\u0437\u043e\u0432\u0430\u043d\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 \u043d\u0435 \u043f\u043e\u0442\u0435\u0440\u044f\u043b\u0438 \u0441\u0432\u043e\u044e \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u043e\u043d\u043d\u0443\u044e \u0446\u0435\u043d\u043d\u043e\u0441\u0442\u044c, \u043b\u0435\u0433\u043a\u043e \u0432\u043e\u0441\u0441\u0442\u0430\u043d\u0430\u0432\u043b\u0438\u0432\u0430\u044e\u0442\u0441\u044f \u0432 \u0440\u0435\u0430\u043b\u044c\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 (\u0432\u0442\u043e\u0440\u043e\u0439 \u0433\u0440\u0430\u0444\u0438\u043a) \u0438 \u0431\u043e\u043b\u0435\u0435 \u0443\u0434\u043e\u0431\u043d\u044b \u0434\u043b\u044f \u0430\u043d\u0430\u043b\u0438\u0437\u0430 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043c\u043e\u0434\u0435\u043b\u0435\u0439 \u043c\u0430\u0448\u0438\u043d\u043d\u043e\u0433\u043e \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f. <a href=\"https:\/\/medium.com\/@urvashilluniya\/why-data-normalization-is-necessary-for-machine-learning-models-681b65a05029#:~:text=Normalization%20is%20a%20technique%20often,dataset%20does%20not%20require%20normalization.\" rel=\"noopener noreferrer nofollow\">\u041e \u043f\u043e\u043b\u044c\u0437\u0435 \u043d\u043e\u0440\u043c\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u0438<\/a><\/p>\n<\/blockquote>\n<h3>\u0421\u0433\u043b\u0430\u0436\u0438\u0432\u0430\u043d\u0438\u0435 \u0448\u0443\u043c\u0430<\/h3>\n<p>\u0421\u0433\u043b\u0430\u0436\u0438\u0432\u0430\u0442\u044c \u0448\u0443\u043c \u0431\u0443\u0434\u0435\u043c \u043c\u0435\u0442\u043e\u0434\u043e\u043c \u0441\u043a\u043e\u043b\u044c\u0437\u044f\u0449\u0435\u0439 \u0441\u0440\u0435\u0434\u043d\u0435\u0439. \u0421\u0443\u0442\u044c \u043c\u0435\u0442\u043e\u0434\u0430 \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e \u043c\u044b \u043f\u0440\u043e\u0445\u043e\u0434\u0438\u043c\u0441\u044f \u043f\u043e \u0432\u0441\u0435\u043c\u0443 \u0433\u0440\u0430\u0444\u0438\u043a\u0443 &#171;\u043e\u043a\u043d\u043e\u043c&#187; \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u043e\u0433\u043e \u0440\u0430\u0437\u043c\u0435\u0440\u0430. \u041f\u0435\u0440\u0435\u043c\u0435\u0449\u0430\u044f \u043e\u043a\u043d\u043e, \u0432\u044b\u0447\u0438\u0441\u043b\u044f\u0435\u043c \u0441\u0440\u0435\u0434\u043d\u0435\u0435 \u0432\u0441\u0435\u0445 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0432 \u043d\u0435\u0433\u043e \u043f\u043e\u043f\u0430\u043b\u0438. \u0422\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c \u043c\u044b \u0441\u0433\u043b\u0430\u0436\u0438\u0432\u0430\u0435\u043c \u0432\u0435\u0441\u044c \u0448\u0443\u043c \u0433\u0440\u0430\u0444\u0438\u043a\u0430, \u0442\u0430\u043a \u043a\u0430\u043a \u043e\u043d \u043a\u043e\u043c\u043f\u0435\u043d\u0441\u0438\u0440\u0443\u0435\u0442 \u0441\u0430\u043c \u0441\u0435\u0431\u044f.<br \/> <em>\u041d\u0430 \u0441\u0430\u043c\u043e\u043c \u0434\u0435\u043b\u0435, \u0434\u043b\u044f \u0440\u0435\u0448\u0435\u043d\u0438\u044f \u043d\u0430\u0448\u0435\u0439 \u0437\u0430\u0434\u0430\u0447\u0438 \u043f\u0440\u0438\u043c\u0435\u043d\u0435\u043d\u0438\u0435 \u0434\u0430\u043d\u043d\u043e\u0433\u043e \u043c\u0435\u0442\u043e\u0434\u0430 \u043d\u0435 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u043c, \u0432 \u0441\u0442\u0430\u0442\u044c\u0435 \u043e\u043d \u043f\u0440\u0438\u0432\u0435\u0434\u0435\u043d \u0441\u043a\u043e\u0440\u0435\u0435 \u0432 \u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u044b\u0445 \u0446\u0435\u043b\u044f\u0445<\/em><\/p>\n<p>\u00a0&#8212; \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u043f\u0440\u043e\u0441\u0442\u043e\u0433\u043e \u0441\u043a\u043e\u043b\u044c\u0437\u044f\u0449\u0435\u0433\u043e \u0441\u0440\u0435\u0434\u043d\u0435\u0433\u043e \u0432 \u0442\u043e\u0447\u043a\u0435 <br \/> \u00a0&#8212; \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439 \u0438\u0441\u0445\u043e\u0434\u043d\u043e\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0434\u043b\u044f \u0440\u0430\u0441\u0447\u0451\u0442\u0430 \u0441\u043a\u043e\u043b\u044c\u0437\u044f\u0449\u0435\u0433\u043e \u0441\u0440\u0435\u0434\u043d\u0435\u0433\u043e (\u0440\u0430\u0437\u043c\u0435\u0440 &#171;\u043e\u043a\u043d\u0430&#187;)<br \/>  &#8212; \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0438\u0441\u0445\u043e\u0434\u043d\u043e\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0432 \u0442\u043e\u0447\u043a\u0435 <\/p>\n<figure class=\"\"><\/figure>\n<blockquote>\n<p>\u041f\u0440\u0438\u043c\u0435\u0440 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u044f  (\u0432\u0437\u044f\u0442\u043e \u0438\u0437 \u0438\u043d\u0442\u0435\u0440\u043d\u0435\u0442\u0430)<\/p>\n<\/blockquote>\n<p>\u0420\u0435\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u0432 \u043a\u043e\u0434\u0435 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e <code>pandas<\/code>:<\/p>\n<pre><code class=\"python\">window_size = train_data.shape[0] \/\/ 70 denoised_data: np.ndarray = ( pd.Series(train_data[:, 1]) .rolling(window=window_size) .mean() .iloc[window_size - 1 :] .values ) <\/code><\/pre>\n<p>\u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442:<\/p>\n<figure class=\"\"><\/figure>\n<blockquote>\n<p><em>\u042f \u043d\u0435 \u0431\u0443\u0434\u0443 \u043f\u0440\u0438\u043a\u0440\u0435\u043f\u043b\u044f\u0442\u044c \u043a\u043e\u0434 \u043f\u043e\u0441\u0442\u0440\u043e\u0435\u043d\u0438\u044f \u0433\u0440\u0430\u0444\u0438\u043a\u0430, \u0442\u0430\u043a \u043a\u0430\u043a \u043d\u0438\u0447\u0435\u0433\u043e \u043d\u043e\u0432\u043e\u0433\u043e \u0432\u044b \u0442\u0430\u043c \u043d\u0435 \u043d\u0430\u0439\u0434\u0435\u0442\u0435.<\/em><\/p>\n<\/blockquote>\n<h2>\u041f\u0440\u043e\u0433\u043d\u043e\u0437\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435 \u0434\u0430\u043d\u043d\u044b\u0445<\/h2>\n<hr\/>\n<p>\u0412\u0438\u0434\u043d\u043e, \u0447\u0442\u043e \u0433\u0440\u0430\u0444\u0438\u043a \u0442\u0435\u043c\u043f\u0435\u0440\u0430\u0442\u0443\u0440\u044b \u043e\u0431\u043b\u0430\u0434\u0430\u0435\u0442 \u044f\u0440\u043a\u043e \u0432\u044b\u0440\u0430\u0436\u0435\u043d\u043d\u043e\u0439 \u043f\u0435\u0440\u0438\u043e\u0434\u0438\u0447\u043d\u043e\u0441\u0442\u044c\u044e \u0438 \u0441\u0438\u043b\u044c\u043d\u043e \u043d\u0430\u043f\u043e\u043c\u0438\u043d\u0430\u0435\u0442 \u0441\u0438\u043d\u0443\u0441\u043e\u0438\u0434\u0443.<br \/> \u0418\u0437 \u044d\u0442\u043e\u0433\u043e \u0432\u044b\u0442\u0435\u043a\u0430\u0435\u0442 \u0446\u0435\u043b\u044c &#8212; <strong>\u043f\u043e\u0434\u043e\u0431\u0440\u0430\u0442\u044c \u043d\u0430\u0438\u0431\u043e\u043b\u0435\u0435 \u043f\u043e\u0434\u0445\u043e\u0434\u044f\u0449\u0443\u044e \u0441\u0438\u043d\u0443\u0441\u043e\u0438\u0434\u0443<\/strong> (\u0438\u043b\u0438 \u0441\u0443\u043c\u043c\u0443 \u0441\u0438\u043d\u0443\u0441\u043e\u0438\u0434), \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0431\u0443\u0434\u0435\u0442 \u043d\u0430\u0438\u043b\u0443\u0447\u0448\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u043e\u0432\u0430\u0442\u044c \u0442\u0435\u043c\u043f\u0435\u0440\u0430\u0442\u0443\u0440\u0435.<\/p>\n<h3>\u041f\u043e\u0434\u0431\u043e\u0440 \u043f\u043e\u0434\u0445\u043e\u0434\u044f\u0449\u0435\u0439 \u043a\u0440\u0438\u0432\u043e\u0439 \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u0424\u0443\u0440\u044c\u0435 \u0438 \u0433\u0440\u0430\u0434\u0438\u0435\u043d\u0442\u043d\u043e\u0433\u043e \u0441\u043f\u0443\u0441\u043a\u0430.<\/h3>\n<h4>\u041f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u0424\u0443\u0440\u044c\u0435<\/h4>\n<p><strong>\u041f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u0424\u0443\u0440\u044c\u0435<\/strong> &#8212; \u043e\u043f\u0435\u0440\u0430\u0446\u0438\u044f, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0441\u043e\u043f\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u0435\u0442 \u043f\u0435\u0440\u0432\u043e\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u0432\u0442\u043e\u0440\u0443\u044e: \u0432\u0442\u043e\u0440\u0430\u044f \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u043e\u043f\u0438\u0441\u044b\u0432\u0430\u0435\u0442 \u043a\u043e\u044d\u0444\u0444\u0438\u0446\u0438\u0435\u043d\u0442\u044b (\u00ab\u0430\u043c\u043f\u043b\u0438\u0442\u0443\u0434\u044b\u00bb) \u043f\u0440\u0438 \u0440\u0430\u0437\u043b\u043e\u0436\u0435\u043d\u0438\u0438 \u043f\u0435\u0440\u0432\u043e\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u043d\u0430 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u0430\u0440\u043d\u044b\u0435 \u0441\u043e\u0441\u0442\u0430\u0432\u043b\u044f\u044e\u0449\u0438\u0435\u00a0\u2014\u00a0\u0433\u0430\u0440\u043c\u043e\u043d\u0438\u0447\u0435\u0441\u043a\u0438\u0435 \u043a\u043e\u043b\u0435\u0431\u0430\u043d\u0438\u044f \u0441 \u0440\u0430\u0437\u043d\u044b\u043c\u0438 \u0447\u0430\u0441\u0442\u043e\u0442\u0430\u043c\u0438. \u0422\u043e \u0435\u0441\u0442\u044c \u0444\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u0434\u0430\u043d\u043d\u043e\u0435 \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u0440\u0430\u0441\u043a\u043b\u0430\u0434\u044b\u0432\u0430\u0435\u0442 \u0444\u0443\u043d\u043a\u0446\u0438\u044e \u043d\u0430 \u0441\u0443\u043c\u043c\u0443 \u0441\u0438\u043d\u0443\u0441\u043e\u0432 \u0440\u0430\u0437\u043d\u043e\u0439 \u0447\u0430\u0441\u0442\u043e\u0442\u044b.<\/p>\n<p>\u0424\u043e\u0440\u043c\u0430\u043b\u044c\u043d\u043e \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u0442\u0441\u044f \u0442\u0430\u043a:<\/p>\n<p>\u0413\u0434\u0435  &#8212; \u0438\u0441\u0441\u043b\u0435\u0434\u0443\u0435\u043c\u044b\u0439 \u0434\u0438\u0430\u043f\u0430\u0437\u043e\u043d \u0447\u0430\u0441\u0442\u043e\u0442, \u0430  &#8212; \u0430\u043c\u043f\u043b\u0438\u0442\u0443\u0434\u0430 \u0441\u0438\u043d\u0443\u0441\u043e\u0438\u0434\u044b \u0447\u0430\u0441\u0442\u043e\u0442\u044b , \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0441\u043b\u0430\u0433\u0430\u0435\u043c\u044b\u043c \u0438\u0441\u0445\u043e\u0434\u043d\u043e\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u0438.<br \/> <em>\u0414\u043b\u044f \u0431\u043e\u043b\u0435\u0435 \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u043e\u0433\u043e \u043e\u0437\u043d\u0430\u043a\u043e\u043c\u043b\u0435\u043d\u0438\u044f \u0441 \u043a\u043e\u043d\u0446\u0435\u043f\u0446\u0438\u0435\u0439 \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u043d\u0438\u044f \u0424\u0443\u0440\u044c\u0435 \u0441\u043e\u0432\u0435\u0442\u0443\u044e \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0442\u044c \u0434\u0430\u043d\u043d\u043e\u0435 <\/em><a href=\"https:\/\/www.youtube.com\/watch?v=spUNpyF58BY\" rel=\"noopener noreferrer nofollow\"><em>\u0432\u0438\u0434\u0435\u043e<\/em><\/a><\/p>\n<figure class=\"\"><\/figure>\n<blockquote>\n<p>\u0412\u0438\u0437\u0443\u0430\u043b\u0438\u0437\u0430\u0446\u0438\u044f \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u043d\u0438\u044f<\/p>\n<\/blockquote>\n<p>\u0422\u0430\u043a\u0438\u043c \u043e\u0431\u0440\u0430\u0437\u043e\u043c, \u0435\u0441\u043b\u0438 \u043c\u044b \u0432\u043e\u0437\u044c\u043c\u0435\u043c \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0441\u0438\u043d\u0443\u0441\u043e\u0438\u0434 \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u043e\u0439 \u0430\u043c\u043f\u043b\u0438\u0442\u0443\u0434\u044b (\u0442\u0435, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043b\u0443\u0447\u0448\u0435 \u0432\u0441\u0435\u0433\u043e \u0430\u043f\u043f\u0440\u043e\u043a\u0441\u0438\u043c\u0438\u0440\u0443\u044e\u0442 \u043d\u0430\u0448\u0438 \u0434\u0430\u043d\u043d\u044b\u0435) \u0438 \u043f\u043e\u0441\u0442\u0440\u043e\u0438\u043c \u0433\u0440\u0430\u0444\u0438\u043a \u0438\u0445 \u0441\u0443\u043c\u043c\u044b, \u0442\u043e \u043c\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u043c \u043d\u0435\u043f\u043b\u043e\u0445\u0443\u044e \u0430\u043f\u043f\u0440\u043e\u043a\u0441\u0438\u043c\u0430\u0446\u0438\u044e \u0442\u0435\u043c\u043f\u0435\u0440\u0430\u0442\u0443\u0440\u044b (\u0432 \u043d\u0430\u0448\u0435\u043c \u0441\u043b\u0443\u0447\u0430\u0435).<\/p>\n<p>\u041d\u043e, \u043a \u0441\u043e\u0436\u0430\u043b\u0435\u043d\u0438\u044e, \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u0424\u0443\u0440\u044c\u0435 \u043d\u0435 \u0432\u044b\u0434\u0430\u0435\u0442 \u043d\u0430\u043c \u0432\u0441\u0435 \u0432\u0435\u0441\u0430 \u0438\u0434\u0435\u0430\u043b\u044c\u043d\u043e\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u0438, \u043d\u043e \u0438 \u043d\u0430\u043c \u043d\u0443\u0436\u043d\u0430 \u0442\u043e\u043b\u044c\u043a\u043e \u0447\u0430\u0441\u0442\u043e\u0442\u0430, \u0432\u0435\u0434\u044c \u043e\u0441\u0442\u0430\u043b\u044c\u043d\u044b\u0435 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u043c\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u043c \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043c\u0435\u0442\u043e\u0434\u0430 \u0433\u0440\u0430\u0434\u0438\u0435\u043d\u0442\u043d\u043e\u0433\u043e \u0441\u043f\u0443\u0441\u043a\u0430. \u041d\u043e \u0434\u0430\u0432\u0430\u0439\u0442\u0435 \u043f\u043e \u043f\u043e\u0440\u044f\u0434\u043a\u0443 \u0438 \u0432 \u043a\u043e\u0434\u0435:<\/p>\n<pre><code class=\"python\"># \u0417\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u043d\u0430 \u043e\u0441\u0438 X (\u0430\u0431\u0441\u0446\u0438\u0441\u0441\u0435), \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u043c\u043e\u0434\u0435\u043b\u044c \u0431\u0443\u0434\u0435\u0442 \u0434\u0435\u043b\u0430\u0442\u044c \u043f\u0440\u0435\u0434\u0441\u043a\u0430\u0437\u0430\u043d\u0438\u044f x_data:np.ndarray = np.linspace(0, len(denoised_data), len(denoised_data))  # \u0414\u0438\u0441\u043a\u0440\u0435\u0442\u043d\u043e\u0435 \u041f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u0424\u0443\u0440\u044c\u0435, \u0441\u043f\u0438\u0441\u043e\u043a \u0430\u043c\u043f\u043b\u0438\u0442\u0443\u0434 mfft:np.ndarray = np.fft.fft(denoised_data)  # \u041f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u0438\u043d\u0434\u0435\u043a\u0441\u044b \u0447\u0430\u0441\u0442\u043e\u0442, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0442 \u0441\u0430\u043c\u044b\u043c \u0437\u043d\u0430\u0447\u0438\u043c\u044b\u043c (\u0441 \u0432\u044b\u0441\u043e\u043a\u043e\u0439 \u0430\u043c\u043f\u043b\u0438\u0442\u0443\u0434\u043e\u0439) \u0441\u0438\u043d\u0443\u0441\u043e\u0438\u0434\u0430\u043c. imax:np.ndarray = np.argsort(np.absolute(mfft))[::-1] <\/code><\/pre>\n<p>\u0414\u043b\u044f \u043f\u0440\u043e\u0441\u0442\u043e\u0442\u044b \u043c\u044b \u0431\u0443\u0434\u0435\u043c \u0440\u0430\u0441\u043a\u043b\u0430\u0434\u044b\u0432\u0430\u0442\u044c \u043d\u0430\u0448\u0438 \u0434\u0430\u043d\u043d\u044b\u0435 \u043d\u0430 \u0441\u0443\u043c\u043c\u0443 \u043f\u044f\u0442\u0438 \u0441\u0438\u043d\u0443\u0441\u043e\u0438\u0434. \u041d\u0435 \u0431\u0443\u0434\u0435\u043c \u0431\u0440\u0430\u0442\u044c \u0441\u043b\u0438\u0448\u043a\u043e\u043c \u043c\u043d\u043e\u0433\u043e \u0441\u043b\u0430\u0433\u0430\u0435\u043c\u044b\u0445, \u0447\u0442\u043e\u0431\u044b \u043c\u043e\u0434\u0435\u043b\u044c \u043d\u0435 \u043f\u043e\u0442\u0435\u0440\u044f\u043b\u0430 \u043e\u0431\u043e\u0431\u0449\u0430\u044e\u0449\u0443\u044e \u0441\u043f\u043e\u0441\u043e\u0431\u043d\u043e\u0441\u0442\u044c.<\/p>\n<pre><code class=\"python\"># \u041a\u043e\u043b-\u0432\u043e \u0441\u0438\u043d\u0443\u0441\u043e\u0432, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043c\u044b \u0431\u0443\u0434\u0435\u043c \u0441\u0443\u043c\u043c\u0438\u0440\u043e\u0432\u0430\u0442\u044c number_of_sinuses: int = 5  # \u0411\u0435\u0440\u0435\u043c \u043f\u0435\u0440\u0432\u044b\u0435 number_of_sinuses \u0441\u0430\u043c\u044b\u0445 \u0432\u044b\u0441\u043e\u043a\u0438\u0445 \u0430\u043c\u043f\u043b\u0438\u0442\u0443\u0434 (\u043e\u043d\u0438 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0442 \u0447\u0430\u0441\u0442\u043e\u0442\u0430\u043c) imax = imax[:number_of_sinuses]  # \u0412\u044b\u0447\u0438\u0441\u043b\u044f\u0435\u043c \u0447\u0430\u0441\u0442\u043e\u0442\u0443 \u043a\u0430\u0436\u0434\u043e\u0439 \u0441\u0438\u043d\u0443\u0441\u043e\u0438\u0434\u044b frequency:np.ndarray = np.array(imax) \/ len(denoised_data) <\/code><\/pre>\n<h4>\u041e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u044f \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432<\/h4>\n<p>\u0414\u043b\u044f \u043d\u0430\u0447\u0430\u043b\u0430 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u043c \u0444\u0443\u043d\u043a\u0446\u0438\u044e, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0431\u0443\u0434\u0435\u0442 \u0430\u043f\u043f\u0440\u043e\u043a\u0441\u0438\u043c\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043d\u0430\u0448\u0438 \u0434\u0430\u043d\u043d\u044b\u0435 \u043e \u0442\u0435\u043c\u043f\u0435\u0440\u0430\u0442\u0443\u0440\u0435. \u0418\u0437-\u0437\u0430 \u0442\u043e\u0433\u043e, \u0447\u0442\u043e \u043c\u044b \u0440\u0430\u0441\u0441\u043c\u0430\u0442\u0440\u0438\u0432\u0430\u0435\u043c \u0441\u0443\u043c\u043c\u0443 \u043f\u044f\u0442\u0438 \u0441\u0438\u043d\u0443\u0441\u043e\u0432, \u0442\u043e \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u043d\u0430\u0448\u0435\u0439 \u043c\u043e\u0434\u0435\u043b\u0438 \u043d\u0430\u043f\u0440\u0430\u0448\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u0441\u0430\u043c\u043e:<\/p>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u043d\u0443\u0436\u043d\u043e \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043d\u0430\u0448\u0438 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u0442\u0430\u043a, \u0447\u0442\u043e\u0431\u044b \u0438\u0445 \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u043e\u0441\u044c \u0432\u0435\u0440\u043d\u043e \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c (\u0431\u043e\u043b\u044c\u0448\u0438\u043d\u0441\u0442\u0432\u043e \u043c\u043e\u0434\u0435\u043b\u0435\u0439 \u043f\u043b\u043e\u0445\u043e \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0438\u0440\u0443\u044e\u0442 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\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 \u0441\u043e \u0441\u043b\u0443\u0447\u0430\u0439\u043d\u043e \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u0439 \u0447\u0430\u0441\u0442\u043e\u0442\u043e\u0439).<\/p>\n<ol>\n<li>\n<p>\u041f\u0430\u0440\u0430\u043c\u0435\u0442\u0440   \u0431\u0443\u0434\u0435\u043c \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435\u043c \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043d\u043e\u0433\u043e \u043e\u0442\u043a\u043b\u043e\u043d\u0435\u043d\u0438\u044f \u0432\u0441\u0435\u0439 \u0432\u044b\u0431\u043e\u0440\u043a\u0438 ().<\/p>\n<\/li>\n<li>\n<p>\u041f\u0430\u0440\u0430\u043c\u0435\u0442\u0440  (\u0441\u0430\u043c\u044b\u0439 \u0432\u0430\u0436\u043d\u044b\u0439)  \u0431\u0443\u0434\u0435\u043c \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u043d\u043e\u0439 \u0447\u0430\u0441\u0442\u043e\u0442\u043e\u0439 (\u0443\u043c\u043d\u043e\u0436\u0435\u043d\u043d\u043e\u0439 \u043d\u0430 ) \u0434\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u0441\u0438\u043d\u0443\u0441\u0430 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0435\u043d\u043d\u043e (). \u042d\u0442\u043e \u043d\u0443\u0436\u043d\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c, \u0447\u0442\u043e\u0431\u044b \u043c\u043e\u0434\u0435\u043b\u044c \u043d\u0435 \u043f\u043e\u0434\u0431\u0438\u0440\u0430\u043b\u0430 \u0447\u0430\u0441\u0442\u043e\u0442\u0443 \u0432\u043e\u043b\u043d\u044b, \u0432 \u043f\u0440\u043e\u0442\u0438\u0432\u043d\u043e\u043c \u0441\u043b\u0443\u0447\u0430\u0435 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u043d\u0435 \u0431\u0443\u0434\u0443\u0442 \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u043d\u044b.<\/p>\n<\/li>\n<li>\n<p>\u041f\u0430\u0440\u0430\u043c\u0435\u0442\u0440 \u0441\u0434\u0432\u0438\u0433\u0430 \u043f\u043e \u0430\u0431\u0441\u0446\u0438\u0441\u0441\u0435 \u043c\u044b \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0438\u0440\u0443\u0435\u043c <\/p>\n<\/li>\n<li>\n<p>\u041f\u0430\u0440\u0430\u043c\u0435\u0442\u0440  \u043c\u044b \u0438\u043d\u0438\u0446\u0438\u0430\u043b\u0438\u0437\u0438\u0440\u0443\u0435\u043c \u043c\u0430\u0442\u0435\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u043c \u043e\u0436\u0438\u0434\u0430\u043d\u0438\u0435\u043c \u0432\u044b\u0431\u043e\u0440\u043a\u0438 ()<\/p>\n<\/li>\n<\/ol>\n<pre><code class=\"python\"># \u041d\u0430\u0447\u0430\u043b\u044c\u043d\u044b\u0435 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b init_params: np.ndarray = np.array( [ np.array([np.std(denoised_data), frequency[i] * 2 * np.pi, 0.0]) for i in range(number_of_sinuses) ] )  bias: float = np.mean(denoised_data) <\/code><\/pre>\n<p>\u041e\u043f\u0442\u0438\u043c\u0438\u0437\u0438\u0440\u0443\u0435\u043c \u043d\u0430\u0448\u0438 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u043f\u0443\u0442\u0435\u043c \u0433\u0440\u0430\u0434\u0438\u0435\u043d\u0442\u043d\u043e\u0433\u043e \u0441\u043f\u0443\u0441\u043a\u0430 \u0432 \u0441\u0432\u044f\u0437\u043a\u0435 \u0441 \u043e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0442\u043e\u0440\u043e\u043c Adam. \u0412 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u043e\u0448\u0438\u0431\u043a\u0438 \u043c\u043e\u0434\u0435\u043b\u0438 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c .<\/p>\n<hr\/>\n<p><strong>\u0424\u0443\u043d\u043a\u0446\u0438\u044f \u043e\u0448\u0438\u0431\u043a\u0438 (MSE), \u043a\u043e\u0442\u043e\u0440\u0443\u044e \u043d\u0430\u0448 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c \u0431\u0443\u0434\u0435\u0442 \u043f\u044b\u0442\u0430\u0442\u044c\u0441\u044f \u043c\u0438\u043d\u0438\u043c\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c<\/strong><\/p>\n<p> &#8212; \u0440\u0435\u0430\u043b\u044c\u043d\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0446\u0435\u043b\u0435\u0432\u043e\u0439 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439 (\u043c\u0435\u0442\u043a\u0430)<br \/>  &#8212; \u043f\u0440\u0435\u0434\u0441\u043a\u0430\u0437\u0430\u043d\u0438\u0435 \u043c\u043e\u0434\u0435\u043b\u0438<\/p>\n<p><strong>\u0413\u0440\u0430\u0434\u0438\u0435\u043d\u0442\u043d\u044b\u0439 \u0441\u043f\u0443\u0441\u043a<\/strong><br \/> \u0413\u0440\u0430\u0434\u0438\u0435\u043d\u0442\u043d\u044b\u0439 \u0441\u043f\u0443\u0441\u043a \u0437\u0430\u043a\u043b\u044e\u0447\u0430\u0435\u0442\u0441\u044f \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e \u043f\u043e \u043c\u0435\u0440\u0435 \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f \u043c\u043e\u0434\u0435\u043b\u0438 \u043c\u044b \u0432\u044b\u0447\u0438\u0442\u0430\u0435\u043c \u0438\u0437 \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u0432\u0435\u0441\u0430 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u0435\u0433\u043e \u043b\u043e\u043a\u0430\u043b\u044c\u043d\u043e\u0439 \u0447\u0430\u0441\u0442\u043d\u043e\u0439 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u043d\u043e\u0439 \u043e\u0442 \u0444\u0443\u043d\u043a\u0446\u0438\u0438 \u043e\u0448\u0438\u0431\u043a\u0438. \u0414\u0430\u043d\u043d\u044b\u0439 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c \u043f\u0440\u0438\u0432\u043e\u0434\u0438\u0442 \u043a \u0435\u0435 \u043c\u0438\u043d\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u0438, \u0442\u043e \u0435\u0441\u0442\u044c \u043a \u043d\u0430\u0438\u0431\u043e\u043b\u0435\u0435 \u0442\u043e\u0447\u043d\u044b\u043c \u043e\u0442\u0432\u0435\u0442\u0430\u043c \u043c\u043e\u0434\u0435\u043b\u0438. \u041e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435:<\/p>\n<p> &#8212; \u0444\u0443\u043d\u043a\u0446\u0438\u044f \u043e\u0448\u0438\u0431\u043a\u0438<br \/>  &#8212; \u0434\u0430\u043d\u043d\u044b\u0439 \u0432\u0435\u0441<br \/>  &#8212; \u043a\u043e\u044d\u0444\u0444\u0438\u0446\u0438\u0435\u043d\u0442 \u0441\u043a\u043e\u0440\u043e\u0441\u0442\u0438 \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f (\u0447\u0435\u043c \u0431\u043e\u043b\u044c\u0448\u0435, \u0442\u0435\u043c \u0430\u0433\u0440\u0435\u0441\u0441\u0438\u0432\u043d\u0435\u0435 \u043e\u0431\u0443\u0447\u0430\u0435\u0442\u0441\u044f \u043c\u043e\u0434\u0435\u043b\u044c, \u0447\u0430\u0441\u0442\u043e \u0432\u044b\u0431\u0438\u0440\u0430\u044e\u0442 )<\/p>\n<p><strong>\u041e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0442\u043e\u0440 Adam<\/strong> <em>(\u043d\u0435\u043e\u0431\u044f\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u043e \u0434\u043b\u044f \u043f\u0440\u043e\u0447\u0442\u0435\u043d\u0438\u044f)<\/em><br \/> \u0418\u0434\u0435\u044f Adam \u0437\u0430\u043a\u043b\u044e\u0447\u0430\u0435\u0442\u0441\u044f \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e\u0431\u044b \u0430\u0434\u0430\u043f\u0442\u0438\u0432\u043d\u043e \u0438\u0437\u043c\u0435\u043d\u044f\u0442\u044c \u0441\u043a\u043e\u0440\u043e\u0441\u0442\u044c \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f \u0434\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u0432\u0435\u0441\u0430 \u043d\u0430 \u043e\u0441\u043d\u043e\u0432\u0435 \u0434\u0432\u0443\u0445 \u043c\u043e\u043c\u0435\u043d\u0442\u043e\u0432 \u043f\u0435\u0440\u0432\u043e\u0433\u043e \u0438 \u0432\u0442\u043e\u0440\u043e\u0433\u043e \u043f\u043e\u0440\u044f\u0434\u043a\u043e\u0432 \u0433\u0440\u0430\u0434\u0438\u0435\u043d\u0442\u0430. \u0412\u0435\u0441\u0430 \u0441 \u0431\u043e\u043b\u044c\u0448\u0438\u043c \u0433\u0440\u0430\u0434\u0438\u0435\u043d\u0442\u043e\u043c \u043f\u043e\u043b\u0443\u0447\u0430\u044e\u0442 \u043c\u0435\u043d\u044c\u0448\u0438\u0439 \u0448\u0430\u0433, \u0430 \u0432\u0435\u0441\u0430 \u0441 \u043c\u0435\u043d\u044c\u0448\u0438\u043c \u0433\u0440\u0430\u0434\u0438\u0435\u043d\u0442\u043e\u043c \u043f\u043e\u043b\u0443\u0447\u0430\u044e\u0442 \u0431\u043e\u043b\u044c\u0448\u0438\u0439 \u0448\u0430\u0433.<\/p>\n<p>\u041e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0442\u043e\u0440 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u043f\u043e \u0434\u0430\u043d\u043d\u043e\u043c\u0443 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u0443:<\/p>\n<p>\u041e\u043f\u0442\u0438\u043c\u0438\u0437\u0430\u0446\u0438\u044f \u0432\u0435\u0441\u043e\u0432:<\/p>\n<p>\u0413\u0434\u0435:<br \/>  &#8212; \u043d\u043e\u043c\u0435\u0440 \u0438\u0442\u0435\u0440\u0430\u0446\u0438\u0438<br \/>  &#8212;<\/p>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\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-351319","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/351319","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=351319"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/351319\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=351319"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=351319"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=351319"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}