{"id":323369,"date":"2021-05-19T09:00:38","date_gmt":"2021-05-19T09:00:38","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=323369"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=323369","title":{"rendered":"Python, \u043a\u043e\u0440\u0440\u0435\u043b\u044f\u0446\u0438\u044f \u0438 \u0440\u0435\u0433\u0440\u0435\u0441\u0441\u0438\u044f: \u0447\u0430\u0441\u0442\u044c 4"},"content":{"rendered":"\n<div class=\"post__text post__text_v2\" id=\"post-content-body\">\n<p>\u041f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0438\u0439 \u043f\u043e\u0441\u0442 \u0441\u043c. <a href=\"https:\/\/habr.com\/ru\/post\/558146\/\" rel=\"noopener noreferrer nofollow\">\u0437\u0434\u0435\u0441\u044c<\/a>.<\/p>\n<h3>\u041f\u0440\u0435\u0434\u0441\u043a\u0430\u0437\u0430\u043d\u0438\u0435<\/h3>\n<p>\u0412 \u0437\u0430\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0438, \u043c\u044b \u043f\u043e\u0434\u0445\u043e\u0434\u0438\u043c \u043a \u043e\u0434\u043d\u043e\u043c\u0443 \u0438\u0437 \u043d\u0430\u0438\u0431\u043e\u043b\u0435\u0435 \u0432\u0430\u0436\u043d\u044b\u0445 \u043f\u0440\u0438\u043c\u0435\u043d\u0435\u043d\u0438\u0439 \u043b\u0438\u043d\u0435\u0439\u043d\u043e\u0439 \u0440\u0435\u0433\u0440\u0435\u0441\u0441\u0438\u0438: <em>\u043f\u0440\u0435\u0434\u0441\u043a\u0430\u0437\u0430\u043d\u0438\u044e<\/em>. \u041c\u044b \u043d\u0430\u0442\u0440\u0435\u043d\u0438\u0440\u043e\u0432\u0430\u043b\u0438 \u043c\u043e\u0434\u0435\u043b\u044c \u0441\u043f\u043e\u0441\u043e\u0431\u043d\u0443\u044e \u043f\u0440\u0435\u0434\u0441\u043a\u0430\u0437\u044b\u0432\u0430\u0442\u044c \u0432\u0435\u0441 \u043e\u043b\u0438\u043c\u043f\u0438\u0439\u0441\u043a\u0438\u0445 \u043f\u043b\u043e\u0432\u0446\u043e\u0432 \u043f\u0440\u0438 \u043d\u0430\u043b\u0438\u0447\u0438\u0438 \u0434\u0430\u043d\u043d\u044b\u0445 \u043e\u0431 \u0438\u0445 \u0440\u043e\u0441\u0442\u0435, \u043f\u043e\u043b\u043e\u0432\u043e\u0439 \u043f\u0440\u0438\u043d\u0430\u0434\u043b\u0435\u0436\u043d\u043e\u0441\u0442\u0438 \u0438 \u0433\u043e\u0434\u0435 \u0440\u043e\u0436\u0434\u0435\u043d\u0438\u044f.<\/p>\n<p>9-\u043a\u0440\u0430\u0442\u043d\u044b\u0439 \u043e\u043b\u0438\u043c\u043f\u0438\u0439\u0441\u043a\u0438\u0439 \u0447\u0435\u043c\u043f\u0438\u043e\u043d \u043f\u043e \u043f\u043b\u0430\u0432\u0430\u043d\u0438\u044e \u041c\u0430\u0440\u043a \u0428\u043f\u0438\u0442\u0446 \u0437\u0430\u0432\u043e\u0435\u0432\u0430\u043b 7 \u0437\u043e\u043b\u043e\u0442\u044b\u0445 \u043c\u0435\u0434\u0430\u043b\u0435\u0439 \u043d\u0430 \u041e\u043b\u0438\u043c\u043f\u0438\u0439\u0441\u043a\u0438\u0445 \u0438\u0433\u0440\u0430\u0445 1972 \u0433. \u041e\u043d \u0440\u043e\u0434\u0438\u043b\u0441\u044f \u0432 1950 \u0433. \u0438, \u0441\u043e\u0433\u043b\u0430\u0441\u043d\u043e \u0432\u0435\u0431-\u0441\u0442\u0440\u0430\u043d\u0438\u0446\u044b \u0412\u0438\u043a\u0438\u043f\u0435\u0434\u0438\u0438, \u0438\u043c\u0435\u0435\u0442 \u0440\u043e\u0441\u0442 183 \u0441\u043c. \u0438 \u0432\u0435\u0441 73 \u043a\u0433. \u041f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u043c, \u0447\u0442\u043e \u043d\u0430\u0448\u0430 \u043c\u043e\u0434\u0435\u043b\u044c \u043f\u0440\u0435\u0434\u0441\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442 \u0432 \u043e\u0442\u043d\u043e\u0448\u0435\u043d\u0438\u0438 \u0435\u0433\u043e \u0432\u0435\u0441\u0430.<\/p>\n<p>\u041d\u0430\u0448\u0430 \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u0430\u044f \u0440\u0435\u0433\u0440\u0435\u0441\u0441\u0438\u043e\u043d\u043d\u0430\u044f \u043c\u043e\u0434\u0435\u043b\u044c \u0442\u0440\u0435\u0431\u0443\u0435\u0442 \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u044d\u0442\u0438 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0432 \u043c\u0430\u0442\u0440\u0438\u0447\u043d\u043e\u0439 \u0444\u043e\u0440\u043c\u0435. \u041a\u0430\u0436\u0434\u044b\u0439 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440 \u043d\u0443\u0436\u043d\u043e \u043f\u0435\u0440\u0435\u0434\u0430\u0442\u044c \u0432 \u0442\u043e\u043c \u043f\u043e\u0440\u044f\u0434\u043a\u0435, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u043c\u043e\u0434\u0435\u043b\u044c \u0443\u0441\u0432\u043e\u0438\u043b\u0430 \u043f\u0440\u0438\u0437\u043d\u0430\u043a\u0438, \u0447\u0442\u043e\u0431\u044b \u043f\u0440\u0438\u043c\u0435\u043d\u0438\u0442\u044c \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u044b\u0439 \u043a\u043e\u044d\u0444\u0444\u0438\u0446\u0438\u0435\u043d\u0442. \u041f\u043e\u0441\u043b\u0435 \u0441\u043c\u0435\u0449\u0435\u043d\u0438\u044f \u0432\u0435\u043a\u0442\u043e\u0440 \u043f\u0440\u0438\u0437\u043d\u0430\u043a\u043e\u0432 \u0434\u043e\u043b\u0436\u0435\u043d \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0442\u044c \u0440\u043e\u0441\u0442, \u043f\u043e\u043b \u0438 \u0433\u043e\u0434 \u0440\u043e\u0436\u0434\u0435\u043d\u0438\u044f \u0432 \u0442\u0435\u0445 \u0436\u0435 \u0435\u0434\u0438\u043d\u0438\u0446\u0430\u0445 \u0438\u0437\u043c\u0435\u0440\u0435\u043d\u0438\u044f, \u0432 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u043c\u043e\u0434\u0435\u043b\u044c \u0431\u044b\u043b\u0430 \u043d\u0430\u0442\u0440\u0435\u043d\u0438\u0440\u043e\u0432\u0430\u043d\u0430:<\/p>\n<figure class=\"\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/6bf\/719\/73d\/6bf71973db655d9a4c1999a016d5530a.png\" width=\"125\" height=\"74\"><figcaption><\/figcaption><\/figure>\n<p>\u041c\u0430\u0442\u0440\u0438\u0446\u0430 <em>\u03b2&nbsp;<\/em>\u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u043a\u043e\u044d\u0444\u0444\u0438\u0446\u0438\u0435\u043d\u0442\u044b \u0434\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u0438\u0437 \u044d\u0442\u0438\u0445 \u043f\u0440\u0438\u0437\u043d\u0430\u043a\u043e\u0432:<\/p>\n<figure class=\"\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/330\/c04\/2a4\/330c042a4c024de1b9bbe2b4250d79c5.png\" width=\"106\" height=\"76\"><figcaption><\/figcaption><\/figure>\n<p>\u041f\u0440\u0435\u0434\u0441\u043a\u0430\u0437\u0430\u043d\u0438\u0435\u043c \u043c\u043e\u0434\u0435\u043b\u0438 \u0431\u0443\u0434\u0435\u0442 \u0441\u0443\u043c\u043c\u0430 \u043f\u0440\u043e\u0438\u0437\u0432\u0435\u0434\u0435\u043d\u0438\u0439 \u043a\u043e\u044d\u0444\u0444\u0438\u0446\u0438\u0435\u043d\u0442\u043e\u0432 <em>\u03b2<\/em>&nbsp;\u0438 \u043f\u0440\u0438\u0437\u043d\u0430\u043a\u043e\u0432 <em>x<\/em>&nbsp;\u0432 \u043a\u0430\u0436\u0434\u043e\u0439 \u0441\u0442\u0440\u043e\u043a\u0435:<\/p>\n<figure class=\"\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/b9f\/088\/951\/b9f088951e2498b6dc9ab44dcf4476cb.png\" width=\"88\" height=\"58\"><figcaption><\/figcaption><\/figure>\n<p>\u041f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u043c\u0430\u0442\u0440\u0438\u0447\u043d\u043e\u0435 \u0443\u043c\u043d\u043e\u0436\u0435\u043d\u0438\u0435 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442 \u043a\u0430\u0436\u0434\u044b\u0439 \u044d\u043b\u0435\u043c\u0435\u043d\u0442 \u0432 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0435 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0435\u0433\u043e \u0441\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u043f\u0440\u043e\u0438\u0437\u0432\u0435\u0434\u0435\u043d\u0438\u0439 \u0441\u0442\u0440\u043e\u043a \u0438 \u0441\u0442\u043e\u043b\u0431\u0446\u043e\u0432 \u043a\u0430\u0436\u0434\u043e\u0439 \u043c\u0430\u0442\u0440\u0438\u0446\u044b, \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u0435 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0430 \u043f\u043e\u043f\u0440\u043e\u0441\u0442\u0443 \u0441\u0432\u043e\u0434\u0438\u0442\u0441\u044f \u043a \u043f\u0435\u0440\u0435\u043c\u043d\u043e\u0436\u0435\u043d\u0438\u044e \u0442\u0440\u0430\u043d\u0441\u043f\u043e\u043d\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u0439 \u043c\u0430\u0442\u0440\u0438\u0446\u044b <em>\u03b2&nbsp;<\/em>\u0441 \u0432\u0435\u043a\u0442\u043e\u0440\u043e\u043c <em>xspitz<\/em>.<\/p>\n<p>\u041d\u0430\u043f\u043e\u043c\u043d\u0438\u043c, \u0447\u0442\u043e \u0440\u0430\u0437\u043c\u0435\u0440\u043d\u043e\u0441\u0442\u044c \u0438\u0442\u043e\u0433\u043e\u0432\u043e\u0439 \u043c\u0430\u0442\u0440\u0438\u0446\u044b \u0431\u0443\u0434\u0435\u0442 \u0447\u0438\u0441\u043b\u043e\u043c \u0441\u0442\u0440\u043e\u043a \u0438\u0437 \u043f\u0435\u0440\u0432\u043e\u0439 \u043c\u0430\u0442\u0440\u0438\u0446\u044b \u0438 \u0447\u0438\u0441\u043b\u043e\u043c \u0441\u0442\u043e\u043b\u0431\u0446\u043e\u0432 \u0438\u0437 \u0432\u0442\u043e\u0440\u043e\u0439 \u043c\u0430\u0442\u0440\u0438\u0446\u044b:<\/p>\n<figure class=\"\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/f55\/07a\/619\/f5507a619372a2292016df611009778f.png\" width=\"74\" height=\"31\"><figcaption><\/figcaption><\/figure>\n<p>\u0417\u0434\u0435\u0441\u044c <em>\u03b2<\/em><sup>T<\/sup><em>x<\/em>&nbsp;\u2014 \u044d\u0442\u043e \u043f\u0440\u043e\u0438\u0437\u0432\u0435\u0434\u0435\u043d\u0438\u0435 \u043c\u0430\u0442\u0440\u0438\u0446\u044b \u0440\u0430\u0437\u043c\u0435\u0440\u0430 1 \u00d7 <em>n<\/em>&nbsp;\u0438 \u043c\u0430\u0442\u0440\u0438\u0446\u044b \u0440\u0430\u0437\u043c\u0435\u0440\u0430 <em>n<\/em> \u00d7 1. \u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u043e\u043c \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043c\u0430\u0442\u0440\u0438\u0446\u0430 \u0440\u0430\u0437\u043c\u0435\u0440\u0430 1 \u00d7 1:<\/p>\n<p>&nbsp;<\/p>\n<figure class=\"\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/d1f\/7ad\/8d0\/d1f7ad8d034752b7785e82f1035fc9a1.png\" width=\"219\" height=\"198\"><figcaption><\/figcaption><\/figure>\n<p>\u0418\u0441\u0445\u043e\u0434\u043d\u044b\u0439 \u043a\u043e\u0434 \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u0439 \u043e\u0447\u0435\u043d\u044c \u043f\u0440\u043e\u0441\u0442:<\/p>\n<pre><code class=\"python\">def predict(coefs, x):      '''\u0444\u0443\u043d\u043a\u0446\u0438\u044f \u043f\u0440\u0435\u0434\u0441\u043a\u0430\u0437\u0430\u043d\u0438\u044f'''     return np.matmul(coefs, x.values) <\/code><\/pre>\n<pre><code class=\"python\">def ex_3_29():     '''\u0412\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u0435 \u043e\u0436\u0438\u0434\u0430\u0435\u043c\u043e\u0433\u043e \u0432\u0435\u0441\u0430 \u0441\u043f\u043e\u0440\u0442\u0441\u043c\u0435\u043d\u0430'''     df = swimmer_data()     df['\u0431\u0438\u043d_\u041f\u043e\u043b'] = df['\u041f\u043e\u043b'].map({'\u041c': 1, '\u0416': 0}).astype(int)      df['\u0413\u043e\u0434 \u0440\u043e\u0436\u0434\u0435\u043d\u0438\u044f'] = df['\u0414\u0430\u0442\u0430 \u0440\u043e\u0436\u0434\u0435\u043d\u0438\u044f'].map(str_to_year)     X = df[['\u0420\u043e\u0441\u0442, \u0441\u043c', '\u0431\u0438\u043d_\u041f\u043e\u043b', '\u0413\u043e\u0434 \u0440\u043e\u0436\u0434\u0435\u043d\u0438\u044f']]      X.insert(0, '\u043a\u043e\u043d\u0441\u0442\u0430\u043d\u0442\u0430', 1.0)     y = df['\u0412\u0435\u0441'].apply(np.log)      beta = linear_model(X, y)     xspitz = pd.Series([1.0, 183, 1, 1950]) # \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u041c\u0430\u0440\u043a\u0430 \u0428\u043f\u0438\u0442\u0446\u0430     return np.exp( predict(beta, xspitz) )  <\/code><\/pre>\n<pre><code>84.20713139038605<\/code><\/pre>\n<p>\u042d\u0442\u043e\u0442 \u043f\u0440\u0438\u043c\u0435\u0440 \u0432\u0435\u0440\u043d\u0435\u0442 \u0447\u0438\u0441\u043b\u043e 84.21, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u0435\u0442 \u043e\u0436\u0438\u0434\u0430\u0435\u043c\u043e\u043c\u0443 \u0432\u0435\u0441\u0443 84.21 \u043a\u0433. \u042d\u0442\u043e \u043d\u0430\u043c\u043d\u043e\u0433\u043e \u0442\u044f\u0436\u0435\u043b\u0435\u0435 \u0437\u0430\u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u0433\u043e \u0432\u0435\u0441\u0430 \u041c\u0430\u0440\u043a\u0430 \u0428\u043f\u0438\u0442\u0446\u0430 73 \u043a\u0433. \u041d\u0430\u0448\u0430 \u043c\u043e\u0434\u0435\u043b\u044c, \u043f\u043e\u0445\u043e\u0436\u0435, \u043d\u0435 \u0441\u0440\u0430\u0431\u043e\u0442\u0430\u043b\u0430 \u043a\u0430\u043a \u043d\u0430\u0434\u043e.<\/p>\n<h2>\u0418\u043d\u0442\u0435\u0440\u0432\u0430\u043b \u0443\u0432\u0435\u0440\u0435\u043d\u043d\u043e\u0441\u0442\u0438 \u0434\u043b\u044f \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u043e\u0433\u043e \u043f\u0440\u0435\u0434\u0441\u043a\u0430\u0437\u0430\u043d\u0438\u044f<\/h2>\n<p>\u0420\u0430\u043d\u0435\u0435 \u043c\u044b \u0440\u0430\u0441\u0441\u0447\u0438\u0442\u0430\u043b\u0438 \u0438\u043d\u0442\u0435\u0440\u0432\u0430\u043b\u044b \u0443\u0432\u0435\u0440\u0435\u043d\u043d\u043e\u0441\u0442\u0438 \u0434\u043b\u044f \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432 \u043f\u043e\u043f\u0443\u043b\u044f\u0446\u0438\u0438. \u041c\u044b \u043c\u043e\u0436\u0435\u043c \u0442\u0430\u043a\u0436\u0435 \u043f\u043e\u0441\u0442\u0440\u043e\u0438\u0442\u044c \u0438\u043d\u0442\u0435\u0440\u0432\u0430\u043b \u0443\u0432\u0435\u0440\u0435\u043d\u043d\u043e\u0441\u0442\u0438 \u0434\u043b\u044f \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e \u0432\u0437\u044f\u0442\u043e\u0433\u043e \u043f\u0440\u0435\u0434\u0441\u043a\u0430\u0437\u0430\u043d\u0438\u044f, \u0438\u043c\u0435\u043d\u0443\u0435\u043c\u044b\u0439 <em>\u0438\u043d\u0442\u0435\u0440\u0432\u0430\u043b\u043e\u043c \u043f\u0440\u0435\u0434\u0441\u043a\u0430\u0437\u0430\u043d\u0438\u044f<\/em>, \u0438\u043b\u0438 \u0438\u043d\u0442\u0435\u0440\u0432\u0430\u043b\u043e\u043c \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0439 \u043f\u0440\u0435\u0434\u0441\u043a\u0430\u0437\u0430\u043d\u043d\u043e\u0439 \u0432\u0435\u043b\u0438\u0447\u0438\u043d\u044b. \u0418\u043d\u0442\u0435\u0440\u0432\u0430\u043b \u043f\u0440\u0435\u0434\u0441\u043a\u0430\u0437\u0430\u043d\u0438\u044f \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u0442 \u0440\u0430\u0437\u043c\u0435\u0440 \u043d\u0435\u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u043e\u0441\u0442\u0438 \u0432 \u043f\u0440\u0435\u0434\u0441\u043a\u0430\u0437\u0430\u043d\u0438\u0438, \u043f\u0440\u0435\u0434\u043b\u0430\u0433\u0430\u044f \u043c\u0438\u043d\u0438\u043c\u0430\u043b\u044c\u043d\u043e\u0435 \u0438 \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435, \u043c\u0435\u0436\u0434\u0443 \u043a\u043e\u0442\u043e\u0440\u044b\u043c\u0438 \u0438\u0441\u0442\u0438\u043d\u043d\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u043e\u0436\u0438\u0434\u0430\u0435\u043c\u043e \u043f\u043e\u043f\u0430\u0434\u0430\u0435\u0442 \u0441 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u043e\u0439 \u0432\u0435\u0440\u043e\u044f\u0442\u043d\u043e\u0441\u0442\u044c\u044e. \u0418\u043d\u0442\u0435\u0440\u0432\u0430\u043b \u043f\u0440\u0435\u0434\u0441\u043a\u0430\u0437\u0430\u043d\u0438\u044f \u0434\u043b\u044f <em>y\u0302<\/em>&nbsp;\u0448\u0438\u0440\u0435 \u0438\u043d\u0442\u0435\u0440\u0432\u0430\u043b\u0430 \u0443\u0432\u0435\u0440\u0435\u043d\u043d\u043e\u0441\u0442\u0438 \u0434\u043b\u044f \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430 \u043f\u043e\u043f\u0443\u043b\u044f\u0446\u0438\u0438, \u0442\u0430\u043a\u043e\u0433\u043e \u043a\u0430\u043a \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0441\u0440\u0435\u0434\u043d\u0435\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 <em>\u03bc<\/em>. \u042d\u0442\u043e \u043e\u0431\u044a\u044f\u0441\u043d\u044f\u0435\u0442\u0441\u044f \u0442\u0435\u043c, \u0447\u0442\u043e \u0432 \u0438\u043d\u0442\u0435\u0440\u0432\u0430\u043b\u0435 \u0443\u0432\u0435\u0440\u0435\u043d\u043d\u043e\u0441\u0442\u0438 \u0443\u0447\u0438\u0442\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u0442\u043e\u043b\u044c\u043a\u043e \u043d\u0435\u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u043e\u0441\u0442\u044c \u043f\u0440\u0438 \u043e\u0446\u0435\u043d\u043a\u0435 \u0441\u0440\u0435\u0434\u043d\u0435\u0433\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f, \u0432 \u0442\u043e \u0432\u0440\u0435\u043c\u044f \u043a\u0430\u043a \u0438\u043d\u0442\u0435\u0440\u0432\u0430\u043b \u043f\u0440\u0435\u0434\u0441\u043a\u0430\u0437\u0430\u043d\u0438\u044f \u0442\u0430\u043a\u0436\u0435 \u0434\u043e\u043b\u0436\u0435\u043d \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u0442\u044c \u0432 \u0440\u0430\u0441\u0447\u0435\u0442 \u0434\u0438\u0441\u043f\u0435\u0440\u0441\u0438\u044e \u0432 <em>y<sup>&nbsp;<\/sup><\/em><sup>\u043e\u0442 \u0441\u0440\u0435\u0434\u043d\u0435\u0433\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f.<\/sup><\/p>\n<p><sup>\u041b\u0438\u043d\u0438\u0438 \u0438\u043d\u0442\u0435\u0440\u0432\u0430\u043b\u0430 \u043f\u0440\u0435\u0434\u0441\u043a\u0430\u0437\u0430\u043d\u0438\u044f \u043d\u0430\u0445\u043e\u0434\u044f\u0442\u0441\u044f \u0434\u0430\u043b\u044c\u0448\u0435 \u043e\u0442 \u043e\u043f\u0442\u0438\u043c\u0430\u043b\u044c\u043d\u043e \u043f\u043e\u0434\u043e\u0433\u043d\u0430\u043d\u043d\u043e\u0439 \u043b\u0438\u043d\u0438\u0438, \u0447\u0435\u043c \u043b\u0438\u043d\u0438\u0438 \u0438\u043d\u0442\u0435\u0440\u0432\u0430\u043b\u0430 \u0443\u0432\u0435\u0440\u0435\u043d\u043d\u043e\u0441\u0442\u0438, \u0438 \u0442\u0435\u043c \u0434\u0430\u043b\u044c\u0448\u0435, \u0447\u0435\u043c \u0431\u043e\u043b\u044c\u0448\u0435 \u0438\u043c\u0435\u0435\u0442\u0441\u044f \u0442\u043e\u0447\u0435\u043a \u0434\u0430\u043d\u043d\u044b\u0445. 95%-\u044b\u0439 \u0438\u043d\u0442\u0435\u0440\u0432\u0430\u043b \u043f\u0440\u0435\u0434\u0441\u043a\u0430\u0437\u0430\u043d\u0438\u044f \u2013 \u044d\u0442\u043e \u043f\u043b\u043e\u0449\u0430\u0434\u044c, \u0432 \u043a\u043e\u0442\u043e\u0440\u0443\u044e \u043e\u0436\u0438\u0434\u0430\u0435\u043c\u043e \u043f\u043e\u043f\u0430\u0434\u0430\u044e\u0442 95% \u0432\u0441\u0435\u0445 \u0442\u043e\u0447\u0435\u043a \u0434\u0430\u043d\u043d\u044b\u0445. \u0412 \u043e\u0442\u043b\u0438\u0447\u0438\u0435 \u043e\u0442 \u043d\u0435\u0433\u043e, 95%-\u0439 \u0438\u043d\u0442\u0435\u0440\u0432\u0430\u043b \u0443\u0432\u0435\u0440\u0435\u043d\u043d\u043e\u0441\u0442\u0438 \u2013 \u044d\u0442\u043e \u043f\u043b\u043e\u0449\u0430\u0434\u044c, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0441 95%-\u0439 \u0432\u0435\u0440\u043e\u044f\u0442\u043d\u043e\u0441\u0442\u044c\u044e \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u0438\u0441\u0442\u0438\u043d\u043d\u0443\u044e \u043b\u0438\u043d\u0438\u044e \u0440\u0435\u0433\u0440\u0435\u0441\u0441\u0438\u0438.<\/sup><\/p>\n<figure class=\"\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/b12\/53a\/dd4\/b1253add4f8ddfb44a132c84344bbd33.png\" width=\"360\" height=\"295\"><figcaption><\/figcaption><\/figure>\n<p>\u041f\u0440\u0438\u0432\u0435\u0434\u0435\u043d\u043d\u044b\u0439 \u0432\u044b\u0448\u0435 \u0433\u0440\u0430\u0444\u0438\u043a \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442 \u0441\u0432\u044f\u0437\u044c \u043c\u0435\u0436\u0434\u0443 \u0432\u043d\u0435\u0448\u043d\u0438\u043c \u0438\u043d\u0442\u0435\u0440\u0432\u0430\u043b\u043e\u043c \u043f\u0440\u0435\u0434\u0441\u043a\u0430\u0437\u0430\u043d\u0438\u044f \u0438 \u0432\u043d\u0443\u0442\u0440\u0435\u043d\u043d\u0438\u043c \u0438\u043d\u0442\u0435\u0440\u0432\u0430\u043b\u043e\u043c \u0443\u0432\u0435\u0440\u0435\u043d\u043d\u043e\u0441\u0442\u0438. \u041c\u044b \u043c\u043e\u0436\u0435\u043c \u0432\u044b\u0447\u0438\u0441\u043b\u0438\u0442\u044c \u0438\u043d\u0442\u0435\u0440\u0432\u0430\u043b \u043f\u0440\u0435\u0434\u0441\u043a\u0430\u0437\u0430\u043d\u0438\u044f, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0443\u044e \u043d\u0438\u0436\u0435 \u0444\u043e\u0440\u043c\u0443\u043b\u0443:<\/p>\n<figure class=\"\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/bc8\/f2d\/0fe\/bc8f2d0fe9cfcd85c4af0c11790bbf03.png\" width=\"270\" height=\"50\"><figcaption><\/figcaption><\/figure>\n<p>\u0417\u0434\u0435\u0441\u044c <em>y\u0302<sub>p<\/sub><\/em>&nbsp;\u2014 \u044d\u0442\u043e \u043f\u0440\u0435\u0434\u0441\u043a\u0430\u0437\u0430\u043d\u0438\u0435, \u043f\u043b\u044e\u0441 \u0438\u043b\u0438 \u043c\u0438\u043d\u0443\u0441 \u0438\u043d\u0442\u0435\u0440\u0432\u0430\u043b. \u041c\u044b \u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u0441\u044f <em>t<\/em>-\u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435\u043c, \u0433\u0434\u0435 \u0441\u0442\u0435\u043f\u0435\u043d\u044c \u0441\u0432\u043e\u0431\u043e\u0434\u044b \u0440\u0430\u0432\u043d\u0430 <em>n<\/em> &#8212; <em>p<\/em>, \u0442.\u0435. \u0440\u0430\u0437\u043c\u0435\u0440 \u0432\u044b\u0431\u043e\u0440\u043a\u0438 \u043c\u0438\u043d\u0443\u0441 \u0447\u0438\u0441\u043b\u043e \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432. \u042d\u0442\u043e \u0442\u0430 \u0436\u0435 \u0441\u0430\u043c\u0430\u044f \u0444\u043e\u0440\u043c\u0443\u043b\u0430, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0440\u0430\u043d\u0435\u0435 \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u043b\u0430\u0441\u044c \u043f\u0440\u0438 \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u0438 <em>F<\/em>-\u0442\u0435\u0441\u0442\u043e\u0432. \u0425\u043e\u0442\u044f \u0443\u043a\u0430\u0437\u0430\u043d\u043d\u0430\u044f \u0444\u043e\u0440\u043c\u0443\u043b\u0430, \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e, \u043f\u0443\u0433\u0430\u0435\u0442 \u0441\u0432\u043e\u0435\u0439 \u0441\u043b\u043e\u0436\u043d\u043e\u0441\u0442\u044c\u044e, \u043e\u043d\u0430 \u043e\u0442\u043d\u043e\u0441\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u043f\u0440\u044f\u043c\u043e\u043b\u0438\u043d\u0435\u0439\u043d\u043e \u0442\u0440\u0430\u043d\u0441\u043b\u0438\u0440\u0443\u0435\u0442\u0441\u044f \u0432 \u0438\u0441\u0445\u043e\u0434\u043d\u044b\u0439 \u043a\u043e\u0434, \u043f\u043e\u043a\u0430\u0437\u0430\u043d\u043d\u044b\u0439 \u0432 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u043c \u043d\u0438\u0436\u0435 \u043f\u0440\u0438\u043c\u0435\u0440\u0435, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0432\u044b\u0447\u0438\u0441\u043b\u044f\u0435\u0442 95%-\u044b\u0439 \u0438\u043d\u0442\u0435\u0440\u0432\u0430\u043b \u043f\u0440\u0435\u0434\u0441\u043a\u0430\u0437\u0430\u043d\u0438\u044f.<\/p>\n<pre><code class=\"python\">def prediction_interval(x, y, xp):     '''\u0412\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u0435 \u0438\u043d\u0442\u0435\u0440\u0432\u0430\u043b\u0430 \u043f\u0440\u0435\u0434\u0441\u043a\u0430\u0437\u0430\u043d\u0438\u044f'''     xtx    = np.matmul(x.T, np.asarray(x))     xtxi   = np.linalg.inv(xtx)       xty    = np.matmul(x.T, np.asarray(y))      coefs  = linear_model(x, y)      fitted = np.matmul(x, coefs)     resid  = y - fitted     rss    = resid.dot(resid)       n      = y.shape[0]  # \u0441\u0442\u0440\u043e\u043a\u0438     p      = x.shape[1]  # \u0441\u0442\u043e\u043b\u0431\u0446\u044b     dfe    = n - p      mse    = rss \/ dfe     se_y   = np.matmul(np.matmul(xp.T, xtxi), xp)     t_stat = np.sqrt(mse * (1 + se_y))         # t-\u0441\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u043a\u0430     intl   = stats.t.ppf(0.975, dfe) * t_stat        yp     = np.matmul(coefs.T, xp)     return np.array([yp - intl, yp + intl])<\/code><\/pre>\n<p>\u041f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 <em>t<\/em>-\u0441\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u043a\u0430 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0438\u0437\u0443\u0435\u0442\u0441\u044f \u0441\u0442\u0435\u043f\u0435\u043d\u044c\u044e \u0441\u0432\u043e\u0431\u043e\u0434\u044b \u043e\u0448\u0438\u0431\u043a\u0438, \u043e\u043d\u0430 \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u0435\u0442 \u0432 \u0440\u0430\u0441\u0447\u0435\u0442 \u043f\u0440\u0438\u0441\u0443\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0443\u044e \u0432 \u043c\u043e\u0434\u0435\u043b\u0438 \u043d\u0435\u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u043e\u0441\u0442\u044c.<\/p>\n<p>\u0415\u0441\u043b\u0438 \u0432\u043c\u0435\u0441\u0442\u043e \u0438\u043d\u0442\u0435\u0440\u0432\u0430\u043b\u0430 \u043f\u0440\u0435\u0434\u0441\u043a\u0430\u0437\u0430\u043d\u0438\u044f \u043f\u043e\u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u0440\u0430\u0441\u0441\u0447\u0438\u0442\u0430\u0442\u044c \u0438\u043d\u0442\u0435\u0440\u0432\u0430\u043b \u0443\u0432\u0435\u0440\u0435\u043d\u043d\u043e\u0441\u0442\u0438 \u0434\u043b\u044f \u0441\u0440\u0435\u0434\u043d\u0435\u0433\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f, \u043c\u044b \u043f\u043e\u043f\u0440\u043e\u0441\u0442\u0443 \u043c\u043e\u0436\u0435\u043c \u043e\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u043f\u0440\u0438\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u0435\u0434\u0438\u043d\u0438\u0446\u044b \u043a <code>se_y<\/code> \u043f\u0440\u0438 \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u0438 <em>t<\/em>-\u0441\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u043a\u0438 <code>t_stat<\/code>.<\/p>\n<p>\u041f\u0440\u0438\u0432\u0435\u0434\u0435\u043d\u043d\u044b\u0439 \u0432\u044b\u0448\u0435 \u0438\u0441\u0445\u043e\u0434\u043d\u044b\u0439 \u043a\u043e\u0434 \u043c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0434\u043b\u044f \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0433\u043e \u043d\u0438\u0436\u0435 \u0433\u0440\u0430\u0444\u0438\u043a\u0430, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442, \u043a\u0430\u043a \u0438\u043d\u0442\u0435\u0440\u0432\u0430\u043b \u043f\u0440\u0435\u0434\u0441\u043a\u0430\u0437\u0430\u043d\u0438\u044f \u0438\u0437\u043c\u0435\u043d\u044f\u0435\u0442\u0441\u044f \u0432\u043c\u0435\u0441\u0442\u0435 \u0441\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435\u043c \u043d\u0435\u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0439 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439:<\/p>\n<figure class=\"\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/54c\/1a3\/d59\/54c1a3d59d18bb31e759f78fe6bbaa1e.png\" width=\"360\" height=\"295\"><figcaption><\/figcaption><\/figure>\n<p>\u0412 \u043f\u0440\u0438\u0432\u0435\u0434\u0435\u043d\u043d\u043e\u043c \u0432\u044b\u0448\u0435 \u0433\u0440\u0430\u0444\u0438\u043a\u0435 \u043c\u043e\u0434\u0435\u043b\u044c \u0442\u0440\u0435\u043d\u0438\u0440\u0443\u0435\u0442\u0441\u044f \u043d\u0430 \u0432\u044b\u0431\u043e\u0440\u043a\u0435 \u0438\u0437 5 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432 \u0438 \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442, \u043a\u0430\u043a 95%-\u0439 \u0438\u043d\u0442\u0435\u0440\u0432\u0430\u043b \u043f\u0440\u0435\u0434\u0441\u043a\u0430\u0437\u0430\u043d\u0438\u044f \u0443\u0432\u0435\u043b\u0438\u0447\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u043f\u043e \u043c\u0435\u0440\u0435 \u043d\u0430\u0448\u0435\u0433\u043e \u0434\u0432\u0438\u0436\u0435\u043d\u0438\u044f \u0434\u0430\u043b\u044c\u0448\u0435 \u043e\u0442 \u0441\u0440\u0435\u0434\u043d\u0435\u0433\u043e \u0440\u043e\u0441\u0442\u0430. \u041f\u0440\u0438\u043c\u0435\u043d\u0438\u0432 \u043f\u0440\u0438\u0432\u0435\u0434\u0435\u043d\u043d\u0443\u044e \u0432\u044b\u0448\u0435 \u0444\u043e\u0440\u043c\u0443\u043b\u0443 \u043a \u041c\u0430\u0440\u043a\u0443 \u0428\u043f\u0438\u0442\u0446\u0443, \u0432 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0435 \u043f\u043e\u043b\u0443\u0447\u0438\u043c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0435:<\/p>\n<pre><code class=\"python\">def ex_3_30():     '''\u0418\u043d\u0442\u0435\u0440\u0432\u0430\u043b \u043f\u0440\u0435\u0434\u0441\u043a\u0430\u0437\u0430\u043d\u0438\u044f        \u043f\u0440\u0438\u043c\u0435\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u043a \u0434\u0430\u043d\u043d\u044b\u043c \u043e \u041c\u0430\u0440\u043a\u0435 \u0428\u043f\u0438\u0442\u0446\u0435'''     df = swimmer_data()     df['\u0431\u0438\u043d_\u041f\u043e\u043b'] = df['\u041f\u043e\u043b'].map({'\u041c': 1, '\u0416': 0}).astype(int)      df['\u0413\u043e\u0434 \u0440\u043e\u0436\u0434\u0435\u043d\u0438\u044f'] = df['\u0414\u0430\u0442\u0430 \u0440\u043e\u0436\u0434\u0435\u043d\u0438\u044f'].map(str_to_year)     X = df[['\u0420\u043e\u0441\u0442, \u0441\u043c', '\u0431\u0438\u043d_\u041f\u043e\u043b', '\u0413\u043e\u0434 \u0440\u043e\u0436\u0434\u0435\u043d\u0438\u044f']]      X.insert(0, '\u043a\u043e\u043d\u0441\u0442\u0430\u043d\u0442\u0430', 1.0)     y = df['\u0412\u0435\u0441'].apply(np.log)      xspitz = pd.Series([1.0, 183, 1, 1950])  # \u0434\u0430\u043d\u043d\u044b\u0435 \u041c.\u0428\u043f\u0438\u0442\u0446\u0430     return np.exp( prediction_interval(X, y, xspitz) )<\/code><\/pre>\n<pre><code>array([72.74964444, 97.46908087])<\/code><\/pre>\n<p>\u042d\u0442\u043e\u0442 \u043f\u0440\u0438\u043c\u0435\u0440 \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u0434\u0438\u0430\u043f\u0430\u0437\u043e\u043d \u043c\u0435\u0436\u0434\u0443 72.7 \u0438 97.4 \u043a\u0433., \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043a\u0430\u043a \u0440\u0430\u0437 \u0432\u043a\u043b\u044e\u0447\u0430\u0435\u0442 \u0432 \u0441\u0435\u0431\u044f \u0432\u0435\u0441 \u041c\u0430\u0440\u043a\u0430 73 \u043a\u0433., \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043d\u0430\u0448\u0435 \u043f\u0440\u0435\u0434\u0441\u043a\u0430\u0437\u0430\u043d\u0438\u0435 \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u0432 \u043f\u0440\u0435\u0434\u0435\u043b\u0430\u0445 95%-\u043e\u0433\u043e \u0438\u043d\u0442\u0435\u0440\u0432\u0430\u043b\u0430 \u043f\u0440\u0435\u0434\u0441\u043a\u0430\u0437\u0430\u043d\u0438\u044f. \u041f\u0440\u0430\u0432\u0434\u0430 \u043e\u043d\u043e \u043b\u0435\u0436\u0438\u0442 \u043d\u0435\u0443\u0434\u043e\u0431\u043d\u043e \u0431\u043b\u0438\u0437\u043a\u043e \u043a \u0433\u0440\u0430\u043d\u0438\u0446\u0430\u043c \u0434\u0438\u0430\u043f\u0430\u0437\u043e\u043d\u0430.<\/p>\n<h2>\u0413\u0440\u0430\u043d\u0438\u0446\u044b \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f \u043c\u043e\u0434\u0435\u043b\u0438<\/h2>\n<p>\u041c\u0430\u0440\u043a \u0428\u043f\u0438\u0442\u0446 \u0440\u043e\u0434\u0438\u043b\u0441\u044f \u0432 1950 \u0433., \u0437\u0430 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0434\u0435\u0441\u044f\u0442\u0438\u043b\u0435\u0442\u0438\u0439 \u0434\u043e \u0440\u043e\u0436\u0434\u0435\u043d\u0438\u044f \u0441\u0430\u043c\u044b\u0445 \u0432\u043e\u0437\u0440\u0430\u0441\u0442\u043d\u044b\u0445 \u043f\u043b\u043e\u0432\u0446\u043e\u0432 \u043d\u0430 \u041e\u043b\u0438\u043c\u043f\u0438\u0439\u0441\u043a\u0438\u0445 \u0438\u0433\u0440\u0430\u0445 2012 \u0433. \u041f\u044b\u0442\u0430\u044f\u0441\u044c \u043f\u0440\u0435\u0434\u0441\u043a\u0430\u0437\u0430\u0442\u044c \u0432\u0435\u0441 \u041c\u0430\u0440\u043a\u0430, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f \u0435\u0433\u043e \u0433\u043e\u0434 \u0440\u043e\u0436\u0434\u0435\u043d\u0438\u044f, \u043c\u044b \u0432\u0438\u043d\u043e\u0432\u0430\u0442\u044b \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e \u043f\u044b\u0442\u0430\u0435\u043c\u0441\u044f \u044d\u043a\u0441\u0442\u0440\u0430\u043f\u043e\u043b\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0441\u043b\u0438\u0448\u043a\u043e\u043c \u0434\u0430\u043b\u0435\u043a\u043e \u0437\u0430 \u043f\u0440\u0435\u0434\u0435\u043b\u044b \u043d\u0430\u0448\u0438\u0445 \u0442\u0440\u0435\u043d\u0438\u0440\u043e\u0432\u043e\u0447\u043d\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445. \u041c\u044b \u043f\u0440\u0435\u0432\u044b\u0441\u0438\u043b\u0438 \u0433\u0440\u0430\u043d\u0438\u0446\u044b \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f \u043d\u0430\u0448\u0435\u0439 \u043c\u043e\u0434\u0435\u043b\u0438.<\/p>\n<p>\u0415\u0441\u0442\u044c \u0438 \u0432\u0442\u043e\u0440\u0430\u044f \u043f\u0440\u0438\u0447\u0438\u043d\u0430, \u043f\u043e \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u044d\u0442\u043e\u0442 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0441\u043e\u043f\u0440\u044f\u0436\u0435\u043d \u0441 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0430\u043c\u0438. \u041d\u0430\u0448\u0438 \u0434\u0430\u043d\u043d\u044b\u0435 \u043f\u043e\u043b\u043d\u043e\u0441\u0442\u044c\u044e \u043e\u0441\u043d\u043e\u0432\u0430\u043d\u044b \u043d\u0430 \u043f\u043b\u043e\u0432\u0446\u0430\u0445, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0441\u043e\u0440\u0435\u0432\u043d\u0443\u044e\u0442\u0441\u044f \u0432 \u043d\u0430\u0448\u0438 \u0434\u043d\u0438 \u043d\u0430 \u0443\u0440\u043e\u0432\u043d\u0435 \u043c\u0435\u0436\u0434\u0443\u043d\u0430\u0440\u043e\u0434\u043d\u044b\u0445 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043e\u0432, \u0442\u043e\u0433\u0434\u0430 \u043a\u0430\u043a \u041c\u0430\u0440\u043a \u043d\u0435 \u0443\u0447\u0430\u0441\u0442\u0432\u043e\u0432\u0430\u043b \u0432 \u0441\u043e\u0440\u0435\u0432\u043d\u043e\u0432\u0430\u043d\u0438\u044f\u0445 \u0443\u0436\u0435 \u043c\u043d\u043e\u0433\u043e \u043b\u0435\u0442. \u0414\u0440\u0443\u0433\u0438\u043c\u0438 \u0441\u043b\u043e\u0432\u0430\u043c\u0438, \u041c\u0430\u0440\u043a \u0442\u0435\u043f\u0435\u0440\u044c \u043d\u0435 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0447\u0430\u0441\u0442\u044c\u044e \u043f\u043e\u043f\u0443\u043b\u044f\u0446\u0438\u0438, \u043d\u0430 \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u043c\u044b \u043d\u0430\u0442\u0440\u0435\u043d\u0438\u0440\u043e\u0432\u0430\u043b\u0438 \u043d\u0430\u0448\u0443 \u043c\u043e\u0434\u0435\u043b\u044c. \u0412 \u0446\u0435\u043b\u044f\u0445 \u0438\u0441\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u043e\u0431\u0435\u0438\u0445 \u044d\u0442\u0438\u0445 \u043f\u0440\u043e\u0431\u043b\u0435\u043c \u043d\u0430\u043c \u043d\u0443\u0436\u043d\u043e \u043f\u043e\u0438\u0441\u043a\u0430\u0442\u044c \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u0443\u044e \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u043e \u041c\u0430\u0440\u043a\u0435 \u0432 1979 \u0433., \u043a\u043e\u0433\u0434\u0430 \u043e\u043d \u0435\u0449\u0435 \u0443\u0447\u0430\u0441\u0442\u0432\u043e\u0432\u0430\u043b \u0432 \u0441\u043e\u0440\u0435\u0432\u043d\u043e\u0432\u0430\u043d\u0438\u044f\u0445 \u043f\u043e \u043f\u043b\u0430\u0432\u0430\u043d\u0438\u044e.<\/p>\n<p>\u0421\u043e\u0433\u043b\u0430\u0441\u043d\u043e <a href=\"http:\/\/www.topendsports.com\/athletes\/swimming\/spitz-mark.htm\" rel=\"noopener noreferrer nofollow\">\u0434\u0430\u043d\u043d\u044b\u043c,<\/a> \u0432 1972 \u0433. 22-\u043b\u0435\u0442\u043d\u0438\u0439 \u041c\u0430\u0440\u043a \u0428\u043f\u0438\u0442\u0446 \u0438\u043c\u0435\u043b \u0440\u043e\u0441\u0442 185 \u0441\u043c. \u0438 \u0432\u0435\u0441\u0438\u043b 79 \u043a\u0433.<\/p>\n<p><sup>\u041e\u0442\u0431\u043e\u0440 \u0432\u0435\u0440\u043d\u044b\u0445 \u043f\u0440\u0438\u0437\u043d\u0430\u043a\u043e\u0432 \u2014 \u044d\u0442\u043e \u043e\u0434\u043d\u0430 \u0438\u0437 \u0441\u0430\u043c\u044b\u0445 \u0432\u0430\u0436\u043d\u044b\u0445 \u043f\u0440\u0435\u0434\u043f\u043e\u0441\u044b\u043b\u043e\u043a \u0434\u043b\u044f \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u044f \u0445\u043e\u0440\u043e\u0448\u0438\u0445 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u043e\u0432 \u043e\u0442 \u043b\u044e\u0431\u043e\u0433\u043e \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u0430 \u043f\u0440\u0435\u0434\u0441\u043a\u0430\u0437\u0430\u043d\u0438\u044f.<\/sup><\/p>\n<p>\u0421\u043b\u0435\u0434\u0443\u0435\u0442 \u043e\u0442\u0431\u0438\u0440\u0430\u0442\u044c \u043f\u0440\u0438\u0437\u043d\u0430\u043a\u0438 \u043d\u0435 \u0442\u043e\u043b\u044c\u043a\u043e, \u043e\u043f\u0438\u0440\u0430\u044f\u0441\u044c \u043d\u0430 \u0438\u0445 \u043f\u0440\u0435\u0434\u0441\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u0443\u044e \u0441\u0438\u043b\u0443, \u043d\u043e \u0438 \u043d\u0430 \u0438\u0445 \u0430\u043a\u0442\u0443\u0430\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u0434\u043b\u044f \u043c\u043e\u0434\u0435\u043b\u0438\u0440\u0443\u0435\u043c\u043e\u0439 \u043e\u0431\u043b\u0430\u0441\u0442\u0438.<\/p>\n<h2>\u041e\u043a\u043e\u043d\u0447\u0430\u0442\u0435\u043b\u044c\u043d\u0430\u044f \u043c\u043e\u0434\u0435\u043b\u044c<\/h2>\n<p>\u0425\u043e\u0442\u044f \u043d\u0430\u0448\u0430 \u043c\u043e\u0434\u0435\u043b\u044c \u0438\u043c\u0435\u0435\u0442 \u0447\u0443\u0442\u044c \u0431\u043e\u043b\u0435\u0435 \u043d\u0438\u0437\u043a\u0438\u0439 <em>R<\/em><sup>2<\/sup>, \u0434\u0430\u0432\u0430\u0439\u0442\u0435 \u043d\u0430\u0442\u0440\u0435\u043d\u0438\u0440\u0443\u0435\u043c \u0435\u0435 \u043f\u043e\u0432\u0442\u043e\u0440\u043d\u043e, \u0432\u0437\u044f\u0432 \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u043f\u0440\u0438\u0437\u043d\u0430\u043a\u0430 \u0432\u043e\u0437\u0440\u0430\u0441\u0442 \u0432\u043c\u0435\u0441\u0442\u043e \u0433\u043e\u0434\u0430 \u0440\u043e\u0436\u0434\u0435\u043d\u0438\u044f. \u042d\u0442\u043e \u043f\u043e\u0437\u0432\u043e\u043b\u0438\u0442 \u043d\u0430\u043c \u043b\u0435\u0433\u043a\u043e \u043f\u0440\u0435\u0434\u0441\u043a\u0430\u0437\u044b\u0432\u0430\u0442\u044c \u0432\u0435\u0441\u0430 \u0434\u043b\u044f \u043f\u0440\u043e\u0448\u043b\u044b\u0445 \u0438 \u0431\u0443\u0434\u0443\u0449\u0438\u0445 \u0440\u0430\u043d\u0435\u0435 \u043d\u0435 \u0432\u0441\u0442\u0440\u0435\u0447\u0430\u0432\u0448\u0438\u0445\u0441\u044f \u0434\u0430\u043d\u043d\u044b\u0445, \u0442.\u043a. \u043e\u043d\u0430 \u0431\u043b\u0438\u0436\u0435 \u043c\u043e\u0434\u0435\u043b\u0438\u0440\u0443\u0435\u0442 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0443\u044e, \u043a\u043e\u0442\u043e\u0440\u0430\u044f, \u043a\u0430\u043a \u043c\u044b \u043f\u043e\u043b\u0430\u0433\u0430\u0435\u043c, \u0438\u043c\u0435\u0435\u0442 \u043f\u0440\u0438\u0447\u0438\u043d\u043d\u043e-\u0441\u043b\u0435\u0434\u0441\u0442\u0432\u0435\u043d\u043d\u0443\u044e \u0441\u0432\u044f\u0437\u044c \u0441 \u0432\u0435\u0441\u043e\u043c.<\/p>\n<p>\u041c\u043e\u0434\u0435\u043b\u044c \u043f\u0440\u043e\u0438\u0437\u0432\u0435\u0434\u0435\u0442 <em>\u03b2&nbsp;<\/em>\u043f\u0440\u0438\u0431\u043b\u0438\u0437\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0441 \u0442\u0430\u043a\u0438\u043c\u0438 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f\u043c\u0438:<\/p>\n<figure class=\"\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/79b\/a7b\/31f\/79ba7b31f75aaa8e6054960e5cd72ab3.png\" width=\"112\" height=\"72\"><figcaption><\/figcaption><\/figure>\n<p>\u041d\u0430\u0448\u0438 \u043f\u0440\u0438\u0437\u043d\u0430\u043a\u0438 \u0434\u043b\u044f \u041c\u0430\u0440\u043a\u0430 \u043d\u0430 \u0438\u0433\u0440\u0430\u0445 1972 \u0433. \u0442\u0430\u043a\u043e\u0432\u044b:<\/p>\n<figure class=\"\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/f53\/c42\/973\/f53c429737d17194b314a990b6255768.png\" width=\"114\" height=\"70\"><figcaption><\/figcaption><\/figure>\n<p>\u042d\u0442\u0438 \u043f\u0440\u0438\u0437\u043d\u0430\u043a\u0438 \u043c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0434\u043b\u044f \u043f\u0440\u0435\u0434\u0441\u043a\u0430\u0437\u0430\u043d\u0438\u044f \u0435\u0433\u043e \u0441\u043e\u0440\u0435\u0432\u043d\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0433\u043e \u0432\u0435\u0441\u0430 \u043f\u0440\u0438 \u043f\u043e\u043c\u043e\u0449\u0438 \u043f\u0440\u0438\u0432\u0435\u0434\u0435\u043d\u043d\u043e\u0433\u043e \u043d\u0438\u0436\u0435 \u043f\u0440\u0438\u043c\u0435\u0440\u0430:<\/p>\n<pre><code class=\"python\">def ex_3_32():     '''\u041e\u043a\u043e\u043d\u0447\u0430\u0442\u0435\u043b\u044c\u043d\u0430\u044f \u043c\u043e\u0434\u0435\u043b\u044c \u0434\u043b\u044f \u043f\u0440\u0435\u0434\u0441\u043a\u0430\u0437\u0430\u043d\u0438\u044f         \u0441\u043e\u0440\u0435\u0432\u043d\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0433\u043e \u0432\u0435\u0441\u0430'''     df = swimmer_data()     df['\u0431\u0438\u043d_\u041f\u043e\u043b'] = df['\u041f\u043e\u043b'].map({'\u041c': 1, '\u0416': 0}).astype(int)      X = df[['\u0420\u043e\u0441\u0442, \u0441\u043c', '\u0431\u0438\u043d_\u041f\u043e\u043b', '\u0412\u043e\u0437\u0440\u0430\u0441\u0442']]      X.insert(0, '\u043a\u043e\u043d\u0441\u0442\u0430\u043d\u0442\u0430', 1.0)     y = df['\u0412\u0435\u0441'].apply(np.log)       beta = linear_model(X, y)     # \u043f\u0440\u0435\u0434\u0441\u043a\u0430\u0437\u0430\u0442\u044c \u0432\u0435\u0441 \u041c\u0430\u0440\u043a\u0430 \u0428\u043f\u0438\u0442\u0446\u0430     xspitz = pd.Series([1.0, 185, 1, 22])      return np.exp( predict(beta, xspitz) )<\/code><\/pre>\n<pre><code>78.46882772630318<\/code><\/pre>\n<p>\u041f\u0440\u0438\u043c\u0435\u0440 \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u0447\u0438\u0441\u043b\u043e 78.47, \u0442.\u0435. \u043f\u0440\u0435\u0434\u0441\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442 \u0432\u0435\u0441 78.47 \u043a\u0433. \u0422\u0435\u043f\u0435\u0440\u044c \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u043e\u0447\u0435\u043d\u044c \u0431\u043b\u0438\u0437\u043a\u043e \u043a \u0438\u0441\u0442\u0438\u043d\u043d\u043e\u043c\u0443 \u0441\u043e\u0440\u0435\u0432\u043d\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u043c\u0443 \u0432\u0435\u0441\u0443 \u041c\u0430\u0440\u043a\u0430, \u0440\u0430\u0432\u043d\u043e\u043c\u0443 79 \u043a\u0433.<\/p>\n<p>\u041f\u0440\u0438\u043c\u0435\u0440\u044b \u0438\u0441\u0445\u043e\u0434\u043d\u043e\u0433\u043e \u043a\u043e\u0434\u0430 \u0434\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u043f\u043e\u0441\u0442\u0430 \u043d\u0430\u0445\u043e\u0434\u044f\u0442\u0441\u044f \u0432 \u043c\u043e\u0435\u043c&nbsp;<a href=\"https:\/\/github.com\/capissimo\/python-for-data-science\" rel=\"noopener noreferrer nofollow\">\u0440\u0435\u043f\u043e<\/a>&nbsp;\u043d\u0430 Github. \u0412\u0441\u0435 \u0438\u0441\u0445\u043e\u0434\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 \u0432\u0437\u044f\u0442\u044b \u0432&nbsp;<a href=\"https:\/\/github.com\/clojuredatascience\/ch3-correlation\" rel=\"noopener noreferrer nofollow\">\u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0438<\/a>&nbsp;\u0430\u0432\u0442\u043e\u0440\u0430 \u043a\u043d\u0438\u0433\u0438.&nbsp; <\/p>\n<h2>\u0420\u0435\u0437\u044e\u043c\u0435<\/h2>\n<p>\u0412 \u044d\u0442\u043e\u0439 \u0441\u0435\u0440\u0438\u0438 \u043f\u043e\u0441\u0442\u043e\u0432 \u043c\u044b \u0443\u0437\u043d\u0430\u043b\u0438 \u043e \u0442\u043e\u043c, \u043a\u0430\u043a \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0442\u044c \u043d\u0430\u043b\u0438\u0447\u0438\u0435 \u043e\u0431\u0449\u0435\u0439 \u043b\u0438\u043d\u0435\u0439\u043d\u043e\u0439 \u0441\u0432\u044f\u0437\u0438 \u043c\u0435\u0436\u0434\u0443 \u0434\u0432\u0443\u043c\u044f \u0438 \u0431\u043e\u043b\u0435\u0435 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u043c\u0438. \u041c\u044b \u0443\u0432\u0438\u0434\u0435\u043b\u0438, \u043a\u0430\u043a \u0432\u044b\u0440\u0430\u0436\u0430\u0442\u044c \u0441\u0438\u043b\u0443 \u0438\u0445 \u043a\u043e\u0440\u0440\u0435\u043b\u044f\u0446\u0438\u0438 \u043f\u0440\u0438 \u043f\u043e\u043c\u043e\u0449\u0438 \u043a\u043e\u0440\u0440\u0435\u043b\u044f\u0446\u0438\u0438 \u041f\u0438\u0440\u0441\u043e\u043d\u0430 <em>r&nbsp;<\/em>\u0438 \u043d\u0430\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0445\u043e\u0440\u043e\u0448\u043e \u043b\u0438\u043d\u0435\u0439\u043d\u0430\u044f \u043c\u043e\u0434\u0435\u043b\u044c \u043e\u0431\u044a\u044f\u0441\u043d\u044f\u0435\u0442 \u0432\u0430\u0440\u0438\u0430\u0446\u0438\u044e \u043f\u0440\u0438 \u043f\u043e\u043c\u043e\u0449\u0438 \u043a\u043e\u044d\u0444\u0444\u0438\u0446\u0438\u0435\u043d\u0442\u043e\u0432 \u0434\u0435\u0442\u0435\u0440\u043c\u0438\u043d\u0430\u0446\u0438\u0438 <em>R<\/em><sup>2<\/sup><em>&nbsp;<\/em>\u0438 <em>R\u0305<\/em><sup>2<\/sup>. \u041c\u044b \u0442\u0430\u043a\u0436\u0435 \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u043b\u0438 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0443 \u0441\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u0433\u0438\u043f\u043e\u0442\u0435\u0437 \u0438 \u0440\u0430\u0441\u0441\u0447\u0438\u0442\u0430\u043b\u0438 \u0438\u043d\u0442\u0435\u0440\u0432\u0430\u043b\u044b \u0443\u0432\u0435\u0440\u0435\u043d\u043d\u043e\u0441\u0442\u0438, \u0447\u0442\u043e\u0431\u044b \u0432\u044b\u0432\u0435\u0441\u0442\u0438 \u0434\u0438\u0430\u043f\u0430\u0437\u043e\u043d \u0438\u0441\u0442\u0438\u043d\u043d\u043e\u0433\u043e \u043f\u043e\u043f\u0443\u043b\u044f\u0446\u0438\u043e\u043d\u043d\u043e\u0433\u043e \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430 <em>\u03c1<\/em> \u0434\u043b\u044f \u043a\u043e\u0440\u0440\u0435\u043b\u044f\u0446\u0438\u0438.<\/p>\n<p>\u041e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u0432 \u043a\u043e\u0440\u0440\u0435\u043b\u044f\u0446\u0438\u044e \u043c\u0435\u0436\u0434\u0443 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u043c\u0438, \u043c\u044b \u0441\u043c\u043e\u0433\u043b\u0438 \u043f\u043e\u0441\u0442\u0440\u043e\u0438\u0442\u044c \u043f\u0440\u0435\u0434\u0441\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u0443\u044e \u043c\u043e\u0434\u0435\u043b\u044c \u0441 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c \u0440\u0435\u0433\u0440\u0435\u0441\u0441\u0438\u0438 \u043c\u0435\u0442\u043e\u0434\u043e\u043c \u043e\u0431\u044b\u0447\u043d\u044b\u0445 \u043d\u0430\u0438\u043c\u0435\u043d\u044c\u0448\u0438\u0445 \u043a\u0432\u0430\u0434\u0440\u0430\u0442\u043e\u0432 \u0438 \u043f\u0440\u043e\u0441\u0442\u044b\u0445 \u0444\u0443\u043d\u043a\u0446\u0438\u0439 Python. \u0417\u0430\u0442\u0435\u043c \u043c\u044b \u043e\u0431\u043e\u0431\u0449\u0438\u043b\u0438 \u043d\u0430\u0448 \u043f\u043e\u0434\u0445\u043e\u0434, \u0432\u043e\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0432\u0448\u0438\u0441\u044c \u0434\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u043c\u0430\u0442\u0440\u0438\u0447\u043d\u043e\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u043e\u0441\u0442\u044c\u044e \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a pandas \u0438 numpy \u0438 \u043d\u043e\u0440\u043c\u0430\u043b\u044c\u043d\u044b\u043c \u0443\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u0435\u043c. \u042d\u0442\u0430 \u043f\u0440\u043e\u0441\u0442\u0430\u044f \u043c\u043e\u0434\u0435\u043b\u044c \u043f\u0440\u043e\u0434\u0435\u043c\u043e\u043d\u0441\u0442\u0440\u0438\u0440\u043e\u0432\u0430\u043b\u0430 \u043f\u0440\u0438\u043d\u0446\u0438\u043f\u044b <em>\u043c\u0430\u0448\u0438\u043d\u043d\u043e\u0433\u043e \u0443\u0441\u0432\u043e\u0435\u043d\u0438\u044f \u0437\u0430\u043a\u043e\u043d\u043e\u043c\u0435\u0440\u043d\u043e\u0441\u0442\u0435\u0439<\/em> \u043f\u0443\u0442\u0435\u043c \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044f \u043c\u043e\u0434\u0435\u043b\u044c\u043d\u044b\u0445 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432 <em>\u03b2<\/em>, \u0438\u0437\u0432\u043b\u0435\u0447\u0435\u043d\u043d\u044b\u0445 \u0438\u0437 \u0432\u044b\u0431\u043e\u0440\u043e\u0447\u043d\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043c\u043e\u0433\u0443\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u0434\u043b\u044f \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u043f\u0440\u0435\u0434\u0441\u043a\u0430\u0437\u0430\u043d\u0438\u0439. \u041d\u0430\u0448\u0430 \u043c\u043e\u0434\u0435\u043b\u044c \u0441\u043c\u043e\u0433\u043b\u0430 \u043f\u0440\u0435\u0434\u0441\u043a\u0430\u0437\u0430\u0442\u044c \u043e\u0436\u0438\u0434\u0430\u0435\u043c\u044b\u0439 \u0432\u0435\u0441 \u043d\u043e\u0432\u043e\u0433\u043e \u0430\u0442\u043b\u0435\u0442\u0430, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u043e\u043b\u043d\u043e\u0441\u0442\u044c\u044e \u043f\u043e\u043f\u0430\u0434\u0430\u043b \u0432 \u043f\u0440\u0435\u0434\u0435\u043b\u044b \u0438\u043d\u0442\u0435\u0440\u0432\u0430\u043b\u0430 \u043f\u0440\u0435\u0434\u0441\u043a\u0430\u0437\u0430\u043d\u0438\u044f \u0434\u043b\u044f \u0438\u0441\u0442\u0438\u043d\u043d\u043e\u0433\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f.<\/p>\n<\/div>\n<p> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/post\/558158\/\"> https:\/\/habr.com\/ru\/post\/558158\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"\n<div class=\"post__text post__text_v2\" id=\"post-content-body\">\n<p>\u041f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0438\u0439 \u043f\u043e\u0441\u0442 \u0441\u043c. <a href=\"https:\/\/habr.com\/ru\/post\/558146\/\" rel=\"noopener noreferrer nofollow\">\u0437\u0434\u0435\u0441\u044c<\/a>.<\/p>\n<h3>\u041f\u0440\u0435\u0434\u0441\u043a\u0430\u0437\u0430\u043d\u0438\u0435<\/h3>\n<p>\u0412 \u0437\u0430\u043a\u043b\u044e\u0447\u0435\u043d\u0438\u0438, \u043c\u044b \u043f\u043e\u0434\u0445\u043e\u0434\u0438\u043c \u043a \u043e\u0434\u043d\u043e\u043c\u0443 \u0438\u0437 \u043d\u0430\u0438\u0431\u043e\u043b\u0435\u0435 \u0432\u0430\u0436\u043d\u044b\u0445 \u043f\u0440\u0438\u043c\u0435\u043d\u0435\u043d\u0438\u0439 \u043b\u0438\u043d\u0435\u0439\u043d\u043e\u0439 \u0440\u0435\u0433\u0440\u0435\u0441\u0441\u0438\u0438: <em>\u043f\u0440\u0435\u0434\u0441\u043a\u0430\u0437\u0430\u043d\u0438\u044e<\/em>. \u041c\u044b \u043d\u0430\u0442\u0440\u0435\u043d\u0438\u0440\u043e\u0432\u0430\u043b\u0438 \u043c\u043e\u0434\u0435\u043b\u044c \u0441\u043f\u043e\u0441\u043e\u0431\u043d\u0443\u044e \u043f\u0440\u0435\u0434\u0441\u043a\u0430\u0437\u044b\u0432\u0430\u0442\u044c \u0432\u0435\u0441 \u043e\u043b\u0438\u043c\u043f\u0438\u0439\u0441\u043a\u0438\u0445 \u043f\u043b\u043e\u0432\u0446\u043e\u0432 \u043f\u0440\u0438 \u043d\u0430\u043b\u0438\u0447\u0438\u0438 \u0434\u0430\u043d\u043d\u044b\u0445 \u043e\u0431 \u0438\u0445 \u0440\u043e\u0441\u0442\u0435, \u043f\u043e\u043b\u043e\u0432\u043e\u0439 \u043f\u0440\u0438\u043d\u0430\u0434\u043b\u0435\u0436\u043d\u043e\u0441\u0442\u0438 \u0438 \u0433\u043e\u0434\u0435 \u0440\u043e\u0436\u0434\u0435\u043d\u0438\u044f.<\/p>\n<p>9-\u043a\u0440\u0430\u0442\u043d\u044b\u0439 \u043e\u043b\u0438\u043c\u043f\u0438\u0439\u0441\u043a\u0438\u0439 \u0447\u0435\u043c\u043f\u0438\u043e\u043d \u043f\u043e \u043f\u043b\u0430\u0432\u0430\u043d\u0438\u044e \u041c\u0430\u0440\u043a \u0428\u043f\u0438\u0442\u0446 \u0437\u0430\u0432\u043e\u0435\u0432\u0430\u043b 7 \u0437\u043e\u043b\u043e\u0442\u044b\u0445 \u043c\u0435\u0434\u0430\u043b\u0435\u0439 \u043d\u0430 \u041e\u043b\u0438\u043c\u043f\u0438\u0439\u0441\u043a\u0438\u0445 \u0438\u0433\u0440\u0430\u0445 1972 \u0433. \u041e\u043d \u0440\u043e\u0434\u0438\u043b\u0441\u044f \u0432 1950 \u0433. \u0438, \u0441\u043e\u0433\u043b\u0430\u0441\u043d\u043e \u0432\u0435\u0431-\u0441\u0442\u0440\u0430\u043d\u0438\u0446\u044b \u0412\u0438\u043a\u0438\u043f\u0435\u0434\u0438\u0438, \u0438\u043c\u0435\u0435\u0442 \u0440\u043e\u0441\u0442 183 \u0441\u043c. \u0438 \u0432\u0435\u0441 73 \u043a\u0433. \u041f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u043c, \u0447\u0442\u043e \u043d\u0430\u0448\u0430 \u043c\u043e\u0434\u0435\u043b\u044c \u043f\u0440\u0435\u0434\u0441\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442 \u0432 \u043e\u0442\u043d\u043e\u0448\u0435\u043d\u0438\u0438 \u0435\u0433\u043e \u0432\u0435\u0441\u0430.<\/p>\n<p>\u041d\u0430\u0448\u0430 \u043c\u043d\u043e\u0436\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u0430\u044f \u0440\u0435\u0433\u0440\u0435\u0441\u0441\u0438\u043e\u043d\u043d\u0430\u044f \u043c\u043e\u0434\u0435\u043b\u044c \u0442\u0440\u0435\u0431\u0443\u0435\u0442 \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u0438\u0442\u044c \u044d\u0442\u0438 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0432 \u043c\u0430\u0442\u0440\u0438\u0447\u043d\u043e\u0439 \u0444\u043e\u0440\u043c\u0435. \u041a\u0430\u0436\u0434\u044b\u0439 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440 \u043d\u0443\u0436\u043d\u043e \u043f\u0435\u0440\u0435\u0434\u0430\u0442\u044c \u0432 \u0442\u043e\u043c \u043f\u043e\u0440\u044f\u0434\u043a\u0435, \u0432 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u043c\u043e\u0434\u0435\u043b\u044c \u0443\u0441\u0432\u043e\u0438\u043b\u0430 \u043f\u0440\u0438\u0437\u043d\u0430\u043a\u0438, \u0447\u0442\u043e\u0431\u044b \u043f\u0440\u0438\u043c\u0435\u043d\u0438\u0442\u044c \u043f\u0440\u0430\u0432\u0438\u043b\u044c\u043d\u044b\u0439 \u043a\u043e\u044d\u0444\u0444\u0438\u0446\u0438\u0435\u043d\u0442. \u041f\u043e\u0441\u043b\u0435 \u0441\u043c\u0435\u0449\u0435\u043d\u0438\u044f \u0432\u0435\u043a\u0442\u043e\u0440 \u043f\u0440\u0438\u0437\u043d\u0430\u043a\u043e\u0432 \u0434\u043e\u043b\u0436\u0435\u043d \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0442\u044c \u0440\u043e\u0441\u0442, \u043f\u043e\u043b \u0438 \u0433\u043e\u0434 \u0440\u043e\u0436\u0434\u0435\u043d\u0438\u044f \u0432 \u0442\u0435\u0445 \u0436\u0435 \u0435\u0434\u0438\u043d\u0438\u0446\u0430\u0445 \u0438\u0437\u043c\u0435\u0440\u0435\u043d\u0438\u044f, \u0432 \u043a\u043e\u0442\u043e\u0440\u044b\u0445 \u043c\u043e\u0434\u0435\u043b\u044c \u0431\u044b\u043b\u0430 \u043d\u0430\u0442\u0440\u0435\u043d\u0438\u0440\u043e\u0432\u0430\u043d\u0430:<\/p>\n<figure class=\"\"><figcaption><\/figcaption><\/figure>\n<p>\u041c\u0430\u0442\u0440\u0438\u0446\u0430 <em>\u03b2&nbsp;<\/em>\u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u043a\u043e\u044d\u0444\u0444\u0438\u0446\u0438\u0435\u043d\u0442\u044b \u0434\u043b\u044f \u043a\u0430\u0436\u0434\u043e\u0433\u043e \u0438\u0437 \u044d\u0442\u0438\u0445 \u043f\u0440\u0438\u0437\u043d\u0430\u043a\u043e\u0432:<\/p>\n<figure class=\"\"><figcaption><\/figcaption><\/figure>\n<p>\u041f\u0440\u0435\u0434\u0441\u043a\u0430\u0437\u0430\u043d\u0438\u0435\u043c \u043c\u043e\u0434\u0435\u043b\u0438 \u0431\u0443\u0434\u0435\u0442 \u0441\u0443\u043c\u043c\u0430 \u043f\u0440\u043e\u0438\u0437\u0432\u0435\u0434\u0435\u043d\u0438\u0439 \u043a\u043e\u044d\u0444\u0444\u0438\u0446\u0438\u0435\u043d\u0442\u043e\u0432 <em>\u03b2<\/em>&nbsp;\u0438 \u043f\u0440\u0438\u0437\u043d\u0430\u043a\u043e\u0432 <em>x<\/em>&nbsp;\u0432 \u043a\u0430\u0436\u0434\u043e\u0439 \u0441\u0442\u0440\u043e\u043a\u0435:<\/p>\n<figure class=\"\"><figcaption><\/figcaption><\/figure>\n<p>\u041f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 \u043c\u0430\u0442\u0440\u0438\u0447\u043d\u043e\u0435 \u0443\u043c\u043d\u043e\u0436\u0435\u043d\u0438\u0435 \u043f\u0440\u043e\u0438\u0437\u0432\u043e\u0434\u0438\u0442 \u043a\u0430\u0436\u0434\u044b\u0439 \u044d\u043b\u0435\u043c\u0435\u043d\u0442 \u0432 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0435 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0435\u0433\u043e \u0441\u043b\u043e\u0436\u0435\u043d\u0438\u044f \u043f\u0440\u043e\u0438\u0437\u0432\u0435\u0434\u0435\u043d\u0438\u0439 \u0441\u0442\u0440\u043e\u043a \u0438 \u0441\u0442\u043e\u043b\u0431\u0446\u043e\u0432 \u043a\u0430\u0436\u0434\u043e\u0439 \u043c\u0430\u0442\u0440\u0438\u0446\u044b, \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u0435 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0430 \u043f\u043e\u043f\u0440\u043e\u0441\u0442\u0443 \u0441\u0432\u043e\u0434\u0438\u0442\u0441\u044f \u043a \u043f\u0435\u0440\u0435\u043c\u043d\u043e\u0436\u0435\u043d\u0438\u044e \u0442\u0440\u0430\u043d\u0441\u043f\u043e\u043d\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u0439 \u043c\u0430\u0442\u0440\u0438\u0446\u044b <em>\u03b2&nbsp;<\/em>\u0441 \u0432\u0435\u043a\u0442\u043e\u0440\u043e\u043c <em>xspitz<\/em>.<\/p>\n<p>\u041d\u0430\u043f\u043e\u043c\u043d\u0438\u043c, \u0447\u0442\u043e \u0440\u0430\u0437\u043c\u0435\u0440\u043d\u043e\u0441\u0442\u044c \u0438\u0442\u043e\u0433\u043e\u0432\u043e\u0439 \u043c\u0430\u0442\u0440\u0438\u0446\u044b \u0431\u0443\u0434\u0435\u0442 \u0447\u0438\u0441\u043b\u043e\u043c \u0441\u0442\u0440\u043e\u043a \u0438\u0437 \u043f\u0435\u0440\u0432\u043e\u0439 \u043c\u0430\u0442\u0440\u0438\u0446\u044b \u0438 \u0447\u0438\u0441\u043b\u043e\u043c \u0441\u0442\u043e\u043b\u0431\u0446\u043e\u0432 \u0438\u0437 \u0432\u0442\u043e\u0440\u043e\u0439 \u043c\u0430\u0442\u0440\u0438\u0446\u044b:<\/p>\n<figure class=\"\"><figcaption><\/figcaption><\/figure>\n<p>\u0417\u0434\u0435\u0441\u044c <em>\u03b2<\/em><sup>T<\/sup><em>x<\/em>&nbsp;\u2014 \u044d\u0442\u043e \u043f\u0440\u043e\u0438\u0437\u0432\u0435\u0434\u0435\u043d\u0438\u0435 \u043c\u0430\u0442\u0440\u0438\u0446\u044b \u0440\u0430\u0437\u043c\u0435\u0440\u0430 1 \u00d7 <em>n<\/em>&nbsp;\u0438 \u043c\u0430\u0442\u0440\u0438\u0446\u044b \u0440\u0430\u0437\u043c\u0435\u0440\u0430 <em>n<\/em> \u00d7 1. \u0420\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u043e\u043c \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043c\u0430\u0442\u0440\u0438\u0446\u0430 \u0440\u0430\u0437\u043c\u0435\u0440\u0430 1 \u00d7 1:<\/p>\n<p>&nbsp;<\/p>\n<figure class=\"\"><figcaption><\/figcaption><\/figure>\n<p>\u0418\u0441\u0445\u043e\u0434\u043d\u044b\u0439 \u043a\u043e\u0434 \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u0439 \u043e\u0447\u0435\u043d\u044c \u043f\u0440\u043e\u0441\u0442:<\/p>\n<pre><code class=\"python\">def predict(coefs, x):      '''\u0444\u0443\u043d\u043a\u0446\u0438\u044f \u043f\u0440\u0435\u0434\u0441\u043a\u0430\u0437\u0430\u043d\u0438\u044f'''     return np.matmul(coefs, x.values) <\/code><\/pre>\n<pre><code class=\"python\">def ex_3_29():     '''\u0412\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u0435 \u043e\u0436\u0438\u0434\u0430\u0435\u043c\u043e\u0433\u043e \u0432\u0435\u0441\u0430 \u0441\u043f\u043e\u0440\u0442\u0441\u043c\u0435\u043d\u0430'''     df = swimmer_data()     df['\u0431\u0438\u043d_\u041f\u043e\u043b'] = df['\u041f\u043e\u043b'].map({'\u041c': 1, '\u0416': 0}).astype(int)      df['\u0413\u043e\u0434 \u0440\u043e\u0436\u0434\u0435\u043d\u0438\u044f'] = df['\u0414\u0430\u0442\u0430 \u0440\u043e\u0436\u0434\u0435\u043d\u0438\u044f'].map(str_to_year)     X = df[['\u0420\u043e\u0441\u0442, \u0441\u043c', '\u0431\u0438\u043d_\u041f\u043e\u043b', '\u0413\u043e\u0434 \u0440\u043e\u0436\u0434\u0435\u043d\u0438\u044f']]      X.insert(0, '\u043a\u043e\u043d\u0441\u0442\u0430\u043d\u0442\u0430', 1.0)     y = df['\u0412\u0435\u0441'].apply(np.log)      beta = linear_model(X, y)     xspitz = pd.Series([1.0, 183, 1, 1950]) # \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u044b \u041c\u0430\u0440\u043a\u0430 \u0428\u043f\u0438\u0442\u0446\u0430     return np.exp( predict(beta, xspitz) )  <\/code><\/pre>\n<pre><code>84.20713139038605<\/code><\/pre>\n<p>\u042d\u0442\u043e\u0442 \u043f\u0440\u0438\u043c\u0435\u0440 \u0432\u0435\u0440\u043d\u0435\u0442 \u0447\u0438\u0441\u043b\u043e 84.21, \u043a\u043e\u0442\u043e\u0440\u043e\u0435 \u0441\u043e\u043e\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0443\u0435\u0442 \u043e\u0436\u0438\u0434\u0430\u0435\u043c\u043e\u043c\u0443 \u0432\u0435\u0441\u0443 84.21 \u043a\u0433. \u042d\u0442\u043e \u043d\u0430\u043c\u043d\u043e\u0433\u043e \u0442\u044f\u0436\u0435\u043b\u0435\u0435 \u0437\u0430\u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u043d\u043e\u0433\u043e \u0432\u0435\u0441\u0430 \u041c\u0430\u0440\u043a\u0430 \u0428\u043f\u0438\u0442\u0446\u0430 73 \u043a\u0433. \u041d\u0430\u0448\u0430 \u043c\u043e\u0434\u0435\u043b\u044c, \u043f\u043e\u0445\u043e\u0436\u0435, \u043d\u0435 \u0441\u0440\u0430\u0431\u043e\u0442\u0430\u043b\u0430 \u043a\u0430\u043a \u043d\u0430\u0434\u043e.<\/p>\n<h2>\u0418\u043d\u0442\u0435\u0440\u0432\u0430\u043b \u0443\u0432\u0435\u0440\u0435\u043d\u043d\u043e\u0441\u0442\u0438 \u0434\u043b\u044f \u043a\u043e\u043d\u043a\u0440\u0435\u0442\u043d\u043e\u0433\u043e \u043f\u0440\u0435\u0434\u0441\u043a\u0430\u0437\u0430\u043d\u0438\u044f<\/h2>\n<p>\u0420\u0430\u043d\u0435\u0435 \u043c\u044b \u0440\u0430\u0441\u0441\u0447\u0438\u0442\u0430\u043b\u0438 \u0438\u043d\u0442\u0435\u0440\u0432\u0430\u043b\u044b \u0443\u0432\u0435\u0440\u0435\u043d\u043d\u043e\u0441\u0442\u0438 \u0434\u043b\u044f \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432 \u043f\u043e\u043f\u0443\u043b\u044f\u0446\u0438\u0438. \u041c\u044b \u043c\u043e\u0436\u0435\u043c \u0442\u0430\u043a\u0436\u0435 \u043f\u043e\u0441\u0442\u0440\u043e\u0438\u0442\u044c \u0438\u043d\u0442\u0435\u0440\u0432\u0430\u043b \u0443\u0432\u0435\u0440\u0435\u043d\u043d\u043e\u0441\u0442\u0438 \u0434\u043b\u044f \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e \u0432\u0437\u044f\u0442\u043e\u0433\u043e \u043f\u0440\u0435\u0434\u0441\u043a\u0430\u0437\u0430\u043d\u0438\u044f, \u0438\u043c\u0435\u043d\u0443\u0435\u043c\u044b\u0439 <em>\u0438\u043d\u0442\u0435\u0440\u0432\u0430\u043b\u043e\u043c \u043f\u0440\u0435\u0434\u0441\u043a\u0430\u0437\u0430\u043d\u0438\u044f<\/em>, \u0438\u043b\u0438 \u0438\u043d\u0442\u0435\u0440\u0432\u0430\u043b\u043e\u043c \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u0439 \u043f\u0440\u0435\u0434\u0441\u043a\u0430\u0437\u0430\u043d\u043d\u043e\u0439 \u0432\u0435\u043b\u0438\u0447\u0438\u043d\u044b. \u0418\u043d\u0442\u0435\u0440\u0432\u0430\u043b \u043f\u0440\u0435\u0434\u0441\u043a\u0430\u0437\u0430\u043d\u0438\u044f \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u0435\u043d\u043d\u043e \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0435\u0442 \u0440\u0430\u0437\u043c\u0435\u0440 \u043d\u0435\u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u043e\u0441\u0442\u0438 \u0432 \u043f\u0440\u0435\u0434\u0441\u043a\u0430\u0437\u0430\u043d\u0438\u0438, \u043f\u0440\u0435\u0434\u043b\u0430\u0433\u0430\u044f \u043c\u0438\u043d\u0438\u043c\u0430\u043b\u044c\u043d\u043e\u0435 \u0438 \u043c\u0430\u043a\u0441\u0438\u043c\u0430\u043b\u044c\u043d\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435, \u043c\u0435\u0436\u0434\u0443 \u043a\u043e\u0442\u043e\u0440\u044b\u043c\u0438 \u0438\u0441\u0442\u0438\u043d\u043d\u043e\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u043e\u0436\u0438\u0434\u0430\u0435\u043c\u043e \u043f\u043e\u043f\u0430\u0434\u0430\u0435\u0442 \u0441 \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u043e\u0439 \u0432\u0435\u0440\u043e\u044f\u0442\u043d\u043e\u0441\u0442\u044c\u044e. \u0418\u043d\u0442\u0435\u0440\u0432\u0430\u043b \u043f\u0440\u0435\u0434\u0441\u043a\u0430\u0437\u0430\u043d\u0438\u044f \u0434\u043b\u044f <em>y\u0302<\/em>&nbsp;\u0448\u0438\u0440\u0435 \u0438\u043d\u0442\u0435\u0440\u0432\u0430\u043b\u0430 \u0443\u0432\u0435\u0440\u0435\u043d\u043d\u043e\u0441\u0442\u0438 \u0434\u043b\u044f \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430 \u043f\u043e\u043f\u0443\u043b\u044f\u0446\u0438\u0438, \u0442\u0430\u043a\u043e\u0433\u043e \u043a\u0430\u043a \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0441\u0440\u0435\u0434\u043d\u0435\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 <em>\u03bc<\/em>. \u042d\u0442\u043e \u043e\u0431\u044a\u044f\u0441\u043d\u044f\u0435\u0442\u0441\u044f \u0442\u0435\u043c, \u0447\u0442\u043e \u0432 \u0438\u043d\u0442\u0435\u0440\u0432\u0430\u043b\u0435 \u0443\u0432\u0435\u0440\u0435\u043d\u043d\u043e\u0441\u0442\u0438 \u0443\u0447\u0438\u0442\u044b\u0432\u0430\u0435\u0442\u0441\u044f \u0442\u043e\u043b\u044c\u043a\u043e \u043d\u0435\u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u043e\u0441\u0442\u044c \u043f\u0440\u0438 \u043e\u0446\u0435\u043d\u043a\u0435 \u0441\u0440\u0435\u0434\u043d\u0435\u0433\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f, \u0432 \u0442\u043e \u0432\u0440\u0435\u043c\u044f \u043a\u0430\u043a \u0438\u043d\u0442\u0435\u0440\u0432\u0430\u043b \u043f\u0440\u0435\u0434\u0441\u043a\u0430\u0437\u0430\u043d\u0438\u044f \u0442\u0430\u043a\u0436\u0435 \u0434\u043e\u043b\u0436\u0435\u043d \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u0442\u044c \u0432 \u0440\u0430\u0441\u0447\u0435\u0442 \u0434\u0438\u0441\u043f\u0435\u0440\u0441\u0438\u044e \u0432 <em>y<sup>&nbsp;<\/sup><\/em><sup>\u043e\u0442 \u0441\u0440\u0435\u0434\u043d\u0435\u0433\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f.<\/sup><\/p>\n<p><sup>\u041b\u0438\u043d\u0438\u0438 \u0438\u043d\u0442\u0435\u0440\u0432\u0430\u043b\u0430 \u043f\u0440\u0435\u0434\u0441\u043a\u0430\u0437\u0430\u043d\u0438\u044f \u043d\u0430\u0445\u043e\u0434\u044f\u0442\u0441\u044f \u0434\u0430\u043b\u044c\u0448\u0435 \u043e\u0442 \u043e\u043f\u0442\u0438\u043c\u0430\u043b\u044c\u043d\u043e \u043f\u043e\u0434\u043e\u0433\u043d\u0430\u043d\u043d\u043e\u0439 \u043b\u0438\u043d\u0438\u0438, \u0447\u0435\u043c \u043b\u0438\u043d\u0438\u0438 \u0438\u043d\u0442\u0435\u0440\u0432\u0430\u043b\u0430 \u0443\u0432\u0435\u0440\u0435\u043d\u043d\u043e\u0441\u0442\u0438, \u0438 \u0442\u0435\u043c \u0434\u0430\u043b\u044c\u0448\u0435, \u0447\u0435\u043c \u0431\u043e\u043b\u044c\u0448\u0435 \u0438\u043c\u0435\u0435\u0442\u0441\u044f \u0442\u043e\u0447\u0435\u043a \u0434\u0430\u043d\u043d\u044b\u0445. 95%-\u044b\u0439 \u0438\u043d\u0442\u0435\u0440\u0432\u0430\u043b \u043f\u0440\u0435\u0434\u0441\u043a\u0430\u0437\u0430\u043d\u0438\u044f \u2013 \u044d\u0442\u043e \u043f\u043b\u043e\u0449\u0430\u0434\u044c, \u0432 \u043a\u043e\u0442\u043e\u0440\u0443\u044e \u043e\u0436\u0438\u0434\u0430\u0435\u043c\u043e \u043f\u043e\u043f\u0430\u0434\u0430\u044e\u0442 95% \u0432\u0441\u0435\u0445 \u0442\u043e\u0447\u0435\u043a \u0434\u0430\u043d\u043d\u044b\u0445. \u0412 \u043e\u0442\u043b\u0438\u0447\u0438\u0435 \u043e\u0442 \u043d\u0435\u0433\u043e, 95%-\u0439 \u0438\u043d\u0442\u0435\u0440\u0432\u0430\u043b \u0443\u0432\u0435\u0440\u0435\u043d\u043d\u043e\u0441\u0442\u0438 \u2013 \u044d\u0442\u043e \u043f\u043b\u043e\u0449\u0430\u0434\u044c, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0441 95%-\u0439 \u0432\u0435\u0440\u043e\u044f\u0442\u043d\u043e\u0441\u0442\u044c\u044e \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u0438\u0441\u0442\u0438\u043d\u043d\u0443\u044e \u043b\u0438\u043d\u0438\u044e \u0440\u0435\u0433\u0440\u0435\u0441\u0441\u0438\u0438.<\/sup><\/p>\n<figure class=\"\"><figcaption><\/figcaption><\/figure>\n<p>\u041f\u0440\u0438\u0432\u0435\u0434\u0435\u043d\u043d\u044b\u0439 \u0432\u044b\u0448\u0435 \u0433\u0440\u0430\u0444\u0438\u043a \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442 \u0441\u0432\u044f\u0437\u044c \u043c\u0435\u0436\u0434\u0443 \u0432\u043d\u0435\u0448\u043d\u0438\u043c \u0438\u043d\u0442\u0435\u0440\u0432\u0430\u043b\u043e\u043c \u043f\u0440\u0435\u0434\u0441\u043a\u0430\u0437\u0430\u043d\u0438\u044f \u0438 \u0432\u043d\u0443\u0442\u0440\u0435\u043d\u043d\u0438\u043c \u0438\u043d\u0442\u0435\u0440\u0432\u0430\u043b\u043e\u043c \u0443\u0432\u0435\u0440\u0435\u043d\u043d\u043e\u0441\u0442\u0438. \u041c\u044b \u043c\u043e\u0436\u0435\u043c \u0432\u044b\u0447\u0438\u0441\u043b\u0438\u0442\u044c \u0438\u043d\u0442\u0435\u0440\u0432\u0430\u043b \u043f\u0440\u0435\u0434\u0441\u043a\u0430\u0437\u0430\u043d\u0438\u044f, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0443\u044e \u043d\u0438\u0436\u0435 \u0444\u043e\u0440\u043c\u0443\u043b\u0443:<\/p>\n<figure class=\"\"><figcaption><\/figcaption><\/figure>\n<p>\u0417\u0434\u0435\u0441\u044c <em>y\u0302<sub>p<\/sub><\/em>&nbsp;\u2014 \u044d\u0442\u043e \u043f\u0440\u0435\u0434\u0441\u043a\u0430\u0437\u0430\u043d\u0438\u0435, \u043f\u043b\u044e\u0441 \u0438\u043b\u0438 \u043c\u0438\u043d\u0443\u0441 \u0438\u043d\u0442\u0435\u0440\u0432\u0430\u043b. \u041c\u044b \u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u0441\u044f <em>t<\/em>-\u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435\u043c, \u0433\u0434\u0435 \u0441\u0442\u0435\u043f\u0435\u043d\u044c \u0441\u0432\u043e\u0431\u043e\u0434\u044b \u0440\u0430\u0432\u043d\u0430 <em>n<\/em> &#8212; <em>p<\/em>, \u0442.\u0435. \u0440\u0430\u0437\u043c\u0435\u0440 \u0432\u044b\u0431\u043e\u0440\u043a\u0438 \u043c\u0438\u043d\u0443\u0441 \u0447\u0438\u0441\u043b\u043e \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432. \u042d\u0442\u043e \u0442\u0430 \u0436\u0435 \u0441\u0430\u043c\u0430\u044f \u0444\u043e\u0440\u043c\u0443\u043b\u0430, \u043a\u043e\u0442\u043e\u0440\u0430\u044f \u0440\u0430\u043d\u0435\u0435 \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u043b\u0430\u0441\u044c \u043f\u0440\u0438 \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u0438 <em>F<\/em>-\u0442\u0435\u0441\u0442\u043e\u0432. \u0425\u043e\u0442\u044f \u0443\u043a\u0430\u0437\u0430\u043d\u043d\u0430\u044f \u0444\u043e\u0440\u043c\u0443\u043b\u0430, \u0432\u043e\u0437\u043c\u043e\u0436\u043d\u043e, \u043f\u0443\u0433\u0430\u0435\u0442 \u0441\u0432\u043e\u0435\u0439 \u0441\u043b\u043e\u0436\u043d\u043e\u0441\u0442\u044c\u044e, \u043e\u043d\u0430 \u043e\u0442\u043d\u043e\u0441\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u043f\u0440\u044f\u043c\u043e\u043b\u0438\u043d\u0435\u0439\u043d\u043e \u0442\u0440\u0430\u043d\u0441\u043b\u0438\u0440\u0443\u0435\u0442\u0441\u044f \u0432 \u0438\u0441\u0445\u043e\u0434\u043d\u044b\u0439 \u043a\u043e\u0434, \u043f\u043e\u043a\u0430\u0437\u0430\u043d\u043d\u044b\u0439 \u0432 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u043c \u043d\u0438\u0436\u0435 \u043f\u0440\u0438\u043c\u0435\u0440\u0435, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u0432\u044b\u0447\u0438\u0441\u043b\u044f\u0435\u0442 95%-\u044b\u0439 \u0438\u043d\u0442\u0435\u0440\u0432\u0430\u043b \u043f\u0440\u0435\u0434\u0441\u043a\u0430\u0437\u0430\u043d\u0438\u044f.<\/p>\n<pre><code class=\"python\">def prediction_interval(x, y, xp):     '''\u0412\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u0435 \u0438\u043d\u0442\u0435\u0440\u0432\u0430\u043b\u0430 \u043f\u0440\u0435\u0434\u0441\u043a\u0430\u0437\u0430\u043d\u0438\u044f'''     xtx    = np.matmul(x.T, np.asarray(x))     xtxi   = np.linalg.inv(xtx)       xty    = np.matmul(x.T, np.asarray(y))      coefs  = linear_model(x, y)      fitted = np.matmul(x, coefs)     resid  = y - fitted     rss    = resid.dot(resid)       n      = y.shape[0]  # \u0441\u0442\u0440\u043e\u043a\u0438     p      = x.shape[1]  # \u0441\u0442\u043e\u043b\u0431\u0446\u044b     dfe    = n - p      mse    = rss \/ dfe     se_y   = np.matmul(np.matmul(xp.T, xtxi), xp)     t_stat = np.sqrt(mse * (1 + se_y))         # t-\u0441\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u043a\u0430     intl   = stats.t.ppf(0.975, dfe) * t_stat        yp     = np.matmul(coefs.T, xp)     return np.array([yp - intl, yp + intl])<\/code><\/pre>\n<p>\u041f\u043e\u0441\u043a\u043e\u043b\u044c\u043a\u0443 <em>t<\/em>-\u0441\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u043a\u0430 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0438\u0437\u0443\u0435\u0442\u0441\u044f \u0441\u0442\u0435\u043f\u0435\u043d\u044c\u044e \u0441\u0432\u043e\u0431\u043e\u0434\u044b \u043e\u0448\u0438\u0431\u043a\u0438, \u043e\u043d\u0430 \u043f\u0440\u0438\u043d\u0438\u043c\u0430\u0435\u0442 \u0432 \u0440\u0430\u0441\u0447\u0435\u0442 \u043f\u0440\u0438\u0441\u0443\u0442\u0441\u0442\u0432\u0443\u044e\u0449\u0443\u044e \u0432 \u043c\u043e\u0434\u0435\u043b\u0438 \u043d\u0435\u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u043d\u043e\u0441\u0442\u044c.<\/p>\n<p>\u0415\u0441\u043b\u0438 \u0432\u043c\u0435\u0441\u0442\u043e \u0438\u043d\u0442\u0435\u0440\u0432\u0430\u043b\u0430 \u043f\u0440\u0435\u0434\u0441\u043a\u0430\u0437\u0430\u043d\u0438\u044f \u043f\u043e\u0442\u0440\u0435\u0431\u0443\u0435\u0442\u0441\u044f \u0440\u0430\u0441\u0441\u0447\u0438\u0442\u0430\u0442\u044c \u0438\u043d\u0442\u0435\u0440\u0432\u0430\u043b \u0443\u0432\u0435\u0440\u0435\u043d\u043d\u043e\u0441\u0442\u0438 \u0434\u043b\u044f \u0441\u0440\u0435\u0434\u043d\u0435\u0433\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f, \u043c\u044b \u043f\u043e\u043f\u0440\u043e\u0441\u0442\u0443 \u043c\u043e\u0436\u0435\u043c \u043e\u043f\u0443\u0441\u0442\u0438\u0442\u044c \u043f\u0440\u0438\u0431\u0430\u0432\u043b\u0435\u043d\u0438\u0435 \u0435\u0434\u0438\u043d\u0438\u0446\u044b \u043a <code>se_y<\/code> \u043f\u0440\u0438 \u0432\u044b\u0447\u0438\u0441\u043b\u0435\u043d\u0438\u0438 <em>t<\/em>-\u0441\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u043a\u0438 <code>t_stat<\/code>.<\/p>\n<p>\u041f\u0440\u0438\u0432\u0435\u0434\u0435\u043d\u043d\u044b\u0439 \u0432\u044b\u0448\u0435 \u0438\u0441\u0445\u043e\u0434\u043d\u044b\u0439 \u043a\u043e\u0434 \u043c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0434\u043b\u044f \u0433\u0435\u043d\u0435\u0440\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u044f \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0433\u043e \u043d\u0438\u0436\u0435 \u0433\u0440\u0430\u0444\u0438\u043a\u0430, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442, \u043a\u0430\u043a \u0438\u043d\u0442\u0435\u0440\u0432\u0430\u043b \u043f\u0440\u0435\u0434\u0441\u043a\u0430\u0437\u0430\u043d\u0438\u044f \u0438\u0437\u043c\u0435\u043d\u044f\u0435\u0442\u0441\u044f \u0432\u043c\u0435\u0441\u0442\u0435 \u0441\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435\u043c \u043d\u0435\u0437\u0430\u0432\u0438\u0441\u0438\u043c\u043e\u0439 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u043e\u0439:<\/p>\n<figure class=\"\"><figcaption><\/figcaption><\/figure>\n<p>\u0412 \u043f\u0440\u0438\u0432\u0435\u0434\u0435\u043d\u043d\u043e\u043c \u0432\u044b\u0448\u0435 \u0433\u0440\u0430\u0444\u0438\u043a\u0435 \u043c\u043e\u0434\u0435\u043b\u044c \u0442\u0440\u0435\u043d\u0438\u0440\u0443\u0435\u0442\u0441\u044f \u043d\u0430 \u0432\u044b\u0431\u043e\u0440\u043a\u0435 \u0438\u0437 5 \u044d\u043b\u0435\u043c\u0435\u043d\u0442\u043e\u0432 \u0438 \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442, \u043a\u0430\u043a 95%-\u0439 \u0438\u043d\u0442\u0435\u0440\u0432\u0430\u043b \u043f\u0440\u0435\u0434\u0441\u043a\u0430\u0437\u0430\u043d\u0438\u044f \u0443\u0432\u0435\u043b\u0438\u0447\u0438\u0432\u0430\u0435\u0442\u0441\u044f \u043f\u043e \u043c\u0435\u0440\u0435 \u043d\u0430\u0448\u0435\u0433\u043e \u0434\u0432\u0438\u0436\u0435\u043d\u0438\u044f \u0434\u0430\u043b\u044c\u0448\u0435 \u043e\u0442 \u0441\u0440\u0435\u0434\u043d\u0435\u0433\u043e \u0440\u043e\u0441\u0442\u0430. \u041f\u0440\u0438\u043c\u0435\u043d\u0438\u0432 \u043f\u0440\u0438\u0432\u0435\u0434\u0435\u043d\u043d\u0443\u044e \u0432\u044b\u0448\u0435 \u0444\u043e\u0440\u043c\u0443\u043b\u0443 \u043a \u041c\u0430\u0440\u043a\u0443 \u0428\u043f\u0438\u0442\u0446\u0443, \u0432 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0435 \u043f\u043e\u043b\u0443\u0447\u0438\u043c \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u0435:<\/p>\n<pre><code class=\"python\">def ex_3_30():     '''\u0418\u043d\u0442\u0435\u0440\u0432\u0430\u043b \u043f\u0440\u0435\u0434\u0441\u043a\u0430\u0437\u0430\u043d\u0438\u044f        \u043f\u0440\u0438\u043c\u0435\u043d\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u043a \u0434\u0430\u043d\u043d\u044b\u043c \u043e \u041c\u0430\u0440\u043a\u0435 \u0428\u043f\u0438\u0442\u0446\u0435'''     df = swimmer_data()     df['\u0431\u0438\u043d_\u041f\u043e\u043b'] = df['\u041f\u043e\u043b'].map({'\u041c': 1, '\u0416': 0}).astype(int)      df['\u0413\u043e\u0434 \u0440\u043e\u0436\u0434\u0435\u043d\u0438\u044f'] = df['\u0414\u0430\u0442\u0430 \u0440\u043e\u0436\u0434\u0435\u043d\u0438\u044f'].map(str_to_year)     X = df[['\u0420\u043e\u0441\u0442, \u0441\u043c', '\u0431\u0438\u043d_\u041f\u043e\u043b', '\u0413\u043e\u0434 \u0440\u043e\u0436\u0434\u0435\u043d\u0438\u044f']]      X.insert(0, '\u043a\u043e\u043d\u0441\u0442\u0430\u043d\u0442\u0430', 1.0)     y = df['\u0412\u0435\u0441'].apply(np.log)      xspitz = pd.Series([1.0, 183, 1, 1950])  # \u0434\u0430\u043d\u043d\u044b\u0435 \u041c.\u0428\u043f\u0438\u0442\u0446\u0430     return np.exp( prediction_interval(X, y, xspitz) )<\/code><\/pre>\n<pre><code>array([72.74964444, 97.46908087])<\/code><\/pre>\n<p>\u042d\u0442\u043e\u0442 \u043f\u0440\u0438\u043c\u0435\u0440 \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u0434\u0438\u0430\u043f\u0430\u0437\u043e\u043d \u043c\u0435\u0436\u0434\u0443 72.7 \u0438 97.4 \u043a\u0433., \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043a\u0430\u043a \u0440\u0430\u0437 \u0432\u043a\u043b\u044e\u0447\u0430\u0435\u0442 \u0432 \u0441\u0435\u0431\u044f \u0432\u0435\u0441 \u041c\u0430\u0440\u043a\u0430 73 \u043a\u0433., \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043d\u0430\u0448\u0435 \u043f\u0440\u0435\u0434\u0441\u043a\u0430\u0437\u0430\u043d\u0438\u0435 \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u0432 \u043f\u0440\u0435\u0434\u0435\u043b\u0430\u0445 95%-\u043e\u0433\u043e \u0438\u043d\u0442\u0435\u0440\u0432\u0430\u043b\u0430 \u043f\u0440\u0435\u0434\u0441\u043a\u0430\u0437\u0430\u043d\u0438\u044f. \u041f\u0440\u0430\u0432\u0434\u0430 \u043e\u043d\u043e \u043b\u0435\u0436\u0438\u0442 \u043d\u0435\u0443\u0434\u043e\u0431\u043d\u043e \u0431\u043b\u0438\u0437\u043a\u043e \u043a \u0433\u0440\u0430\u043d\u0438\u0446\u0430\u043c \u0434\u0438\u0430\u043f\u0430\u0437\u043e\u043d\u0430.<\/p>\n<h2>\u0413\u0440\u0430\u043d\u0438\u0446\u044b \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f \u043c\u043e\u0434\u0435\u043b\u0438<\/h2>\n<p>\u041c\u0430\u0440\u043a \u0428\u043f\u0438\u0442\u0446 \u0440\u043e\u0434\u0438\u043b\u0441\u044f \u0432 1950 \u0433., \u0437\u0430 \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0434\u0435\u0441\u044f\u0442\u0438\u043b\u0435\u0442\u0438\u0439 \u0434\u043e \u0440\u043e\u0436\u0434\u0435\u043d\u0438\u044f \u0441\u0430\u043c\u044b\u0445 \u0432\u043e\u0437\u0440\u0430\u0441\u0442\u043d\u044b\u0445 \u043f\u043b\u043e\u0432\u0446\u043e\u0432 \u043d\u0430 \u041e\u043b\u0438\u043c\u043f\u0438\u0439\u0441\u043a\u0438\u0445 \u0438\u0433\u0440\u0430\u0445 2012 \u0433. \u041f\u044b\u0442\u0430\u044f\u0441\u044c \u043f\u0440\u0435\u0434\u0441\u043a\u0430\u0437\u0430\u0442\u044c \u0432\u0435\u0441 \u041c\u0430\u0440\u043a\u0430, \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044f \u0435\u0433\u043e \u0433\u043e\u0434 \u0440\u043e\u0436\u0434\u0435\u043d\u0438\u044f, \u043c\u044b \u0432\u0438\u043d\u043e\u0432\u0430\u0442\u044b \u0432 \u0442\u043e\u043c, \u0447\u0442\u043e \u043f\u044b\u0442\u0430\u0435\u043c\u0441\u044f \u044d\u043a\u0441\u0442\u0440\u0430\u043f\u043e\u043b\u0438\u0440\u043e\u0432\u0430\u0442\u044c \u0441\u043b\u0438\u0448\u043a\u043e\u043c \u0434\u0430\u043b\u0435\u043a\u043e \u0437\u0430 \u043f\u0440\u0435\u0434\u0435\u043b\u044b \u043d\u0430\u0448\u0438\u0445 \u0442\u0440\u0435\u043d\u0438\u0440\u043e\u0432\u043e\u0447\u043d\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445. \u041c\u044b \u043f\u0440\u0435\u0432\u044b\u0441\u0438\u043b\u0438 \u0433\u0440\u0430\u043d\u0438\u0446\u044b \u0434\u0435\u0439\u0441\u0442\u0432\u0438\u044f \u043d\u0430\u0448\u0435\u0439 \u043c\u043e\u0434\u0435\u043b\u0438.<\/p>\n<p>\u0415\u0441\u0442\u044c \u0438 \u0432\u0442\u043e\u0440\u0430\u044f \u043f\u0440\u0438\u0447\u0438\u043d\u0430, \u043f\u043e \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u044d\u0442\u043e\u0442 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u0441\u043e\u043f\u0440\u044f\u0436\u0435\u043d \u0441 \u043f\u0440\u043e\u0431\u043b\u0435\u043c\u0430\u043c\u0438. \u041d\u0430\u0448\u0438 \u0434\u0430\u043d\u043d\u044b\u0435 \u043f\u043e\u043b\u043d\u043e\u0441\u0442\u044c\u044e \u043e\u0441\u043d\u043e\u0432\u0430\u043d\u044b \u043d\u0430 \u043f\u043b\u043e\u0432\u0446\u0430\u0445, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0441\u043e\u0440\u0435\u0432\u043d\u0443\u044e\u0442\u0441\u044f \u0432 \u043d\u0430\u0448\u0438 \u0434\u043d\u0438 \u043d\u0430 \u0443\u0440\u043e\u0432\u043d\u0435 \u043c\u0435\u0436\u0434\u0443\u043d\u0430\u0440\u043e\u0434\u043d\u044b\u0445 \u0441\u0442\u0430\u043d\u0434\u0430\u0440\u0442\u043e\u0432, \u0442\u043e\u0433\u0434\u0430 \u043a\u0430\u043a \u041c\u0430\u0440\u043a \u043d\u0435 \u0443\u0447\u0430\u0441\u0442\u0432\u043e\u0432\u0430\u043b \u0432 \u0441\u043e\u0440\u0435\u0432\u043d\u043e\u0432\u0430\u043d\u0438\u044f\u0445 \u0443\u0436\u0435 \u043c\u043d\u043e\u0433\u043e \u043b\u0435\u0442. \u0414\u0440\u0443\u0433\u0438\u043c\u0438 \u0441\u043b\u043e\u0432\u0430\u043c\u0438, \u041c\u0430\u0440\u043a \u0442\u0435\u043f\u0435\u0440\u044c \u043d\u0435 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u0447\u0430\u0441\u0442\u044c\u044e \u043f\u043e\u043f\u0443\u043b\u044f\u0446\u0438\u0438, \u043d\u0430 \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u043c\u044b \u043d\u0430\u0442\u0440\u0435\u043d\u0438\u0440\u043e\u0432\u0430\u043b\u0438 \u043d\u0430\u0448\u0443 \u043c\u043e\u0434\u0435\u043b\u044c. \u0412 \u0446\u0435\u043b\u044f\u0445 \u0438\u0441\u043f\u0440\u0430\u0432\u043b\u0435\u043d\u0438\u044f \u043e\u0431\u0435\u0438\u0445 \u044d\u0442\u0438\u0445 \u043f\u0440\u043e\u0431\u043b\u0435\u043c \u043d\u0430\u043c \u043d\u0443\u0436\u043d\u043e \u043f\u043e\u0438\u0441\u043a\u0430\u0442\u044c \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u0443\u044e \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u044e \u043e \u041c\u0430\u0440\u043a\u0435 \u0432 1979 \u0433., \u043a\u043e\u0433\u0434\u0430 \u043e\u043d \u0435\u0449\u0435 \u0443\u0447\u0430\u0441\u0442\u0432\u043e\u0432\u0430\u043b \u0432 \u0441\u043e\u0440\u0435\u0432\u043d\u043e\u0432\u0430\u043d\u0438\u044f\u0445 \u043f\u043e \u043f\u043b\u0430\u0432\u0430\u043d\u0438\u044e.<\/p>\n<p>\u0421\u043e\u0433\u043b\u0430\u0441\u043d\u043e <a href=\"http:\/\/www.topendsports.com\/athletes\/swimming\/spitz-mark.htm\" rel=\"noopener noreferrer nofollow\">\u0434\u0430\u043d\u043d\u044b\u043c,<\/a> \u0432 1972 \u0433. 22-\u043b\u0435\u0442\u043d\u0438\u0439 \u041c\u0430\u0440\u043a \u0428\u043f\u0438\u0442\u0446 \u0438\u043c\u0435\u043b \u0440\u043e\u0441\u0442 185 \u0441\u043c. \u0438 \u0432\u0435\u0441\u0438\u043b 79 \u043a\u0433.<\/p>\n<p><sup>\u041e\u0442\u0431\u043e\u0440 \u0432\u0435\u0440\u043d\u044b\u0445 \u043f\u0440\u0438\u0437\u043d\u0430\u043a\u043e\u0432 \u2014 \u044d\u0442\u043e \u043e\u0434\u043d\u0430 \u0438\u0437 \u0441\u0430\u043c\u044b\u0445 \u0432\u0430\u0436\u043d\u044b\u0445 \u043f\u0440\u0435\u0434\u043f\u043e\u0441\u044b\u043b\u043e\u043a \u0434\u043b\u044f \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u044f \u0445\u043e\u0440\u043e\u0448\u0438\u0445 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u043e\u0432 \u043e\u0442 \u043b\u044e\u0431\u043e\u0433\u043e \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u0430 \u043f\u0440\u0435\u0434\u0441\u043a\u0430\u0437\u0430\u043d\u0438\u044f.<\/sup><\/p>\n<p>\u0421\u043b\u0435\u0434\u0443\u0435\u0442 \u043e\u0442\u0431\u0438\u0440\u0430\u0442\u044c \u043f\u0440\u0438\u0437\u043d\u0430\u043a\u0438 \u043d\u0435 \u0442\u043e\u043b\u044c\u043a\u043e, \u043e\u043f\u0438\u0440\u0430\u044f\u0441\u044c \u043d\u0430 \u0438\u0445 \u043f\u0440\u0435\u0434\u0441\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u0443\u044e \u0441\u0438\u043b\u0443, \u043d\u043e \u0438 \u043d\u0430 \u0438\u0445 \u0430\u043a\u0442\u0443\u0430\u043b\u044c\u043d\u043e\u0441\u0442\u044c \u0434\u043b\u044f \u043c\u043e\u0434\u0435\u043b\u0438\u0440\u0443\u0435\u043c\u043e\u0439 \u043e\u0431\u043b\u0430\u0441\u0442\u0438.<\/p>\n<h2>\u041e\u043a\u043e\u043d\u0447\u0430\u0442\u0435\u043b\u044c\u043d\u0430\u044f \u043c\u043e\u0434\u0435\u043b\u044c<\/h2>\n<p>\u0425\u043e\u0442\u044f \u043d\u0430\u0448\u0430 \u043c\u043e\u0434\u0435\u043b\u044c \u0438\u043c\u0435\u0435\u0442 \u0447\u0443\u0442\u044c \u0431\u043e\u043b\u0435\u0435 \u043d\u0438\u0437\u043a\u0438\u0439 <em>R<\/em><sup>2<\/sup>, \u0434\u0430\u0432\u0430\u0439\u0442\u0435 \u043d\u0430\u0442\u0440\u0435\u043d\u0438\u0440\u0443\u0435\u043c \u0435\u0435 \u043f\u043e\u0432\u0442\u043e\u0440\u043d\u043e, \u0432\u0437\u044f\u0432 \u0432 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u043f\u0440\u0438\u0437\u043d\u0430\u043a\u0430 \u0432\u043e\u0437\u0440\u0430\u0441\u0442 \u0432\u043c\u0435\u0441\u0442\u043e \u0433\u043e\u0434\u0430 \u0440\u043e\u0436\u0434\u0435\u043d\u0438\u044f. \u042d\u0442\u043e \u043f\u043e\u0437\u0432\u043e\u043b\u0438\u0442 \u043d\u0430\u043c \u043b\u0435\u0433\u043a\u043e \u043f\u0440\u0435\u0434\u0441\u043a\u0430\u0437\u044b\u0432\u0430\u0442\u044c \u0432\u0435\u0441\u0430 \u0434\u043b\u044f \u043f\u0440\u043e\u0448\u043b\u044b\u0445 \u0438 \u0431\u0443\u0434\u0443\u0449\u0438\u0445 \u0440\u0430\u043d\u0435\u0435 \u043d\u0435 \u0432\u0441\u0442\u0440\u0435\u0447\u0430\u0432\u0448\u0438\u0445\u0441\u044f \u0434\u0430\u043d\u043d\u044b\u0445, \u0442.\u043a. \u043e\u043d\u0430 \u0431\u043b\u0438\u0436\u0435 \u043c\u043e\u0434\u0435\u043b\u0438\u0440\u0443\u0435\u0442 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0443\u044e, \u043a\u043e\u0442\u043e\u0440\u0430\u044f, \u043a\u0430\u043a \u043c\u044b \u043f\u043e\u043b\u0430\u0433\u0430\u0435\u043c, \u0438\u043c\u0435\u0435\u0442 \u043f\u0440\u0438\u0447\u0438\u043d\u043d\u043e-\u0441\u043b\u0435\u0434\u0441\u0442\u0432\u0435\u043d\u043d\u0443\u044e \u0441\u0432\u044f\u0437\u044c \u0441 \u0432\u0435\u0441\u043e\u043c.<\/p>\n<p>\u041c\u043e\u0434\u0435\u043b\u044c \u043f\u0440\u043e\u0438\u0437\u0432\u0435\u0434\u0435\u0442 <em>\u03b2&nbsp;<\/em>\u043f\u0440\u0438\u0431\u043b\u0438\u0437\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0441 \u0442\u0430\u043a\u0438\u043c\u0438 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f\u043c\u0438:<\/p>\n<figure class=\"\"><figcaption><\/figcaption><\/figure>\n<p>\u041d\u0430\u0448\u0438 \u043f\u0440\u0438\u0437\u043d\u0430\u043a\u0438 \u0434\u043b\u044f \u041c\u0430\u0440\u043a\u0430 \u043d\u0430 \u0438\u0433\u0440\u0430\u0445 1972 \u0433. \u0442\u0430\u043a\u043e\u0432\u044b:<\/p>\n<figure class=\"\"><figcaption><\/figcaption><\/figure>\n<p>\u042d\u0442\u0438 \u043f\u0440\u0438\u0437\u043d\u0430\u043a\u0438 \u043c\u043e\u0436\u043d\u043e \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c \u0434\u043b\u044f \u043f\u0440\u0435\u0434\u0441\u043a\u0430\u0437\u0430\u043d\u0438\u044f \u0435\u0433\u043e \u0441\u043e\u0440\u0435\u0432\u043d\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0433\u043e \u0432\u0435\u0441\u0430 \u043f\u0440\u0438 \u043f\u043e\u043c\u043e\u0449\u0438 \u043f\u0440\u0438\u0432\u0435\u0434\u0435\u043d\u043d\u043e\u0433\u043e \u043d\u0438\u0436\u0435 \u043f\u0440\u0438\u043c\u0435\u0440\u0430:<\/p>\n<pre><code class=\"python\">def ex_3_32():     '''\u041e\u043a\u043e\u043d\u0447\u0430\u0442\u0435\u043b\u044c\u043d\u0430\u044f \u043c\u043e\u0434\u0435\u043b\u044c \u0434\u043b\u044f \u043f\u0440\u0435\u0434\u0441\u043a\u0430\u0437\u0430\u043d\u0438\u044f         \u0441\u043e\u0440\u0435\u0432\u043d\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u0433\u043e \u0432\u0435\u0441\u0430'''     df = swimmer_data()     df['\u0431\u0438\u043d_\u041f\u043e\u043b'] = df['\u041f\u043e\u043b'].map({'\u041c': 1, '\u0416': 0}).astype(int)      X = df[['\u0420\u043e\u0441\u0442, \u0441\u043c', '\u0431\u0438\u043d_\u041f\u043e\u043b', '\u0412\u043e\u0437\u0440\u0430\u0441\u0442']]      X.insert(0, '\u043a\u043e\u043d\u0441\u0442\u0430\u043d\u0442\u0430', 1.0)     y = df['\u0412\u0435\u0441'].apply(np.log)       beta = linear_model(X, y)     # \u043f\u0440\u0435\u0434\u0441\u043a\u0430\u0437\u0430\u0442\u044c \u0432\u0435\u0441 \u041c\u0430\u0440\u043a\u0430 \u0428\u043f\u0438\u0442\u0446\u0430     xspitz = pd.Series([1.0, 185, 1, 22])      return np.exp( predict(beta, xspitz) )<\/code><\/pre>\n<pre><code>78.46882772630318<\/code><\/pre>\n<p>\u041f\u0440\u0438\u043c\u0435\u0440 \u0432\u043e\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u0447\u0438\u0441\u043b\u043e 78.47, \u0442.\u0435. \u043f\u0440\u0435\u0434\u0441\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u0442 \u0432\u0435\u0441 78.47 \u043a\u0433. \u0422\u0435\u043f\u0435\u0440\u044c \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442 \u043d\u0430\u0445\u043e\u0434\u0438\u0442\u0441\u044f \u043e\u0447\u0435\u043d\u044c \u0431\u043b\u0438\u0437\u043a\u043e \u043a \u0438\u0441\u0442\u0438\u043d\u043d\u043e\u043c\u0443 \u0441\u043e\u0440\u0435\u0432\u043d\u043e\u0432\u0430\u0442\u0435\u043b\u044c\u043d\u043e\u043c\u0443 \u0432\u0435\u0441\u0443 \u041c\u0430\u0440\u043a\u0430, \u0440\u0430\u0432\u043d\u043e\u043c\u0443 79 \u043a\u0433.<\/p>\n<p>\u041f\u0440\u0438\u043c\u0435\u0440\u044b \u0438\u0441\u0445\u043e\u0434\u043d\u043e\u0433\u043e \u043a\u043e\u0434\u0430 \u0434\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u043f\u043e\u0441\u0442\u0430 \u043d\u0430\u0445\u043e\u0434\u044f\u0442\u0441\u044f \u0432 \u043c\u043e\u0435\u043c&nbsp;<a href=\"https:\/\/github.com\/capissimo\/python-for-data-science\" rel=\"noopener noreferrer nofollow\">\u0440\u0435\u043f\u043e<\/a>&nbsp;\u043d\u0430 Github. \u0412\u0441\u0435 \u0438\u0441\u0445\u043e\u0434\u043d\u044b\u0435 \u0434\u0430\u043d\u043d\u044b\u0435 \u0432\u0437\u044f\u0442\u044b \u0432&nbsp;<a href=\"https:\/\/github.com\/clojuredatascience\/ch3-correlation\" rel=\"noopener noreferrer nofollow\">\u0440\u0435\u043f\u043e\u0437\u0438\u0442\u043e\u0440\u0438\u0438<\/a>&nbsp;\u0430\u0432\u0442\u043e\u0440\u0430 \u043a\u043d\u0438\u0433\u0438.&nbsp; <\/p>\n<h2>\u0420\u0435\u0437\u044e\u043c\u0435<\/h2>\n<p>\u0412 \u044d\u0442\u043e\u0439 \u0441\u0435\u0440\u0438\u0438 \u043f\u043e\u0441\u0442\u043e\u0432 \u043c\u044b \u0443\u0437\u043d\u0430\u043b\u0438 \u043e \u0442\u043e\u043c, \u043a\u0430\u043a \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u044f\u0442\u044c \u043d\u0430\u043b\u0438\u0447\u0438\u0435 \u043e\u0431\u0449\u0435\u0439 \u043b\u0438\u043d\u0435\u0439\u043d\u043e\u0439 \u0441\u0432\u044f\u0437\u0438 \u043c\u0435\u0436\u0434\u0443 \u0434\u0432\u0443\u043c\u044f \u0438 \u0431\u043e\u043b\u0435\u0435 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u043c\u0438. \u041c\u044b \u0443\u0432\u0438\u0434\u0435\u043b\u0438, \u043a\u0430\u043a \u0432\u044b\u0440\u0430\u0436\u0430\u0442\u044c \u0441\u0438\u043b\u0443 \u0438\u0445 \u043a\u043e\u0440\u0440\u0435\u043b\u044f\u0446\u0438\u0438 \u043f\u0440\u0438 \u043f\u043e\u043c\u043e\u0449\u0438 \u043a\u043e\u0440\u0440\u0435\u043b\u044f\u0446\u0438\u0438 \u041f\u0438\u0440\u0441\u043e\u043d\u0430 <em>r&nbsp;<\/em>\u0438 \u043d\u0430\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0445\u043e\u0440\u043e\u0448\u043e \u043b\u0438\u043d\u0435\u0439\u043d\u0430\u044f \u043c\u043e\u0434\u0435\u043b\u044c \u043e\u0431\u044a\u044f\u0441\u043d\u044f\u0435\u0442 \u0432\u0430\u0440\u0438\u0430\u0446\u0438\u044e \u043f\u0440\u0438 \u043f\u043e\u043c\u043e\u0449\u0438 \u043a\u043e\u044d\u0444\u0444\u0438\u0446\u0438\u0435\u043d\u0442\u043e\u0432 \u0434\u0435\u0442\u0435\u0440\u043c\u0438\u043d\u0430\u0446\u0438\u0438 <em>R<\/em><sup>2<\/sup><em>&nbsp;<\/em>\u0438 <em>R\u0305<\/em><sup>2<\/sup>. \u041c\u044b \u0442\u0430\u043a\u0436\u0435 \u0432\u044b\u043f\u043e\u043b\u043d\u0438\u043b\u0438 \u043f\u0440\u043e\u0432\u0435\u0440\u043a\u0443 \u0441\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u0433\u0438\u043f\u043e\u0442\u0435\u0437 \u0438 \u0440\u0430\u0441\u0441\u0447\u0438\u0442\u0430\u043b\u0438 \u0438\u043d\u0442\u0435\u0440\u0432\u0430\u043b\u044b \u0443\u0432\u0435\u0440\u0435\u043d\u043d\u043e\u0441\u0442\u0438, \u0447\u0442\u043e\u0431\u044b \u0432\u044b\u0432\u0435\u0441\u0442\u0438 \u0434\u0438\u0430\u043f\u0430\u0437\u043e\u043d \u0438\u0441\u0442\u0438\u043d\u043d\u043e\u0433\u043e \u043f\u043e\u043f\u0443\u043b\u044f\u0446\u0438\u043e\u043d\u043d\u043e\u0433\u043e \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430 <em>\u03c1<\/em> \u0434\u043b\u044f \u043a\u043e\u0440\u0440\u0435\u043b\u044f\u0446\u0438\u0438.<\/p>\n<p>\u041e\u043f\u0440\u0435\u0434\u0435\u043b\u0438\u0432 \u043a\u043e\u0440\u0440\u0435\u043b\u044f\u0446\u0438\u044e \u043c\u0435\u0436\u0434\u0443 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u043c\u0438, \u043c\u044b \u0441\u043c\u043e\u0433\u043b\u0438 \u043f\u043e\u0441\u0442\u0440\u043e\u0438\u0442\u044c \u043f\u0440\u0435\u0434\u0441\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u044c\u043d\u0443\u044e \u043c\u043e\u0434\u0435\u043b\u044c \u0441 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u043d\u0438\u0435\u043c \u0440\u0435\u0433\u0440\u0435\u0441\u0441\u0438\u0438 \u043c\u0435\u0442\u043e\u0434\u043e\u043c \u043e\u0431\u044b\u0447\u043d\u044b\u0445 \u043d\u0430\u0438\u043c\u0435\u043d\u044c\u0448\u0438\u0445 \u043a\u0432\u0430\u0434\u0440\u0430\u0442\u043e\u0432 \u0438 \u043f\u0440\u043e\u0441\u0442\u044b\u0445 \u0444\u0443\u043d\u043a\u0446\u0438\u0439 Python. \u0417\u0430\u0442\u0435\u043c \u043c\u044b \u043e\u0431\u043e\u0431\u0449\u0438\u043b\u0438 \u043d\u0430\u0448 \u043f\u043e\u0434\u0445\u043e\u0434, \u0432\u043e\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0432\u0448\u0438\u0441\u044c \u0434\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u043c\u0430\u0442\u0440\u0438\u0447\u043d\u043e\u0439 \u0444\u0443\u043d\u043a\u0446\u0438\u043e\u043d\u0430\u043b\u044c\u043d\u043e\u0441\u0442\u044c\u044e \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a pandas \u0438 numpy \u0438 \u043d\u043e\u0440\u043c\u0430\u043b\u044c\u043d\u044b\u043c \u0443\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u0435\u043c. \u042d\u0442\u0430 \u043f\u0440\u043e\u0441\u0442\u0430\u044f \u043c\u043e\u0434\u0435\u043b\u044c \u043f\u0440\u043e\u0434\u0435\u043c\u043e\u043d\u0441\u0442\u0440\u0438\u0440\u043e\u0432\u0430\u043b\u0430 \u043f\u0440\u0438\u043d\u0446\u0438\u043f\u044b <em>\u043c\u0430\u0448\u0438\u043d\u043d\u043e\u0433\u043e \u0443\u0441\u0432\u043e\u0435\u043d\u0438\u044f \u0437\u0430\u043a\u043e\u043d\u043e\u043c\u0435\u0440\u043d\u043e\u0441\u0442\u0435\u0439<\/em> \u043f\u0443\u0442\u0435\u043c \u043e\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u044f \u043c\u043e\u0434\u0435\u043b\u044c\u043d\u044b\u0445 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u0432 <em>\u03b2<\/em>, \u0438\u0437\u0432\u043b\u0435\u0447\u0435\u043d\u043d\u044b\u0445 \u0438\u0437 \u0432\u044b\u0431\u043e\u0440\u043e\u0447\u043d\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043c\u043e\u0433\u0443\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c\u0441\u044f \u0434\u043b\u044f \u0432\u044b\u043f\u043e\u043b\u043d\u0435\u043d\u0438\u044f \u043f\u0440\u0435\u0434\u0441\u043a\u0430\u0437\u0430\u043d\u0438\u0439. \u041d\u0430\u0448\u0430 \u043c\u043e\u0434\u0435\u043b\u044c \u0441\u043c\u043e\u0433\u043b\u0430<\/p>\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-323369","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/323369","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=323369"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/323369\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=323369"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=323369"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=323369"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}