{"id":304897,"date":"2020-06-05T15:00:44","date_gmt":"2020-06-05T15:00:44","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=304897"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=304897","title":{"rendered":"\u041c\u0430\u0448\u0438\u043d\u043d\u043e\u0435 \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u0435: \u0441 \u0447\u0435\u0433\u043e \u043d\u0430\u0447\u0430\u0442\u044c \u0438\u043b\u0438 \u043a\u0430\u043a \u043f\u043e\u0441\u0442\u0440\u043e\u0438\u0442\u044c \u043f\u0435\u0440\u0432\u0443\u044e \u043c\u043e\u0434\u0435\u043b\u044c"},"content":{"rendered":"\n<div class=\"post__text post__text-html post__text_v1\" id=\"post-content-body\" data-io-article-url=\"https:\/\/habr.com\/ru\/post\/505516\/\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/cn\/mg\/fr\/cnmgfrvs-ej5ldlqz9cmmdjdcrk.png\"><\/p>\n<p>  \u0412 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u043f\u0435\u0440\u0432\u043e\u0439 \u0437\u0430\u0434\u0430\u0447\u0438 \u0434\u043b\u044f \u043c\u0430\u0448\u0438\u043d\u043d\u043e\u0433\u043e \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f \u0432\u043e\u0437\u044c\u043c\u0435\u043c \u0447\u0442\u043e-\u0442\u043e \u043f\u043e\u043d\u044f\u0442\u043d\u043e\u0435 \u0438 \u043f\u0440\u043e\u0441\u0442\u043e\u0435, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043f\u0440\u043e\u0433\u043d\u043e\u0437 \u0441\u0442\u043e\u0438\u043c\u043e\u0441\u0442\u0438 \u0436\u0438\u043b\u044c\u044f. \u0413\u043e\u0442\u043e\u0432\u044b\u0439 \u0434\u0430\u0442\u0430\u0441\u0435\u0442 \u043c\u043e\u0436\u043d\u043e \u043d\u0430\u0439\u0442\u0438 \u043d\u0430 \u0441\u0430\u0439\u0442\u0435 kaggle. \u041d\u0430 \u043f\u0435\u0440\u0432\u044b\u0445 \u0448\u0430\u0433\u0430\u0445 \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f \u043d\u0435 \u0441\u0442\u043e\u0438\u0442 \u0431\u0440\u0430\u0442\u044c \u0434\u0430\u0442\u0430\u0441\u0435\u0442\u044b \u0441 \u0431\u043e\u043b\u044c\u0448\u0438\u043c \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e\u043c \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u00abHouse Prices: Advanced Regression Techniques\u00bb \u0441\u043e\u0441\u0442\u043e\u0438\u0442 \u0438\u0437 80 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445 \u0438 advanced regression, \u043e\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u043c\u0441\u044f \u043d\u0430 \u00abHouse Sales in King County, USA\u00bb \u0441 21 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u043c. \u0421\u043a\u0430\u0447\u0438\u0432\u0430\u0435\u043c \u0434\u0430\u043d\u043d\u044b\u0435 \u0438 \u0430\u043d\u0430\u043b\u0438\u0437\u0438\u0440\u0443\u0435\u043c \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u043d\u043e\u0435 \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0435. \u0412 \u043d\u0430\u043b\u0438\u0447\u0438\u0438 \u0434\u0430\u0442\u0430, \u0446\u0435\u043d\u0430, \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0441\u043f\u0430\u043b\u0435\u043d, \u0432\u0430\u043d\u043d\u044b\u0445 \u043a\u043e\u043c\u043d\u0430\u0442, \u043e\u0431\u0449\u0430\u044f \u0438 \u0436\u0438\u043b\u0430\u044f \u043f\u043b\u043e\u0449\u0430\u0434\u044c, \u044d\u0442\u0430\u0436\u043d\u043e\u0441\u0442\u044c, \u043e\u0446\u0435\u043d\u043a\u0430 \u0432\u0438\u0434\u0430, \u0432\u0438\u0434 \u043d\u0430 \u043c\u043e\u0440\u0435, \u043e\u0446\u0435\u043d\u043a\u0430 \u043e\u0431\u0449\u0435\u0433\u043e \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u044f, \u0433\u0440\u0435\u0439\u0434 (\u043e\u0446\u0435\u043d\u043a\u0430 \u0441\u0442\u0440\u043e\u0438\u0442\u0435\u043b\u044c\u0441\u0442\u0432\u0430 \u0438 \u0434\u0438\u0437\u0430\u0439\u043d\u0430), \u043f\u043b\u043e\u0449\u0430\u0434\u044c \u043d\u0430\u0434 \u0438 \u043f\u043e\u0434 \u0443\u0440\u043e\u0432\u043d\u0435\u043c \u0437\u0435\u043c\u043b\u0438, \u0433\u043e\u0434 \u043f\u043e\u0441\u0442\u0440\u043e\u0439\u043a\u0438, \u0433\u043e\u0434 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0435\u0433\u043e \u0440\u0435\u043c\u043e\u043d\u0442\u0430, \u043a\u043e\u0434 \u0437\u043e\u043d\u044b, \u043a\u043e\u043e\u0440\u0434\u0438\u043d\u0430\u0442\u044b (\u0434\u043e\u043b\u0433\u043e\u0442\u0430 \u0438 \u0448\u0438\u0440\u043e\u0442\u0430), \u0434\u0430\u043d\u043d\u044b\u0435 \u043e \u043f\u043b\u043e\u0449\u0430\u0434\u0438 \u0434\u043e\u043c\u043e\u0432 15 \u0441\u043e\u0441\u0435\u0434\u0435\u0439.<\/p>\n<p>  \u0418\u0442\u0430\u043a, \u043c\u044b \u0432\u044b\u0431\u0440\u0430\u043b\u0438 \u0437\u0430\u0434\u0430\u0447\u0443 \u0438 \u0433\u043e\u0442\u043e\u0432\u044b \u043f\u0440\u0438\u0441\u0442\u0443\u043f\u0438\u0442\u044c \u043a \u0435\u0435 \u0440\u0435\u0448\u0435\u043d\u0438\u044e. \u0420\u0435\u0448\u0435\u043d\u0438\u0435 \u0431\u0443\u0434\u0435\u0442 \u0432\u043a\u043b\u044e\u0447\u0430\u0442\u044c \u0434\u0432\u0430 \u044d\u0442\u0430\u043f\u0430: \u0430\u043d\u0430\u043b\u0438\u0437 \u0434\u0430\u043d\u043d\u044b\u0445 \u0438 \u043f\u043e\u0441\u0442\u0440\u043e\u0435\u043d\u0438\u0435 \u043c\u043e\u0434\u0435\u043b\u0435\u0439.<\/p>\n<p>  1. \u0420\u0430\u0431\u043e\u0442\u0430 \u0441 \u0434\u0430\u043d\u043d\u044b\u043c\u0438.<\/p>\n<p>  \u0421\u0434\u0435\u043b\u0430\u0435\u043c \u043e\u0442\u0441\u0442\u0443\u043f\u043b\u0435\u043d\u0438\u0435 \u0438 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e \u043e\u0442\u043c\u0435\u0442\u0438\u043c \u0432\u0430\u0436\u043d\u043e\u0441\u0442\u044c \u0430\u043d\u0430\u043b\u0438\u0437\u0430 \u0434\u0430\u043d\u043d\u044b\u0445. \u0412 \u043d\u0430\u0441\u0442\u043e\u044f\u0449\u0438\u0439 \u043c\u043e\u043c\u0435\u043d\u0442 \u0432\u0441\u0435 \u0431\u043e\u043b\u0435\u0435-\u043c\u0435\u043d\u0435\u0435 \u043f\u043e\u043f\u0443\u043b\u044f\u0440\u043d\u044b\u0435 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u044b \u0443\u0436\u0435 \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u044b \u0432 \u0432\u0438\u0434\u0435 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a \u0438 \u043d\u0435\u043f\u043e\u0441\u0440\u0435\u0434\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u0435 \u043f\u043e\u0441\u0442\u0440\u043e\u0435\u043d\u0438\u0435 \u043c\u043e\u0434\u0435\u043b\u0438 \u0441\u0432\u043e\u0434\u0438\u0442\u0441\u044f \u043a \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u043c \u0441\u0442\u0440\u043e\u043a\u0430\u043c \u043a\u043e\u0434\u0430, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, k-\u0431\u043b\u0438\u0436\u0430\u0439\u0448\u0438\u0445 \u0441\u043e\u0441\u0435\u0434\u0435\u0439 \u0438\u0437 sklearn \u0432 python: <a name=\"habracut\"><\/a><\/p>\n<pre><code class=\"python\">from sklearn .neighbors import KNeighborsClassifier clf_KNN = KNeighborsClassifier()       #\u0421\u043e\u0437\u0434\u0430\u0435\u043c \u043c\u043e\u0434\u0435\u043b\u044c clf_KNN.fit(X_train, Y_train)          #\u041e\u0431\u0443\u0447\u0430\u0435\u043c \u043c\u043e\u0434\u0435\u043b\u044c Y_KNN = clf_KNN.predict(X_test)        #\u041f\u0440\u0435\u0434\u0441\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u043c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0434\u043b\u044f \u0432\u044b\u0431\u043e\u0440\u043a\u0438 <\/code><\/pre>\n<p>  \u0412\u0441\u0435\u0433\u043e \u0447\u0435\u0442\u044b\u0440\u0435 \u0441\u0442\u0440\u043e\u0447\u043a\u0438 \u043a\u043e\u0434\u0430 \u0434\u043b\u044f \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u044f \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0430. \u0422\u0430\u043a \u0432 \u0447\u0435\u043c \u0436\u0435 \u0441\u043b\u043e\u0436\u043d\u043e\u0441\u0442\u044c? \u0421\u043b\u043e\u0436\u043d\u043e\u0441\u0442\u044c \u0437\u0430\u043a\u043b\u044e\u0447\u0430\u0435\u0442\u0441\u044f \u0432 \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u0438\u0438 \u0442\u043e\u0433\u043e \u0441\u0430\u043c\u043e\u0433\u043e X_train \u2013 \u0434\u0430\u043d\u043d\u044b\u0445, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043f\u043e\u0434\u0430\u044e\u0442\u0441\u044f \u043d\u0430 \u0432\u0445\u043e\u0434 \u043c\u043e\u0434\u0435\u043b\u0438. \u0418\u0437\u0432\u0435\u0441\u0442\u043d\u044b\u0439 \u043f\u0440\u0438\u043d\u0446\u0438\u043f \u00ab\u043c\u0443\u0441\u043e\u0440 \u043d\u0430 \u0432\u0445\u043e\u0434\u0435\u00bb = \u00ab\u043c\u0443\u0441\u043e\u0440 \u043d\u0430 \u0432\u044b\u0445\u043e\u0434\u0435\u00bb (\u0410\u043d\u0433\u043b. Garbage in \u2013 garbage out (GIGO)) \u0432 \u043c\u043e\u0434\u0435\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0438 \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0431\u043e\u043b\u0435\u0435 \u0447\u0435\u043c \u043d\u0430 100% \u0438 \u0438\u043c\u0435\u043d\u043d\u043e \u043e\u0442 \u0440\u0430\u0431\u043e\u0442\u044b \u0441 \u0434\u0430\u043d\u043d\u044b\u043c\u0438 \u0432\u043e \u043c\u043d\u043e\u0433\u043e\u043c \u0431\u0443\u0434\u0435\u0442 \u0437\u0430\u0432\u0438\u0441\u0435\u0442\u044c \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u043e \u043f\u043e\u043b\u0443\u0447\u0435\u043d\u043d\u043e\u0433\u043e \u0440\u0435\u0448\u0435\u043d\u0438\u044f \u0437\u0430\u0434\u0430\u0447\u0438 \u043c\u0430\u0448\u0438\u043d\u043d\u043e\u0433\u043e \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f.<\/p>\n<p>  \u0410 \u0442\u0435\u043f\u0435\u0440\u044c \u2013 \u0432 \u0431\u043e\u0439!<\/p>\n<p>  \u0414\u043b\u044f \u0430\u043d\u0430\u043b\u0438\u0437\u0430 \u0434\u0430\u043d\u043d\u044b\u0445 \u043c\u044b \u0431\u0443\u0434\u0435\u043c \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c pandas, \u0434\u043b\u044f \u043f\u043e\u043d\u0438\u043c\u0430\u043d\u0438\u044f \u0438 \u043e\u0446\u0435\u043d\u043a\u0438 \u00ab\u043d\u0430 \u0433\u043b\u0430\u0437\u00bb \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c \u043f\u0440\u043e\u0441\u0442\u044b\u0435 \u0433\u0440\u0430\u0444\u0438\u043a\u0438 \u0438\u0437 seaborn.<\/p>\n<p>  \u0418\u043c\u043f\u043e\u0440\u0442\u0438\u0440\u0443\u0435\u043c \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0438, \u0447\u0438\u0442\u0430\u0435\u043c \u0434\u0430\u043d\u043d\u044b\u0435, \u0432\u044b\u0432\u0435\u0434\u0435\u043c \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u043e \u0437\u0430\u043f\u0438\u0441\u0435\u0439 \u0438\u0437 \u043c\u0430\u0441\u0441\u0438\u0432\u0430 \u0434\u0430\u043d\u043d\u044b\u0445, \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u043d\u0430 \u0442\u0438\u043f\u044b \u0434\u0430\u043d\u043d\u044b\u0445 \u0438 \u043f\u0440\u043e\u043f\u0443\u0441\u043a\u0438 \u0432 \u043d\u0438\u0445.<\/p>\n<p>  \u041a\u043e\u0434 \u0438 Out<\/p>\n<pre><code class=\"python\">import pandas as pd import matplotlib.pyplot as plt import seaborn as sns df = pd.read_csv('\u2026\/train.csv') df.head(5)<\/code><\/pre>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/1q\/cy\/og\/1qcyogx0fmdgtibrhx1l2b5mdty.png\"><\/p>\n<pre><code class=\"python\">df.info()<\/code><\/pre>\n<p>  <\/p>\n<pre><code class=\"plaintext\">RangeIndex: 21613 entries, 0 to 21612 Data columns (total 21 columns): id 21613 non-null int64 date 21613 non-null object price 21613 non-null float64 bedrooms 21613 non-null int64 bathrooms 21613 non-null float64 sqft_living 21613 non-null int64 sqft_lot 21613 non-null int64 floors 21613 non-null float64 waterfront 21613 non-null int64 view 21613 non-null int64 condition 21613 non-null int64 grade 21613 non-null int64 sqft_above 21613 non-null int64 sqft_basement 21613 non-null int64 yr_built 21613 non-null int64 yr_renovated 21613 non-null int64 zipcode 21613 non-null int64 lat 21613 non-null float64 long 21613 non-null float64 sqft_living15 21613 non-null int64 sqft_lot15 21613 non-null int64 dtypes: float64(5), int64(15), object(1) memory usage: 3.5+ MB<\/code><\/pre>\n<p>  \u041c\u0430\u0441\u0441\u0438\u0432 \u0434\u0430\u043d\u043d\u044b\u0445 \u0441\u043e\u0441\u0442\u043e\u0438\u0442 \u0438\u0437 21613 \u0437\u0430\u043f\u0438\u0441\u0435\u0439 \u0431\u0435\u0437 \u043f\u0440\u043e\u043f\u0443\u0441\u043a\u043e\u0432 \u0432 \u0434\u0430\u043d\u043d\u044b\u0445 \u0438 \u0441\u043e\u0434\u0435\u0440\u0436\u0438\u0442 \u0442\u043e\u043b\u044c\u043a\u043e 1 \u0442\u0435\u043a\u0441\u0442\u043e\u0432\u043e\u0435 \u043f\u043e\u043b\u0435 date.<\/p>\n<p>  \u0421 \u043a\u0430\u0436\u0434\u044b\u043c \u043f\u0440\u0438\u0437\u043d\u0430\u043a\u043e\u043c \u043f\u043e\u0440\u0430\u0431\u043e\u0442\u0430\u0435\u043c \u043f\u043e\u0434\u0440\u043e\u0431\u043d\u0435\u0435 \u0438 \u043d\u0430\u0447\u043d\u0435\u043c \u0441 \u0441\u0430\u043c\u043e\u0433\u043e \u043f\u0440\u043e\u0441\u0442\u043e\u0433\u043e \u2013 \u043e\u0442\u043a\u0438\u043d\u0435\u043c id (\u043d\u0435 \u043d\u0435\u0441\u0435\u0442 \u043f\u043e\u043b\u0435\u0437\u043d\u043e\u0439 \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0446\u0438\u0438), zipcode (\u043a\u043e\u0434 \u0437\u043e\u043d\u044b, \u0433\u0434\u0435 \u0440\u0430\u0441\u043f\u043e\u043b\u043e\u0436\u0435\u043d \u0434\u043e\u043c) \u0438 \u043a\u043e\u043e\u0440\u0434\u0438\u043d\u0430\u0442\u044b (lat &amp; long), \u0442\u0430\u043a \u043a\u0430\u043a \u043c\u044b \u0442\u043e\u043b\u044c\u043a\u043e \u0437\u043d\u0430\u043a\u043e\u043c\u0438\u043c\u0441\u044f c machine learning, \u0430 \u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u043e\u0435 \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u043d\u0438\u0435 \u0433\u0435\u043e\u0433\u0440\u0430\u0444\u0438\u0447\u0435\u0441\u043a\u0438\u0445 \u0434\u0430\u043d\u043d\u044b\u0445 \u0441\u043b\u0438\u0448\u043a\u043e\u043c \u0441\u043f\u0435\u0446\u0438\u0444\u0438\u0447\u043d\u043e \u0434\u043b\u044f \u043d\u0430\u0447\u0438\u043d\u0430\u044e\u0449\u0435\u0433\u043e \u0441\u043f\u0435\u0446\u0438\u0430\u043b\u0438\u0441\u0442\u0430.<\/p>\n<pre><code class=\"python\">df=df.drop(['id','zipcode','lat','long'], axis=1)<\/code><\/pre>\n<p>  \u0422\u0435\u043f\u0435\u0440\u044c \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u043d\u0430 \u0434\u0430\u0442\u0443 \u043e\u0431\u044a\u044f\u0432\u043b\u0435\u043d\u0438\u044f. \u0424\u043e\u0440\u043c\u0430\u0442 \u0434\u0430\u0442\u044b \u0437\u0430\u0434\u0430\u043d YYYYMMDDT000000, \u0432 \u0446\u0435\u043b\u043e\u043c \u0435\u0435 \u0442\u043e\u0436\u0435 \u043c\u043e\u0436\u043d\u043e \u0431\u044b\u043b\u043e \u0431\u044b \u0443\u0434\u0430\u043b\u0438\u0442\u044c \u0438\u0437 \u0434\u0430\u0442\u0430\u0441\u0435\u0442\u0430, \u043d\u043e \u0443 \u043d\u0430\u0441 \u0435\u0441\u0442\u044c \u043f\u043e\u043b\u044f \u0433\u043e\u0434 \u043f\u043e\u0441\u0442\u0440\u043e\u0439\u043a\u0438 (yr_built) \u0438 \u0433\u043e\u0434 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0435\u0433\u043e \u0440\u0435\u043c\u043e\u043d\u0442\u0430 (yr_renovated), \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u0437\u0430\u0434\u0430\u043d\u044b \u0432 \u0432 \u0444\u043e\u0440\u043c\u0430\u0442\u0435 \u0433\u043e\u0434\u0430 (YYYY), \u0447\u0442\u043e \u043d\u0435 \u043e\u0447\u0435\u043d\u044c \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0442\u0438\u0432\u043d\u043e. \u041e\u043f\u0435\u0440\u0438\u0440\u0443\u044f \u0434\u0430\u0442\u043e\u0439 \u043e\u0431\u044a\u044f\u0432\u043b\u0435\u043d\u0438\u044f \u043c\u043e\u0436\u043d\u043e \u043f\u0440\u0435\u043e\u0431\u0440\u0430\u0437\u043e\u0432\u0430\u0442\u044c \u0433\u043e\u0434 \u0432 \u0432\u043e\u0437\u0440\u0430\u0441\u0442 \u0432\u044b\u0447\u0438\u0442\u0430\u043d\u0438\u0435\u043c (\u0433\u043e\u0434 \u043e\u0431\u044a\u044f\u0432\u043b\u0435\u043d\u0438\u044f \u2014 \u0433\u043e\u0434 \u043f\u043e\u0441\u0442\u0440\u043e\u0439\u043a\u0438 \/ \u0433\u043e\u0434 \u0440\u0435\u043c\u043e\u043d\u0442\u0430). \u041e\u0442\u043c\u0435\u0442\u0438\u043c \u043f\u043e \u0447\u0430\u0441\u0442\u0438 \u0434\u043e\u043c\u043e\u0432 \u0433\u043e\u0434 \u0440\u0435\u043c\u043e\u043d\u0442\u0430 \u0441\u0442\u043e\u0438\u0442 0, \u0438, \u043f\u0440\u0435\u0434\u043f\u043e\u043b\u043e\u0436\u0438\u0432, \u0447\u0442\u043e \u044d\u0442\u043e \u043e\u0437\u043d\u0430\u0447\u0430\u0435\u0442 \u043e\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0438\u0435 \u0440\u0435\u043c\u043e\u043d\u0442\u0430 \u0441 \u043f\u043e\u0441\u0442\u0440\u043e\u0439\u043a\u0438, \u0437\u0430\u043c\u0435\u043d\u0438\u043c \u043d\u0443\u043b\u0438 \u0432 \u0433\u043e\u0434\u0443 \u0440\u0435\u043c\u043e\u043d\u0442\u0430 \u043d\u0430 \u0433\u043e\u0434 \u043f\u043e\u0441\u0442\u0440\u043e\u0439\u043a\u0438, \u043f\u0440\u0435\u0434\u0432\u0430\u0440\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u0443\u0431\u0435\u0434\u0438\u0432\u0448\u0438\u0441\u044c, \u0447\u0442\u043e \u0432 \u0434\u0430\u043d\u043d\u044b\u0445 \u043e\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0443\u044e\u0442 \u043d\u0435\u043a\u043e\u0440\u0440\u0435\u043a\u0442\u043d\u044b\u0435 \u0437\u0430\u043f\u0438\u0441\u0438, \u0433\u0434\u0435 \u0433\u043e\u0434 \u0440\u0435\u043c\u043e\u043d\u0442\u0430 \u043c\u0435\u043d\u044c\u0448\u0435 \u0433\u043e\u0434\u0430 \u043f\u043e\u0441\u0442\u0440\u043e\u0439\u043a\u0438:<\/p>\n<pre><code class=\"python\">df[(df['yr_renovated']&lt;df['yr_built'])&amp;df['yr_renovated']!=0]<\/code><\/pre>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/l7\/wo\/ii\/l7woii1rk3buxzexbab2i4uokmq.png\"><\/p>\n<pre><code class=\"python\">df.loc[df['yr_renovated']==0, ['yr_renovated']]=df['yr_built'] df['yr_built']=df['date'].str[0:4].astype(int)-df['yr_built'] df['yr_renovated']=df['date'].str[0:4].astype(int)-df['yr_renovated'] df=df.drop('date', axis=1) df.head(5)<\/code><\/pre>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/4z\/za\/uw\/4zzauwyidq18e0lq_8x5-up5e88.png\"><\/p>\n<p>  \u0421\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u043c \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u043c \u043f\u0440\u043e\u0430\u043d\u0430\u043b\u0438\u0437\u0438\u0440\u0443\u0435\u043c \u0446\u0435\u043d\u0443 \u0438 \u0432\u043e\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u0435\u043c\u0441\u044f \u0434\u043b\u044f \u044d\u0442\u043e\u0433\u043e \u00ab\u042f\u0449\u0438\u043a\u043e\u043c \u0441 \u0443\u0441\u0430\u043c\u0438\u00bb (Box plot). \u042f\u0449\u0438\u043a \u0441 \u0443\u0441\u0430\u043c\u0438 \u2013 \u043f\u0440\u043e\u0441\u0442\u043e\u0439 \u0438 \u0443\u0434\u043e\u0431\u043d\u044b\u0439 \u0433\u0440\u0430\u0444\u0438\u043a, \u043f\u043e\u043a\u0430\u0437\u044b\u0432\u0430\u044e\u0449\u0438\u0439 \u043e\u0434\u043d\u043e\u043c\u0435\u0440\u043d\u043e\u0435 \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u0432\u0435\u0440\u043e\u044f\u0442\u043d\u043e\u0441\u0442\u0435\u0439, \u0438\u043b\u0438, \u043f\u0440\u043e\u0449\u0435 \u0433\u043e\u0432\u043e\u0440\u044f, \u043a\u043e\u043d\u0446\u0435\u043d\u0442\u0440\u0430\u0446\u0438\u044e \u0434\u0430\u043d\u043d\u044b\u0445. \u041e\u0442\u0440\u0438\u0441\u043e\u0432\u044b\u0432\u0430\u0435\u0442 \u043c\u0435\u0434\u0438\u0430\u043d\u0443 (\u043b\u0438\u043d\u0438\u044f \u0432 \u0446\u0435\u043d\u0442\u0440\u0435), \u0432\u0435\u0440\u0445\u043d\u0438\u0439 \u0438 \u043d\u0438\u0436\u043d\u0438\u0439 \u043a\u0432\u0430\u0440\u0442\u0438\u043b\u0438 (\u0441\u0442\u043e\u0440\u043e\u043d\u044b \u044f\u0449\u0438\u043a\u0430), \u043a\u0440\u0430\u044f \u0441\u0442\u0430\u0442\u0438\u0441\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u0437\u043d\u0430\u0447\u0438\u043c\u043e\u0439 \u0432\u044b\u0431\u043e\u0440\u043a\u0438 (\u00ab\u0443\u0441\u044b\u00bb) \u0438 \u0432\u044b\u0431\u0440\u043e\u0441\u044b (\u0442\u043e\u0447\u043a\u0438 \u0437\u0430 \u00ab\u0443\u0441\u0430\u043c\u0438\u00bb). \u041b\u0435\u0433\u043a\u043e \u043f\u043e\u043d\u044f\u0442\u044c \u043f\u043e \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0435 \u043d\u0430 \u043d\u043e\u0440\u043c\u0430\u043b\u044c\u043d\u043e\u043c \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0438 (\u0441\u043f\u0440\u0430\u0432\u0430). \u0413\u0440\u0430\u0444\u0438\u043a \u043f\u043e\u0437\u0432\u043e\u043b\u044f\u0435\u0442 \u0431\u044b\u0441\u0442\u0440\u043e \u043e\u0446\u0435\u043d\u0438\u0442\u044c \u0433\u0434\u0435 \u0440\u0430\u0441\u043f\u043e\u043b\u0430\u0433\u0430\u0435\u0442\u0441\u044f \u0431\u043e\u043b\u044c\u0448\u0430\u044f \u0447\u0430\u0441\u0442\u044c \u0434\u0430\u043d\u043d\u044b\u0445 (50% \u043d\u0430\u0445\u043e\u0434\u044f\u0442\u0441\u044f \u0432\u043d\u0443\u0442\u0440\u0438 \u044f\u0449\u0438\u043a\u0430), \u0438\u0445 \u0441\u0438\u043c\u043c\u0435\u0442\u0440\u0438\u0447\u043d\u043e\u0441\u0442\u044c (\u0441\u043c\u0435\u0449\u0435\u043d\u0438\u0435 \u043c\u0435\u0434\u0438\u0430\u043d\u044b \u043a \u043e\u0434\u043d\u043e\u0439 \u0438\u0437 \u0441\u0442\u043e\u0440\u043e\u043d \u044f\u0449\u0438\u043a\u0430 \u0438\/\u0438\u043b\u0438 \u0434\u043b\u0438\u043d\u0430 \u00ab\u0443\u0441\u043e\u0432\u00bb) \u0438 \u0441\u0442\u0435\u043f\u0435\u043d\u044c \u0440\u0430\u0437\u0431\u0440\u043e\u0441\u0430 \u2013 \u0434\u0438\u0441\u043f\u0435\u0440\u0441\u0438\u044e (\u0440\u0430\u0437\u043c\u0435\u0440\u044b \u044f\u0449\u0438\u043a\u0430, \u0440\u0430\u0437\u043c\u0435\u0440\u044b \u0443\u0441\u043e\u0432 \u0438 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0442\u043e\u0447\u0435\u043a-\u0432\u044b\u0431\u0440\u043e\u0441\u043e\u0432).<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/bi\/bh\/uw\/bibhuwyeeexpszcl7sahfpdo8le.png\"><\/p>\n<p>  \u041c\u043e\u0436\u043d\u043e \u043f\u043e\u0441\u0442\u0440\u043e\u0438\u0442\u044c \u0440\u0430\u0441\u043f\u0440\u0435\u0434\u0435\u043b\u0435\u043d\u0438\u0435 \u0442\u043e\u043b\u044c\u043a\u043e \u044d\u0442\u043e\u0433\u043e \u043f\u0440\u0438\u0437\u043d\u0430\u043a\u0430 \u043f\u043e \u0432\u0441\u0435\u043c\u0443 \u043c\u0430\u0441\u0441\u0438\u0432\u0443, \u043d\u043e \u0438\u043d\u0444\u043e\u0440\u043c\u0430\u0442\u0438\u0432\u043d\u0435\u0435 \u0431\u0443\u0434\u0435\u0442 \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u043e\u0432\u0430\u0442\u044c 2 \u043e\u0441\u0438 \u2013 \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u0446\u0435\u043d\u0443 \u0438 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0441\u043f\u0430\u043b\u0435\u043d, \u0447\u0442\u043e \u0432 \u0441\u0432\u043e\u044e \u043e\u0447\u0435\u0440\u0435\u0434\u044c \u0442\u0430\u043a\u0436\u0435 \u043f\u043e\u043a\u0430\u0436\u0435\u0442 \u043d\u0430\u043b\u0438\u0447\u0438\u0435 \u0441\u0432\u044f\u0437\u0438 \u043c\u0435\u0436\u0434\u0443 \u043f\u0440\u0438\u0437\u043d\u0430\u043a\u0430\u043c\u0438:<\/p>\n<pre><code class=\"python\">sns.boxplot(y='price', data=df)\t\t\t#\u0442\u043e\u043b\u044c\u043a\u043e price sns.boxplot(y='price', x='bedrooms', data=df)\t#price &amp; bedrooms<\/code><\/pre>\n<p>  Out price &amp; bedrooms:<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/za\/oh\/ta\/zaohtajsfsedoz8lagkzjto-oa0.png\"><\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/fn\/em\/4g\/fnem4gwwbubwzkrhi25i4ly3j4k.png\"><\/p>\n<p>  \u0418\u0437 \u0433\u0440\u0430\u0444\u0438\u043a\u0430 \u0441\u0440\u0430\u0437\u0443 \u0432\u0438\u0434\u043d\u043e \u043d\u0430\u043b\u0438\u0447\u0438\u0435 \u044d\u043a\u0441\u0442\u0440\u0435\u043c\u0430\u043b\u044c\u043d\u044b\u0445 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439 price \u0438 bedrooms (\u0442\u043e\u043b\u044c\u043a\u043e \u043f\u0440\u0435\u0434\u0441\u0442\u0430\u0432\u044c\u0442\u0435 \u0434\u043e\u043c \u0441 33 \u0441\u043f\u0430\u043b\u044c\u043d\u044f\u043c\u0438! J). \u041d\u0430\u043b\u0438\u0447\u0438\u0435 \u0442\u0430\u043a\u0438\u0445 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439 (\u0438\u043d\u0430\u0447\u0435 \u043d\u0430\u0437\u044b\u0432\u0430\u0435\u043c\u044b\u0445 \u043a\u0430\u043a \u0432\u044b\u0431\u0440\u043e\u0441\u044b) \u0432 \u0446\u0435\u043b\u0435\u0432\u043e\u043c \u043f\u0440\u0438\u0437\u043d\u0430\u043a\u0435 price \u0447\u0430\u0441\u0442\u043e \u043f\u0440\u0438\u0432\u043e\u0434\u0438\u0442 \u043a \u043f\u0435\u0440\u0435\u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044e \u043c\u043e\u0434\u0435\u043b\u0438, \u0442\u0430\u043a \u0438\u043c\u0435\u043d\u043d\u043e \u043e\u043d\u0438 \u0431\u0443\u0434\u0443\u0442 \u0434\u0430\u0432\u0430\u0442\u044c \u0431\u043e\u043b\u044c\u0448\u0443\u044e \u043e\u0448\u0438\u0431\u043a\u0443, \u043a\u043e\u0442\u043e\u0440\u0443\u044e \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u044b \u0441\u0442\u0430\u0440\u0430\u044e\u0442\u0441\u044f \u043c\u0438\u043d\u0438\u043c\u0438\u0437\u0438\u0440\u043e\u0432\u0430\u0442\u044c. \u0418\u0437 \u0433\u0440\u0430\u0444\u0438\u043a\u0430 \u0432\u0438\u0434\u043d\u043e, \u0447\u0442\u043e \u0431\u043e\u043b\u044c\u0448\u0430\u044f \u0447\u0430\u0441\u0442\u044c (\u0435\u0441\u043b\u0438 \u043f\u043e\u0441\u0447\u0438\u0442\u0430\u0442\u044c \u2013 93,22%) \u043b\u0435\u0436\u0438\u0442 \u0432 \u0434\u0438\u0430\u043f\u0430\u0437\u043e\u043d\u0435 0-1\u043c\u043b\u043d, \u0430 \u0441\u0432\u044b\u0448\u0435 2\u043c\u043b\u043d \u2013 \u0432\u0441\u0435\u0433\u043e 198 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439 (0,92%). \u041e\u0442 1% \u0434\u0430\u0442\u0430\u0441\u0435\u0442\u0430 \u043c\u043e\u0436\u043d\u043e \u0438\u0437\u0431\u0430\u0432\u0438\u0442\u044c\u0441\u044f \u043f\u0440\u0430\u043a\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u0431\u0435\u0437\u0431\u043e\u043b\u0435\u0437\u043d\u0435\u043d\u043d\u043e, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0432\u044b\u0437\u0432\u0430\u0432 \u043f\u0440\u043e\u0441\u0442\u043e\u0439 \u043f\u0440\u043e\u0441\u043c\u043e\u0442\u0440 217 \u0437\u0430\u043f\u0438\u0441\u0435\u0439 \u043f\u0440\u0435\u0434\u0432\u0430\u0440\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u043e\u0442\u0441\u043e\u0440\u0442\u0438\u0440\u043e\u0432\u0430\u0432 \u043f\u043e \u0446\u0435\u043d\u0435, \u0443\u0432\u0438\u0434\u0438\u043c \u0438\u0441\u043a\u043e\u043c\u0443\u044e \u043e\u0442\u043c\u0435\u0442\u043a\u0443 price \u0432 1 965 000 \u0438 \u0443\u0434\u0430\u043b\u0438\u043c \u0432\u0441\u0435 \u0447\u0442\u043e \u0432\u044b\u0448\u0435 \u044d\u0442\u043e\u0439 \u0446\u0435\u043d\u044b.<\/p>\n<pre><code class=\"python\">df.sort_values (by='price', ascending=False).head(217)  df=df[df['price']&lt;=1965000]<\/code><\/pre>\n<p>  \u041f\u043e\u0434\u0443\u043c\u0430\u0435\u043c \u043d\u0435\u043c\u043d\u043e\u0433\u043e \u043d\u0430\u0434 \u043f\u0440\u0438\u0437\u043d\u0430\u043a\u043e\u043c bedrooms. \u041c\u044b \u0432\u0438\u0434\u0438\u043c 13 \u0434\u043e\u043c\u043e\u0432 \u0441 bedrooms = 0, \u0430 \u0442\u0430\u043a\u0436\u0435 \u0441\u0442\u0440\u0430\u043d\u043d\u0443\u044e \u0437\u0430\u043f\u0438\u0441\u044c \u043e \u0434\u043e\u043c\u0435 \u0441 33 bedrooms. \u041f\u043e\u0441\u0442\u0443\u043f\u0438\u043c \u0442\u0430\u043a\u0436\u0435 \u043a\u0430\u043a \u0438 \u0441 price, \u0443\u0434\u0430\u043b\u0438\u0432 \u043d\u0443\u043b\u0438 \u0438\u0437 bedroms (\u0430 \u0437\u0430\u043e\u0434\u043d\u043e \u0438 bathrooms):<\/p>\n<pre><code class=\"python\">df=df[(df['bedrooms']!=0)&amp;(df['bathrooms']!=0)]<\/code><\/pre>\n<p>  \u041a\u0430\u0441\u0430\u0442\u0435\u043b\u044c\u043d\u043e \u0434\u043e\u043c\u0430 \u0441 33 \u0441\u043f\u0430\u043b\u044c\u043d\u044f\u043c\u0438 \u2013 \u0443\u0447\u0438\u0442\u044b\u0432\u0430\u044f \u0446\u0435\u043d\u0443, \u043c\u043e\u0436\u043d\u043e \u043f\u0440\u0435\u0434\u043f\u043e\u043b\u043e\u0436\u0438\u0442\u044c \u0447\u0442\u043e \u044d\u0442\u043e \u043e\u043f\u0435\u0447\u0430\u0442\u043a\u0430 \u0438 \u0441\u043f\u0430\u043b\u0435\u043d \u043d\u0430 \u0441\u0430\u043c\u043e\u043c \u0434\u0435\u043b\u0435 3. \u0421\u0440\u0430\u0432\u043d\u0438\u043c \u0436\u0438\u043b\u0443\u044e \u043f\u043b\u043e\u0449\u0430\u0434\u044c \u044d\u0442\u043e\u0433\u043e \u0434\u043e\u043c\u0430 (1620) \u0441\u043e \u0441\u0440\u0435\u0434\u043d\u0435\u0439 \u0436\u0438\u043b\u043e\u0439 \u043f\u043b\u043e\u0449\u0430\u0434\u044c\u044e \u0434\u043e\u043c\u043e\u0432 \u0441 3 \u0441\u043f\u0430\u043b\u044c\u043d\u044f\u043c\u0438 (1798,2), \u0447\u0442\u043e \u0436 \u0432\u0435\u0440\u043e\u044f\u0442\u043d\u043e \u043d\u0430\u0448\u0430 \u0434\u043e\u0433\u0430\u0434\u043a\u0430 \u0432\u0435\u0440\u043d\u0430, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043f\u0440\u043e\u0441\u0442\u043e \u0438\u0437\u043c\u0435\u043d\u0438\u043c \u044d\u0442\u043e \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0435 \u043d\u0430 3 \u0438 \u0435\u0449\u0435 \u0440\u0430\u0437 \u043f\u043e\u0441\u0442\u0440\u043e\u0438\u043c \u043f\u0440\u0435\u0434\u044b\u0434\u0443\u0449\u0438\u0439 box plot:<\/p>\n<pre><code class=\"python\">df.loc[df['bedrooms']==33,['bedrooms']]=3  sns.boxplot(y='price', x='bedrooms', data=df)<\/code><\/pre>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/qi\/wd\/fs\/qiwdfscthapolbucfyjqy-uoggc.png\"><\/p>\n<p>  \u0427\u0442\u043e\u0436, \u0437\u043d\u0430\u0447\u0438\u0442\u0435\u043b\u044c\u043d\u043e \u043b\u0443\u0447\u0448\u0435. \u0410\u043d\u0430\u043b\u043e\u0433\u0438\u0447\u043d\u043e bedrooms \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u0438 \u043d\u0430 bathrooms. \u041d\u0443\u043b\u0435\u0432\u044b\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u043c\u044b \u0443\u0434\u0430\u043b\u0438\u043b\u0438, \u0434\u0440\u0443\u0433\u0438\u0435 \u044d\u043a\u0441\u0442\u0440\u0435\u043c\u0430\u043b\u044c\u043d\u044b\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0432 \u043f\u043e\u043b\u0435 \u043e\u0442\u0441\u0443\u0442\u0441\u0442\u0432\u0443\u044e\u0442:<\/p>\n<pre><code class=\"python\">sns.boxplot(y='bathrooms', x='bedrooms', data=df)<\/code><\/pre>\n<p>  \u0412 \u043f\u043e\u043b\u044f\u0445 sqft_living, floors, waterfront, view, condition, grade, sqft_living15 \u0442\u0430\u043a\u0436\u0435 \u0432\u0441\u0435 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0431\u043e\u043b\u0435\u0435-\u043c\u0435\u043d\u0435\u0435 \u0440\u0435\u0430\u043b\u044c\u043d\u044b, \u0438\u0445 \u0442\u0440\u043e\u0433\u0430\u0442\u044c \u043d\u0435 \u0431\u0443\u0434\u0435\u043c:<\/p>\n<pre><code class=\"python\">plt.rcParams['figure.figsize']=2,3 \t\t\t#\u0440\u0430\u0437\u043c\u0435\u0440 \u043a\u0430\u0440\u0442\u0438\u043d\u043a\u0438 sns.boxplot(y='sqft_living', data=df) sns.boxplot(y='floors',color='#2ecc71', data=df) sns.boxplot(y='sqft_living15',color='#9b59b6', data=df)  plt.rcParams['figure.figsize']=4,4 sns.boxplot(y='price', x='waterfront', data=df) sns.boxplot(y='price', x='view' , data=df) sns.boxplot(y='price', x='condition' , data=df) sns.boxplot(y='price', x='grade' , data=df)<\/code><\/pre>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/oq\/uw\/h8\/oquwh8x-cln4tbaz9xrzqyk9szs.png\"><\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/yl\/ns\/bz\/ylnsbzq_kx2dtvrvjy8iytxudve.png\"><\/p>\n<p>  \u0410 \u0432\u043e\u0442 \u0441 sqft_lot \u0438 sqft_lot15 \u043d\u0443\u0436\u043d\u043e \u0447\u0442\u043e-\u0442\u043e \u043f\u0440\u0438\u0434\u0443\u043c\u0430\u0442\u044c \u0438 \u0438\u0437-\u0437\u0430 \u0431\u043e\u043b\u044c\u0448\u0438\u0445 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439 \u0432\u043f\u043e\u043b\u043d\u0435 \u043f\u043e\u0434\u043e\u0439\u0434\u0435\u0442 \u043b\u043e\u0433\u0430\u0440\u0438\u0444\u043c\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435:<\/p>\n<pre><code class=\"python\">df['sqft_lot']=np.log(df['sqft_lot']) df['sqft_lot15']=np.log(df['sqft_lot15'])<\/code><\/pre>\n<p>  sqft_lot \u0434\u043e \u0438 \u043f\u043e\u0441\u043b\u0435:<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/yr\/up\/g2\/yrupg24jwmfsptci9hf8uaq6wmu.png\"><\/p>\n<p>  sqft_above \u0438 sqft_basement \u2013 \u0441\u043e\u0441\u0442\u0430\u0432\u043d\u044b\u0435 \u0447\u0430\u0441\u0442\u0438 sqft_living, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0442\u0430\u043a\u0436\u0435 \u0442\u0440\u043e\u0433\u0430\u0442\u044c \u0438\u0445 \u043d\u0435 \u0431\u0443\u0434\u0435\u043c.<\/p>\n<p>  \u041d\u0430 \u044d\u0442\u043e\u043c \u0441 \u043f\u0440\u0435\u0434\u0432\u0430\u0440\u0438\u0442\u0435\u043b\u044c\u043d\u044b\u043c \u0430\u043d\u0430\u043b\u0438\u0437\u043e\u043c \u043c\u044b \u0437\u0430\u043a\u043e\u043d\u0447\u0438\u043c \u0438 \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0438\u043c \u043d\u0430 \u0442\u0435\u043f\u043b\u043e\u0432\u0443\u044e \u043a\u0430\u0440\u0442\u0443 \u043a\u043e\u0440\u0440\u0435\u043b\u044f\u0446\u0438\u0439:<\/p>\n<pre><code class=\"python\">sns.heatmap(df.corr(),  cmap = 'viridis',annot = True)<\/code><\/pre>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/ny\/yi\/uq\/nyyiuqa9zbilc9l6gqzljfe35xu.png\"><\/p>\n<p>  \u0418\u0437\u0443\u0447\u0438\u0432 \u043a\u0430\u0440\u0442\u0443 \u043a\u043e\u0440\u0440\u0435\u043b\u044f\u0446\u0438\u0439 \u0432\u0438\u0434\u0438\u043c, \u0447\u0442\u043e \u0438\u043d\u043e\u0433\u0434\u0430 \u043f\u0440\u0438\u0437\u043d\u0430\u043a\u0438 \u0441\u0438\u043b\u044c\u043d\u043e \u043a\u043e\u0440\u0440\u0435\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u044b \u043c\u0435\u0436\u0434\u0443 \u0441\u043e\u0431\u043e\u0439, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u0443\u0434\u0430\u043b\u0438\u043c \u0447\u0430\u0441\u0442\u044c \u043f\u0440\u0438\u0437\u043d\u0430\u043a\u043e\u0432 \u0441 \u0432\u044b\u0441\u043e\u043a\u043e\u0439 \u043a\u043e\u0440\u0440\u0435\u043b\u044f\u0446\u0438\u0435\u0439 \u2013 sqft_lot15 (\u043e\u0441\u0442\u0430\u0432\u0438\u043c sqft_lot), yr_built (\u043e\u0441\u0442\u0430\u0432\u0438\u043c yr_renovated), sqft_above (sqft_living).<\/p>\n<p>  \u041d\u0430 \u044d\u0442\u043e\u043c \u0437\u0430\u043a\u043e\u043d\u0447\u0438\u043c \u0440\u0430\u0431\u043e\u0442\u0443 \u0441 \u0434\u0430\u043d\u043d\u044b\u043c\u0438 \u0438 \u043f\u0435\u0440\u0435\u0439\u0434\u0435\u043c \u043a \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044e \u043c\u043e\u0434\u0435\u043b\u0438.<\/p>\n<p>  2. \u041c\u043e\u0434\u0435\u043b\u0438\u0440\u043e\u0432\u0430\u043d\u0438\u0435<\/p>\n<p>  \u0412 \u0434\u0430\u043d\u043d\u043e\u0439 \u0447\u0430\u0441\u0442\u0438 \u043c\u044b \u043f\u043e\u0441\u0442\u0440\u043e\u0438\u043c 2 \u043c\u043e\u0434\u0435\u043b\u0438: \u043b\u0438\u043d\u0435\u0439\u043d\u0443\u044e \u0440\u0435\u0433\u0440\u0435\u0441\u0441\u0438\u044e \u0438 \u0434\u0435\u0440\u0435\u0432\u043e \u0440\u0435\u0448\u0435\u043d\u0438\u0439.<\/p>\n<p>  \u0412\u0441\u0435 \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u044b\u0435 \u043d\u0430\u043c \u043c\u043e\u0434\u0435\u043b\u0438 \u0441\u043e\u0434\u0435\u0440\u0436\u0430\u0442\u044c\u0441\u044f \u0432 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a\u0435 sklearn.<\/p>\n<p>  \u0414\u043b\u044f \u043d\u0430\u0447\u0430\u043b\u0430 \u043e\u0442\u0434\u0435\u043b\u0438\u043c \u0446\u0435\u043b\u0435\u0432\u0443\u044e \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u0443\u044e \u043e\u0442 \u043e\u0441\u0442\u0430\u043b\u044c\u043d\u044b\u0445 \u0434\u0430\u043d\u043d\u044b\u0445 \u0434\u043b\u044f \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f, \u0430 \u0442\u0430\u043a\u0436\u0435 \u0440\u0430\u0437\u0434\u0435\u043b\u0438\u043c \u0432\u044b\u0431\u043e\u0440\u043a\u0438 \u043d\u0430 \u043e\u0431\u0443\u0447\u0430\u044e\u0449\u0443\u044e (70%) \u0438 \u0442\u0435\u0441\u0442\u043e\u0432\u0443\u044e (30%, \u043d\u0430 \u043a\u043e\u0442\u043e\u0440\u043e\u0439 \u043c\u044b \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u043c \u043a\u0430\u043a \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u043c\u043e\u0434\u0435\u043b\u044c):<\/p>\n<pre><code class=\"python\">Y=df['price'] X=df.drop ('price',axis=1)  from sklearn.model_selection import train_test_split X_train, X_test, Y_train, Y_test  = train_test_split(X, Y, test_size = 0.3, shuffle = True)<\/code><\/pre>\n<p>  \u0422\u0430\u043a\u0436\u0435 \u0438\u0437 sklearn \u0434\u043b\u044f \u043e\u0446\u0435\u043d\u043a\u0438 \u043c\u043e\u0434\u0435\u043b\u0438 \u0437\u0430\u0433\u0440\u0443\u0437\u0438\u043c 3 \u043c\u0435\u0442\u0440\u0438\u043a\u0438 \u2014 mean_absolute_error (\u0441\u0440\u0435\u0434\u043d\u044f\u044f \u0430\u0431\u0441\u043e\u043b\u044e\u0442\u043d\u0430\u044f \u043e\u0448\u0438\u0431\u043a\u0430), mean_squared_error (\u0421\u0440\u0435\u0434\u043d\u0435\u043a\u0432\u0430\u0434\u0440\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u043e\u0435 \u043e\u0442\u043a\u043b\u043e\u043d\u0435\u043d\u0438\u0435), r2_score (\u043a\u043e\u044d\u0444\u0444\u0438\u0446\u0438\u0435\u043d\u0442 \u0434\u0435\u0442\u0435\u0440\u043c\u0438\u043d\u0430\u0446\u0438\u0438):<\/p>\n<pre><code class=\"python\">from sklearn.metrics import mean_absolute_error, mean_squared_error, r2_score<\/code><\/pre>\n<p>  \u041d\u0430\u0447\u043d\u0435\u043c \u0441 \u043b\u0438\u043d\u0435\u0439\u043d\u043e\u0439 \u0440\u0435\u0433\u0440\u0435\u0441\u0441\u0438\u0438:<\/p>\n<pre><code class=\"python\">from sklearn.linear_model import LinearRegression LR = LinearRegression() \t\t\t\t#\u0421\u043e\u0437\u0434\u0430\u0435\u043c \u043c\u043e\u0434\u0435\u043b\u044c LR.fit(X_train, Y_train)\t\t\t\t#\u041e\u0431\u0443\u0447\u0430\u0435\u043c \u043c\u043e\u0434\u0435\u043b\u044c Y_LR = LR.predict(X_test)\t\t\t\t#\u041f\u0440\u0435\u0434\u0441\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u043c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0434\u043b\u044f \u0432\u044b\u0431\u043e\u0440\u043a\u0438     print ('MAE:', round (mean_absolute_error(Y_test, Y_LR),3))\t\t#\u041c\u0435\u0442\u0440\u0438\u043a\u0438 print ('\u221aMSE:', round (mean_squared_error(Y_test, Y_LR)**(1\/2),3)) print ('R2_score:', round (r2_score(Y_test, Y_LR),3))<\/code><\/pre>\n<p>  MAE: 124477.452<\/p>\n<p>  \u221aMSE 175205.645<\/p>\n<p>  R2_score: 0.627<\/p>\n<p>  \u0414\u0435\u0440\u0435\u0432\u043e \u0440\u0435\u0448\u0435\u043d\u0438\u0439:<\/p>\n<pre><code class=\"python\">from sklearn.tree import DecisionTreeRegressor TR = DecisionTreeRegressor()\t\t\t\t#\u0421\u043e\u0437\u0434\u0430\u0435\u043c \u043c\u043e\u0434\u0435\u043b\u044c TR.fit(X_train, Y_train)\t\t\t\t#\u041e\u0431\u0443\u0447\u0430\u0435\u043c \u043c\u043e\u0434\u0435\u043b\u044c Y_TR=TR.predict(X_test)  \t\t\t\t#\u041f\u0440\u0435\u0434\u0441\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u043c \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u044f \u0434\u043b\u044f \u0432\u044b\u0431\u043e\u0440\u043a print ('MAE:', round (mean_absolute_error(Y_test, Y_TR),3))\t\t#\u041c\u0435\u0442\u0440\u0438\u043a\u0438 print ('\u221aMSE:', round (mean_squared_error(Y_test, Y_TR)**(1\/2),3)) print ('R2_score:', round (r2_score(Y_test, Y_TR),3))<\/code><\/pre>\n<p>  MAE: 151734.906<\/p>\n<p>  \u221aMSE 220856.721<\/p>\n<p>  R2_score: 0.407<\/p>\n<p>  \u0418\u0441\u0445\u043e\u0434\u044f \u0438\u0437 \u043c\u0435\u0442\u0440\u0438\u043a \u043c\u043e\u0436\u043d\u043e \u0441\u0434\u0435\u043b\u0430\u0442\u044c \u0432\u044b\u0432\u043e\u0434 \u043e \u0442\u043e\u043c, \u0447\u0442\u043e \u041b\u0438\u043d\u0435\u0439\u043d\u0430\u044f \u0440\u0435\u0433\u0440\u0435\u0441\u0441\u0438\u044f \u043f\u043e\u043a\u0430\u0437\u0430\u043b\u0430 \u043b\u0443\u0447\u0448\u0438\u0439 \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043b\u043e\u0433\u0438\u0447\u043d\u0435\u0435 \u0432\u044b\u0431\u0440\u0430\u0442\u044c \u0435\u0435. \u041e\u0434\u043d\u0430\u043a\u043e, \u043c\u044b \u043d\u0435 \u0437\u0430\u0434\u0430\u0432\u0430\u043b\u0438\u0441\u044c \u0432\u043e\u043f\u0440\u043e\u0441\u0430\u043c\u0438 \u0438\u0437 \u0447\u0435\u0433\u043e \u0441\u043e\u0441\u0442\u043e\u0438\u0442 \u043e\u0448\u0438\u0431\u043a\u0430 \u043c\u043e\u0434\u0435\u043b\u0438, \u043d\u0435 \u044f\u0432\u043b\u044f\u0435\u0442\u0441\u044f \u043b\u0438 \u043c\u043e\u0434\u0435\u043b\u044c \u043f\u0435\u0440\u0435\u043e\u0431\u0443\u0447\u0435\u043d\u043d\u043e\u0439, \u0438 \u043f\u0440. \u0412\u043f\u043e\u043b\u043d\u0435 \u0432\u0435\u0440\u043e\u044f\u0442\u043d\u043e, \u0447\u0442\u043e \u043a \u0443\u0445\u0443\u0434\u0448\u0435\u043d\u0438\u044e \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u0430 DecisionTreeRegressor \u043f\u0440\u0438\u0432\u043e\u0434\u0438\u0442 \u0438\u043c\u0435\u043d\u043d\u043e \u043f\u0435\u0440\u0435\u043e\u0431\u0443\u0447\u0435\u043d\u0438\u0435, \u0442\u0430\u043a \u043a\u0430\u043a \u043c\u044b \u0434\u0430\u0436\u0435 \u043d\u0435 \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0438\u0432\u0430\u043b\u0438 \u0433\u043b\u0443\u0431\u0438\u043d\u0443 \u0434\u0435\u0440\u0435\u0432\u0430 \u0432 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430\u0445 \u043c\u043e\u0434\u0435\u043b\u0438. \u041c\u043e\u0436\u0435\u043c \u043b\u0435\u0433\u043a\u043e \u043f\u0440\u043e\u0432\u0435\u0440\u0438\u0442\u044c \u044d\u0442\u043e \u043f\u0435\u0440\u0435\u0431\u0440\u0438\u0440\u0430\u044f \u0433\u043b\u0443\u0431\u0438\u043d\u0443 \u0434\u0435\u0440\u0435\u0432\u044c\u0435\u0432 \u0432 \u043a\u043e\u0440\u043e\u0442\u043a\u043e\u043c \u0446\u0438\u043a\u043b\u0435: <\/p>\n<pre><code class=\"python\">dep,score=[],[] for i in range(3,16):     TR = DecisionTreeRegressor(max_depth=i)     TR.fit(X_train, Y_train)     Y_TR=TR.predict(X_test)     dep.append(i)     score.append(mean_squared_error(Y_test, Y_TR)**(1\/2))\t#\u041c\u0430\u0441\u0441\u0438\u0432 \u0437\u043d\u0430\u0447\u0435\u043d\u0438\u0439 \u221aMSE \t\tplt.rcParams['figure.figsize']=6,3 \t\tplt.plot(dep, score)<\/code><\/pre>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/ar\/fn\/yt\/arfnytm068lhpknk_ifnpshupgq.png\"><\/p>\n<p>  \u041e\u0447\u0435\u0432\u0438\u0434\u043d\u043e, \u0447\u0442\u043e \u043b\u0443\u0447\u0448\u0438\u0439 \u043f\u043e\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u044c \u043f\u0440\u0438 max_depth=7, \u0438, \u043f\u043e\u0441\u043c\u043e\u0442\u0440\u0435\u0432, \u043d\u0430 \u043c\u0435\u0442\u0440\u0438\u043a\u0438 (MAE: 124861.441, \u221aMSE 175322.737, R2_score: 0.626) \u0441\u0442\u0430\u043d\u043e\u0432\u0438\u0442\u044c\u0441\u044f \u043f\u043e\u043d\u044f\u0442\u043d\u043e, \u0447\u0442\u043e \u043c\u043e\u0434\u0435\u043b\u044c \u0441 \u0442\u0430\u043a\u0438\u043c \u043e\u0433\u0440\u0430\u043d\u0438\u0447\u0435\u043d\u0438\u0435\u043c \u0430\u043d\u0430\u043b\u043e\u0433\u0438\u0447\u043d\u0430 \u043b\u0438\u043d\u0435\u0439\u043d\u043e\u0439 \u0440\u0435\u0433\u0440\u0435\u0441\u0441\u0438\u0438 \u043f\u043e \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0443.<\/p>\n<p>  \u0422\u0430\u043a\u0436\u0435 \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u043f\u043e\u043f\u0440\u043e\u0431\u043e\u0432\u0430\u0442\u044c \u043e\u0446\u0435\u043d\u0438\u0442\u044c \u043a\u0430\u043a\u0438\u0435 \u043f\u0440\u0438\u0437\u043d\u0430\u043a\u0438 \u043e\u043a\u0430\u0437\u0430\u043b\u0438\u0441\u044c \u043d\u0430\u0438\u0431\u043e\u043b\u0435\u0435 \u0432\u0430\u0436\u043d\u044b \u0434\u043b\u044f \u043c\u043e\u0434\u0435\u043b\u0438 \u0434\u043b\u044f \u043f\u0440\u043e\u0433\u043d\u043e\u0437\u0430 \u0441\u0442\u043e\u0438\u043c\u043e\u0441\u0442\u0438:<\/p>\n<p>  <img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/x1\/qx\/qw\/x1qxqwlhqbfotpp45hhyr4nz0uc.png\"><\/p>\n<p>  \u0418\u0441\u0445\u043e\u0434\u044f \u0438\u0437 \u0433\u0440\u0430\u0444\u0438\u043a\u0430 \u0432\u0438\u0434\u043d\u043e, \u0447\u0442\u043e \u043d\u0430 \u0441\u0442\u043e\u0438\u043c\u043e\u0441\u0442\u044c \u0431\u043e\u043b\u044c\u0448\u0435 \u0432\u0441\u0435\u0433\u043e \u0432\u043b\u0438\u044f\u0435\u0442 grade \u2013 \u043e\u0431\u0449\u0430\u044f \u0441\u0443\u0431\u044a\u0435\u043a\u0442\u0438\u0432\u043d\u0430\u044f \u043e\u0446\u0435\u043d\u043a\u0430 \u0434\u043e\u043c\u0430 \u0440\u0438\u0435\u043b\u0442\u043e\u0440\u0441\u043a\u043e\u0439 \u043a\u043e\u043c\u043f\u0430\u043d\u0438\u0435\u0439 (\u0447\u0442\u043e, \u043a\u0441\u0442\u0430\u0442\u0438, \u0433\u043e\u0432\u043e\u0440\u0438\u0442 \u043e \u043a\u043e\u043c\u043f\u0435\u0442\u0435\u043d\u0442\u043d\u043e\u0441\u0442\u0438 \u043e\u0446\u0435\u043d\u043a\u0438 :-))), \u043d\u0430 \u0432\u0442\u043e\u0440\u043e\u043c \u043c\u0435\u0441\u0442\u0435 \u2013 \u043f\u043b\u043e\u0449\u0430\u0434\u044c \u0434\u043e\u043c\u0430, \u0430 \u043d\u0430 \u0442\u0440\u0435\u0442\u044c\u0435\u043c \u2013 \u0433\u043e\u0434 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0435\u0433\u043e \u0440\u0435\u043c\u043e\u043d\u0442\u0430. \u041f\u043e\u043a\u0430\u0437\u0430\u0442\u0435\u043b\u0438 \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u0430 \u0441\u043f\u0430\u043b\u0435\u043d, \u0432\u0430\u043d\u043d\u044b\u0445 \u043a\u043e\u043c\u043d\u0430\u0442, \u044d\u0442\u0430\u0436\u0435\u0439 \u0436\u0435 \u043c\u043e\u0434\u0435\u043b\u044c \u043f\u043e\u0441\u0447\u0438\u0442\u0430\u043b\u0430 \u043d\u0435\u0437\u043d\u0430\u0447\u0438\u043c\u044b\u043c\u0438 \u0434\u043b\u044f \u043f\u0440\u043e\u0433\u043d\u043e\u0437\u0430.<\/p>\n<p>  \u0414\u043b\u044f \u043b\u0443\u0447\u0448\u0435\u0433\u043e \u043f\u043e\u043d\u0438\u043c\u0430\u043d\u0438\u044f \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u043e\u0432, \u043f\u043e\u0441\u0447\u0438\u0442\u0430\u0435\u043c \u0441\u0440\u0435\u0434\u043d\u044e\u044e \u043e\u0448\u0438\u0431\u043a\u0443 \u0432 % \u2014 \u043f\u043e \u043b\u0438\u043d\u0435\u0439\u043d\u043e\u0439 \u0440\u0435\u0433\u0440\u0435\u0441\u0441\u0438\u0438 \u0441\u0440\u0435\u0434\u043d\u044f\u044f \u043e\u0448\u0438\u0431\u043a\u0430 27,5%, \u0442\u043e \u0435\u0441\u0442\u044c \u043c\u043e\u0434\u0435\u043b\u044c \u043e\u0448\u0438\u0431\u0430\u0435\u0442\u0441\u044f \u0447\u0443\u0442\u044c \u0431\u043e\u043b\u044c\u0448\u0435, \u0447\u0435\u043c \u043d\u0430 \u0447\u0435\u0442\u0432\u0435\u0440\u0442\u044c \u043f\u0440\u0438 \u043f\u0440\u043e\u0433\u043d\u043e\u0437\u0435 \u0441\u0442\u043e\u0438\u043c\u043e\u0441\u0442\u0438 \u0434\u043e\u043c\u0430, \u0447\u0442\u043e \u0434\u043e\u0432\u043e\u043b\u044c\u043d\u043e \u043c\u043d\u043e\u0433\u043e.<\/p>\n<p>  \u041c\u043e\u0436\u043d\u043e \u043b\u0438 \u0443\u043b\u0443\u0447\u0448\u0438\u0442\u044c \u0440\u0435\u0437\u0443\u043b\u044c\u0442\u0430\u0442\u044b? \u0414\u0430, \u043d\u0435\u0441\u043e\u043c\u043d\u0435\u043d\u043d\u043e, \u043d\u0430 \u0442\u0435\u043a\u0443\u0449\u0435\u043c \u044d\u0442\u0430\u043f\u0435 \u043c\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u0438 \u0442\u043e\u043b\u044c\u043a\u043e \u0431\u0430\u0437\u043e\u0432\u043e\u0435 \u0440\u0435\u0448\u0435\u043d\u0438\u0435 \u2013 \u043d\u0435\u043a\u0443\u044e \u043e\u0442\u043f\u0440\u0430\u0432\u043d\u0443\u044e \u0442\u043e\u0447\u043a\u0443 \u0434\u043b\u044f \u0441\u0440\u0430\u0432\u043d\u0435\u043d\u0438\u044f \u043b\u0443\u0447\u0448\u0435 \u0438\u043b\u0438 \u0445\u0443\u0436\u0435 \u0431\u0443\u0434\u0443\u0442 \u043c\u043e\u0434\u0435\u043b\u0438, \u043a\u043e\u0442\u043e\u0440\u044b\u0435 \u043c\u044b \u043c\u043e\u0436\u0435\u043c \u0441\u043e\u0437\u0434\u0430\u0442\u044c \u0431\u043e\u043b\u0435\u0435 \u0441\u043b\u043e\u0436\u043d\u044b\u043c\u0438 \u043c\u0435\u0442\u043e\u0434\u0430\u043c\u0438 \u0438\u043b\u0438 \u043f\u0440\u0438\u043c\u0435\u043d\u044f\u044f \u0431\u043e\u043b\u0435\u0435 \u0441\u043b\u043e\u0436\u043d\u0443\u044e \u043e\u0431\u0440\u0430\u0431\u043e\u0442\u043a\u0443 \u0434\u0430\u043d\u043d\u044b\u0445.<\/p>\n<p>  \u041c\u044b \u0442\u043e\u043b\u044c\u043a\u043e \u0447\u0443\u0442\u044c-\u0447\u0443\u0442\u044c \u0437\u0430\u0442\u0440\u043e\u043d\u0443\u043b\u0438 \u0432\u043e\u043f\u0440\u043e\u0441 \u043f\u0435\u0440\u0435\u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f \u0438 \u0441\u043e\u0432\u0441\u0435\u043c \u043d\u0435 \u043f\u0440\u0438\u043a\u0430\u0441\u0430\u043b\u0438\u0441\u044c \u043a \u0442\u043e\u043c\u0443, \u0438\u0437 \u0447\u0435\u0433\u043e \u0441\u043e\u0441\u0442\u043e\u0438\u0442 \u043e\u0448\u0438\u0431\u043a\u0430 \u043c\u043e\u0434\u0435\u043b\u0438 \u0438 \u043c\u043d\u043e\u0433\u0438\u043c \u0434\u0440\u0443\u0433\u0438\u043c \u0430\u0441\u043f\u0435\u043a\u0442\u0430\u043c \u0441\u043e\u0437\u0434\u0430\u043d\u0438\u044f \u043c\u043e\u0434\u0435\u043b\u0438. \u041a\u0430\u043a \u043f\u0440\u0430\u0432\u0438\u043b\u043e, \u0434\u043b\u044f \u043e\u0442\u0432\u0435\u0442\u043e\u0432 \u043d\u0430 \u044d\u0442\u0438 \u0432\u043e\u043f\u0440\u043e\u0441\u044b \u0438 \u043d\u0430\u0445\u043e\u0436\u0434\u0435\u043d\u0438\u044f \u043e\u043f\u0442\u0438\u043c\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u0440\u0435\u0448\u0435\u043d\u0438\u044f \u0438\u0441\u043f\u043e\u043b\u044c\u0437\u0443\u044e\u0442 \u0440\u0430\u0437\u043d\u043e\u043e\u0431\u0440\u0430\u0437\u043d\u044b\u0435 \u043c\u0435\u0442\u043e\u0434\u044b \u0432\u0430\u043b\u0438\u0434\u0430\u0446\u0438\u0438 \u043c\u043e\u0434\u0435\u043b\u0435\u0439, \u043d\u043e \u043e\u0431 \u044d\u0442\u043e\u043c \u043c\u044b \u043d\u0430\u043f\u0438\u0448\u0435\u043c \u0432 \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0438\u0445 \u0441\u0442\u0430\u0442\u044f\u0445.<\/p><\/div>\n<p> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/post\/505516\/\"> https:\/\/habr.com\/ru\/post\/505516\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"\n<div class=\"post__text post__text-html post__text_v1\" id=\"post-content-body\" data-io-article-url=\"https:\/\/habr.com\/ru\/post\/505516\/\"><img decoding=\"async\" src=\"https:\/\/habrastorage.org\/webt\/cn\/mg\/fr\/cnmgfrvs-ej5ldlqz9cmmdjdcrk.png\"><\/p>\n<p>  \u0412 \u043a\u0430\u0447\u0435\u0441\u0442\u0432\u0435 \u043f\u0435\u0440\u0432\u043e\u0439 \u0437\u0430\u0434\u0430\u0447\u0438 \u0434\u043b\u044f \u043c\u0430\u0448\u0438\u043d\u043d\u043e\u0433\u043e \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f \u0432\u043e\u0437\u044c\u043c\u0435\u043c \u0447\u0442\u043e-\u0442\u043e \u043f\u043e\u043d\u044f\u0442\u043d\u043e\u0435 \u0438 \u043f\u0440\u043e\u0441\u0442\u043e\u0435, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u043f\u0440\u043e\u0433\u043d\u043e\u0437 \u0441\u0442\u043e\u0438\u043c\u043e\u0441\u0442\u0438 \u0436\u0438\u043b\u044c\u044f. \u0413\u043e\u0442\u043e\u0432\u044b\u0439 \u0434\u0430\u0442\u0430\u0441\u0435\u0442 \u043c\u043e\u0436\u043d\u043e \u043d\u0430\u0439\u0442\u0438 \u043d\u0430 \u0441\u0430\u0439\u0442\u0435 kaggle. \u041d\u0430 \u043f\u0435\u0440\u0432\u044b\u0445 \u0448\u0430\u0433\u0430\u0445 \u043e\u0431\u0443\u0447\u0435\u043d\u0438\u044f \u043d\u0435 \u0441\u0442\u043e\u0438\u0442 \u0431\u0440\u0430\u0442\u044c \u0434\u0430\u0442\u0430\u0441\u0435\u0442\u044b \u0441 \u0431\u043e\u043b\u044c\u0448\u0438\u043c \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e\u043c \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, \u00abHouse Prices: Advanced Regression Techniques\u00bb \u0441\u043e\u0441\u0442\u043e\u0438\u0442 \u0438\u0437 80 \u043f\u0435\u0440\u0435\u043c\u0435\u043d\u043d\u044b\u0445 \u0438 advanced regression, \u043e\u0441\u0442\u0430\u043d\u043e\u0432\u0438\u043c\u0441\u044f \u043d\u0430 \u00abHouse Sales in King County, USA\u00bb \u0441 21 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u043e\u043c. \u0421\u043a\u0430\u0447\u0438\u0432\u0430\u0435\u043c \u0434\u0430\u043d\u043d\u044b\u0435 \u0438 \u0430\u043d\u0430\u043b\u0438\u0437\u0438\u0440\u0443\u0435\u043c \u043f\u0440\u0435\u0434\u043e\u0441\u0442\u0430\u0432\u043b\u0435\u043d\u043d\u043e\u0435 \u043e\u043f\u0438\u0441\u0430\u043d\u0438\u0435. \u0412 \u043d\u0430\u043b\u0438\u0447\u0438\u0438 \u0434\u0430\u0442\u0430, \u0446\u0435\u043d\u0430, \u043a\u043e\u043b\u0438\u0447\u0435\u0441\u0442\u0432\u043e \u0441\u043f\u0430\u043b\u0435\u043d, \u0432\u0430\u043d\u043d\u044b\u0445 \u043a\u043e\u043c\u043d\u0430\u0442, \u043e\u0431\u0449\u0430\u044f \u0438 \u0436\u0438\u043b\u0430\u044f \u043f\u043b\u043e\u0449\u0430\u0434\u044c, \u044d\u0442\u0430\u0436\u043d\u043e\u0441\u0442\u044c, \u043e\u0446\u0435\u043d\u043a\u0430 \u0432\u0438\u0434\u0430, \u0432\u0438\u0434 \u043d\u0430 \u043c\u043e\u0440\u0435, \u043e\u0446\u0435\u043d\u043a\u0430 \u043e\u0431\u0449\u0435\u0433\u043e \u0441\u043e\u0441\u0442\u043e\u044f\u043d\u0438\u044f, \u0433\u0440\u0435\u0439\u0434 (\u043e\u0446\u0435\u043d\u043a\u0430 \u0441\u0442\u0440\u043e\u0438\u0442\u0435\u043b\u044c\u0441\u0442\u0432\u0430 \u0438 \u0434\u0438\u0437\u0430\u0439\u043d\u0430), \u043f\u043b\u043e\u0449\u0430\u0434\u044c \u043d\u0430\u0434 \u0438 \u043f\u043e\u0434 \u0443\u0440\u043e\u0432\u043d\u0435\u043c \u0437\u0435\u043c\u043b\u0438, \u0433\u043e\u0434 \u043f\u043e\u0441\u0442\u0440\u043e\u0439\u043a\u0438, \u0433\u043e\u0434 \u043f\u043e\u0441\u043b\u0435\u0434\u043d\u0435\u0433\u043e \u0440\u0435\u043c\u043e\u043d\u0442\u0430, \u043a\u043e\u0434 \u0437\u043e\u043d\u044b, \u043a\u043e\u043e\u0440\u0434\u0438\u043d\u0430\u0442\u044b (\u0434\u043e\u043b\u0433\u043e\u0442\u0430 \u0438 \u0448\u0438\u0440\u043e\u0442\u0430), \u0434\u0430\u043d\u043d\u044b\u0435 \u043e \u043f\u043b\u043e\u0449\u0430\u0434\u0438 \u0434\u043e\u043c\u043e\u0432 15 \u0441\u043e\u0441\u0435\u0434\u0435\u0439.<\/p>\n<p>  \u0418\u0442\u0430\u043a, \u043c\u044b \u0432\u044b\u0431\u0440\u0430\u043b\u0438 \u0437\u0430\u0434\u0430\u0447\u0443 \u0438 \u0433\u043e\u0442\u043e\u0432\u044b \u043f\u0440\u0438\u0441\u0442\u0443\u043f\u0438\u0442\u044c \u043a \u0435\u0435 \u0440\u0435\u0448\u0435\u043d\u0438\u044e. \u0420\u0435\u0448\u0435\u043d\u0438\u0435 \u0431\u0443\u0434\u0435\u0442 \u0432\u043a\u043b\u044e\u0447\u0430\u0442\u044c \u0434\u0432\u0430 \u044d\u0442\u0430\u043f\u0430: \u0430\u043d\u0430\u043b\u0438\u0437 \u0434\u0430\u043d\u043d\u044b\u0445 \u0438 \u043f\u043e\u0441\u0442\u0440\u043e\u0435\u043d\u0438\u0435 \u043c\u043e\u0434\u0435\u043b\u0435\u0439.<\/p>\n<p>  1. \u0420\u0430\u0431\u043e\u0442\u0430 \u0441 \u0434\u0430\u043d\u043d\u044b\u043c\u0438.<\/p>\n<p>  \u0421\u0434\u0435\u043b\u0430\u0435\u043c \u043e\u0442\u0441\u0442\u0443\u043f\u043b\u0435\u043d\u0438\u0435 \u0438 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u043e \u043e\u0442\u043c\u0435\u0442\u0438\u043c \u0432\u0430\u0436\u043d\u043e\u0441\u0442\u044c \u0430\u043d\u0430\u043b\u0438\u0437\u0430 \u0434\u0430\u043d\u043d\u044b\u0445. \u0412 \u043d\u0430\u0441\u0442\u043e\u044f\u0449\u0438\u0439 \u043c\u043e\u043c\u0435\u043d\u0442 \u0432\u0441\u0435 \u0431\u043e\u043b\u0435\u0435-\u043c\u0435\u043d\u0435\u0435 \u043f\u043e\u043f\u0443\u043b\u044f\u0440\u043d\u044b\u0435 \u0430\u043b\u0433\u043e\u0440\u0438\u0442\u043c\u044b \u0443\u0436\u0435 \u043d\u0430\u043f\u0438\u0441\u0430\u043d\u044b \u0432 \u0432\u0438\u0434\u0435 \u0431\u0438\u0431\u043b\u0438\u043e\u0442\u0435\u043a \u0438 \u043d\u0435\u043f\u043e\u0441\u0440\u0435\u0434\u0441\u0442\u0432\u0435\u043d\u043d\u043e\u0435 \u043f\u043e\u0441\u0442\u0440\u043e\u0435\u043d\u0438\u0435 \u043c\u043e\u0434\u0435\u043b\u0438 \u0441\u0432\u043e\u0434\u0438\u0442\u0441\u044f \u043a \u043d\u0435\u0441\u043a\u043e\u043b\u044c\u043a\u0438\u043c \u0441\u0442\u0440\u043e\u043a\u0430\u043c \u043a\u043e\u0434\u0430, \u043d\u0430\u043f\u0440\u0438\u043c\u0435\u0440, k-\u0431\u043b\u0438\u0436\u0430\u0439\u0448\u0438\u0445 \u0441\u043e\u0441\u0435\u0434\u0435\u0439 \u0438\u0437 sklearn \u0432 python: <\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-304897","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/304897","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=304897"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/304897\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=304897"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=304897"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=304897"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}