{"id":238,"date":"2020-11-30T23:00:42","date_gmt":"2020-11-30T14:00:42","guid":{"rendered":"https:\/\/www.ritzcolor.net\/?p=238"},"modified":"2020-12-09T05:49:07","modified_gmt":"2020-12-08T20:49:07","slug":"kaggle%e3%83%88%e3%83%a9%e3%82%a4-home-credit-3","status":"publish","type":"post","link":"https:\/\/www.ritzcolor.net\/?p=238","title":{"rendered":"kaggle\u30c8\u30e9\u30a4 -Home credit 3-"},"content":{"rendered":"\n<p>\u3055\u3066\u524d\u56de\u5927\u91cf\u306e\u30ab\u30e9\u30e0\u3092\u96d1\u306b\u82f1\u8a33\u3057\u307e\u3057\u305f\u3002\u4eca\u56de\u306f\u305d\u308c\u3089\u306b\u3056\u3063\u3068\u76ee\u3092\u901a\u3057\u3066\u3001\u4f7f\u7528\u3059\u308b\u30c7\u30fc\u30bf\u306e\u6c7a\u5b9a\u3068\u3001\u305d\u308c\u306b\u4f34\u3046\u7d50\u5408\u3092\u3084\u3063\u3066\u3044\u3053\u3046\u3068\u601d\u3044\u307e\u3059\u3002\u30c7\u30fc\u30bf\u89e3\u6790\u624b\u9806\u306e3\u756a\u306b\u76f8\u5f53\u3057\u307e\u3059\u3002<\/p>\n\n\n\n<ol id=\"block-6bbec169-f436-4904-b0ad-9491e066a7c3\"><li>\u660e\u3089\u304b\u306b\u3057\u305f\u3044\u554f\u3044\u3084\u3001\u554f\u984c\u306e\u5b9a\u7fa9<\/li><li>\u8a13\u7df4\u304a\u3088\u3073\u30c6\u30b9\u30c8\u30c7\u30fc\u30bf\u306e\u53d6\u5f97<\/li><li>\u30c7\u30fc\u30bf\u306e\u6574\u5f62\u3001\u4f5c\u6210\u3001\u30af\u30ec\u30f3\u30b8\u30f3\u30b0<\/li><li>\u30d1\u30bf\u30fc\u30f3\u306e\u5206\u6790\u3001\u7279\u5b9a\u3001\u307e\u305f\u63a2\u7d22\u7684\u306b\u30c7\u30fc\u30bf\u3092\u5206\u6790\u3059\u308b<\/li><li>\u554f\u984c\u306e\u30e2\u30c7\u30eb\u5316\u3001\u4e88\u6e2c\u3001\u89e3\u6c7a<\/li><li>\u554f\u984c\u89e3\u6c7a\u306e\u30b9\u30c6\u30c3\u30d7\u3068\u6700\u7d42\u7684\u306a\u89e3\u6c7a\u65b9\u6cd5\u3092\u8996\u899a\u5316\u3001\u5831\u544a<\/li><li>\u7d50\u679c\u306e\u63d0\u51fa<\/li><\/ol>\n\n\n\n<p>\u305f\u304f\u3055\u3093\u30ab\u30e9\u30e0\u3042\u308a\u307e\u3059\u304c\u3001\u305d\u306e\u524d\u306b\u30c7\u30fc\u30bf\u4e2d\u8eab\u3092\u307f\u3066\u307f\u3088\u3046\u3068\u601d\u3044\u307e\u3059\u3002<\/p>\n\n\n\n<div class=\"hcb_wrap\"><pre class=\"prism line-numbers lang-python\" data-lang=\"Python\"><code>#\u304a\u3055\u3089\u3044\u3082\u517c\u306d\u3066\u3001\u30c7\u30fc\u30bf\u3092\u8aad\u307f\u8fbc\u307f\nimport pandas as pd\nimport numpy as np\nimport matplotlib as plt\nimport sklearn\n\ntrain_df = pd.read_csv(&quot;application_train.csv&quot;)\ntest_df = pd.read_csv(&quot;application_test.csv&quot;)\nbur = pd.read_csv(&quot;bureau.csv&quot;)\nbur_b = pd.read_csv(&quot;bureau_balance.csv&quot;)\ncd_b = pd.read_csv(&quot;credit_card_balance.csv&quot;)\nins_p = pd.read_csv(&quot;installments_payments.csv&quot;)\npos_c = pd.read_csv(&quot;POS_CASH_balance.csv&quot;)\nprv_a = pd.read_csv(&quot;previous_application.csv&quot;)<\/code><\/pre><\/div>\n\n\n\n<div class=\"hcb_wrap\"><pre class=\"prism line-numbers lang-python\" data-lang=\"Python\"><code>#train_df, test_df\u306b\u304a\u3044\u3066ID\u304c\u30e6\u30cb\u30fc\u30af\u304b\u78ba\u8a8d\u3002\nprint(train_df[&quot;SK_ID_CURR&quot;].nunique())\nprint(train_df[&quot;SK_ID_CURR&quot;].count())\nprint(test_df[&quot;SK_ID_CURR&quot;].nunique())\nprint(test_df[&quot;SK_ID_CURR&quot;].count())<\/code><\/pre><\/div>\n\n\n\n<pre class=\"wp-block-preformatted\">\u5b9f\u884c\u7d50\u679c\u306f\u3053\u3061\u3089\u3002\u5168\u30ab\u30e9\u30e0\u304cID\u3067\u30e6\u30cb\u30fc\u30af\u3068\u306a\u3063\u3066\u3044\u308b\u3053\u3068\u304c\u78ba\u8a8d\u3067\u304d\u305f\u306e\u3067\u3001\u57fa\u672c\u7684\u306b\u306fSK_ID_CURR\u3092\u30ad\u30fc\u306b\u3057\u3066\u8ffd\u52a0\u3057\u3066\u3044\u3051\u3070\u7279\u5fb4\u91cf\u3092\u8ffd\u52a0\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u305d\u3046\u3067\u3059\u3002\n307511\n307511\n48744\n48744<\/pre>\n\n\n\n<p>\u7d9a\u3044\u3066\u4ed6\u306e\u30c6\u30fc\u30d6\u30eb\u306e\u69cb\u6210\u3082\u898b\u3066\u3044\u304d\u307e\u3057\u3087\u3046\u3002train_df, test_df\u306b\u6b63\u78ba\u306b\u52a0\u3048\u308b\u305f\u3081\u306b\u306fSK_ID_CURR\u3054\u3068\u306b\u30c7\u30fc\u30bf\u3092\u307e\u3068\u3081\u308b\u5fc5\u8981\u304c\u3042\u308a\u307e\u3059\u3002<\/p>\n\n\n\n<p>bur(&#8220;bureau.csv&#8221;)<br>bur.head()\u3067\u78ba\u8a8d\u3057\u305f\u3068\u3053\u308d\u30011\u3064\u306eSK_ID_CURR\u306b\u5bfe\u3057\u3066\u3001\u8907\u6570\u306eSK_ID_BUREAU\u304c\u304f\u3063\u3064\u3044\u3066\u3044\u308b\u3088\u3046\u3067\u3059\u3002\u306a\u306e\u3067\u307e\u305a\u306fSK_ID_CURR\u3092\u30d9\u30fc\u30b9\u3068\u3057\u3066\u5e73\u5747\u5316\u3059\u308c\u3070\u826f\u3055\u305d\u3046\u3067\u3059\u3002<\/p>\n\n\n\n<p>bur_b(&#8220;bureau_balance.csv&#8221;)<br>SK_ID_BUREAU\u3001MONTHS_BALANCE\u3001STATUS\u304b\u3089\u306a\u308b\u30ab\u30e9\u30e0\u3067\u3059\u306e\u3067\u3001bur\u306b\u307e\u305a\u304f\u3063\u3064\u3051\u308b\u3079\u304d\u306e\u3088\u3046\u3067\u3059\u3002MONTHS_BALANCE\u304c\u8907\u6570\u4e26\u3093\u3067\u3044\u308b\u306e\u3067\u3001STATUS\u3054\u3068\u306b\u30ab\u30a6\u30f3\u30c8\u3057\u305f\u30c7\u30fc\u30bf\u3092\u304f\u3063\u3064\u3051\u308c\u3070\u4f7f\u3048\u305d\u3046\u3067\u3059\u3002<\/p>\n\n\n\n<p>cd_b (&#8220;credit_card_balance.csv&#8221;)<br>\u3053\u3061\u3089\u30821\u3064\u306eSK_ID_CURR\u306b\u5bfe\u3057\u3066\u8907\u6570\u306eSK_ID_PREV\u304c\u3042\u308a\u307e\u3059\u306e\u3067\u3001bur\u3068\u540c\u69d8\u306b\u5e73\u5747\u3084\u30ab\u30a6\u30f3\u30c8\u3067\u8ffd\u52a0\u3057\u3066\u3044\u304f\u3053\u3068\u306b\u306a\u308a\u305d\u3046\u3067\u3059\u3002<br>ins_p(&#8220;installments_payments.csv&#8221;)\u3068pos_c(&#8220;POS_CASH_balance.csv&#8221;)\u3001<br>prv_a(&#8220;previous_application.csv&#8221;)\u3082\u540c\u69d8\u3067\u3059\u306e\u3067\u3001\u30c7\u30fc\u30bf\u578b\u304c\u6570\u5b57\u306e\u3082\u306e\u306f\u5e73\u5747\u3092\u3068\u308a\u3001\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u306e\u3082\u306e\u306f\u30ab\u30a6\u30f3\u30c8\u3057\u3066\u3001train_df\u306b\u304f\u3063\u3064\u304f\u3088\u3046\u306b\u3057\u305f\u3044\u3068\u601d\u3044\u307e\u3059\u3002<\/p>\n\n\n\n<p>\u3068\u3044\u3046\u3053\u3068\u3067\u30c7\u30fc\u30bf\u524d\u51e6\u7406\u306e\u65b9\u5411\u6027\u3092\u5b9a\u3081\u307e\u3057\u305f\u3002\u6b21\u56de\u306f\u5b9f\u969b\u306b\u30b3\u30fc\u30c9\u3092\u66f8\u304d\u306a\u304c\u3089\u30c7\u30fc\u30bf\u6574\u5f62\u3092\u884c\u3063\u3066\u3044\u304d\u307e\u3059\u3002<\/p>\n\n\n\n<p><br><br><br><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u3055\u3066\u524d\u56de\u5927\u91cf\u306e\u30ab\u30e9\u30e0\u3092\u96d1\u306b\u82f1\u8a33\u3057\u307e\u3057\u305f\u3002\u4eca\u56de\u306f\u305d\u308c\u3089\u306b\u3056\u3063\u3068\u76ee\u3092\u901a\u3057\u3066\u3001\u4f7f\u7528\u3059\u308b\u30c7\u30fc\u30bf\u306e\u6c7a\u5b9a\u3068\u3001\u305d\u308c\u306b\u4f34\u3046\u7d50\u5408\u3092\u3084\u3063\u3066\u3044\u3053\u3046\u3068\u601d\u3044\u307e\u3059\u3002\u30c7\u30fc\u30bf\u89e3\u6790\u624b\u9806\u306e3\u756a\u306b\u76f8\u5f53\u3057\u307e\u3059\u3002 \u660e\u3089\u304b\u306b\u3057\u305f\u3044\u554f\u3044\u3084\u3001\u554f\u984c\u306e\u5b9a\u7fa9 \u8a13\u7df4\u304a\u3088\u3073\u30c6\u30b9 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":239,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"spay_email":""},"categories":[3],"tags":[5,6,7],"aioseo_notices":[],"jetpack_featured_media_url":"https:\/\/i0.wp.com\/www.ritzcolor.net\/wp-content\/uploads\/2020\/11\/document_data_bunseki.png?fit=360%2C400&ssl=1","_links":{"self":[{"href":"https:\/\/www.ritzcolor.net\/index.php?rest_route=\/wp\/v2\/posts\/238"}],"collection":[{"href":"https:\/\/www.ritzcolor.net\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.ritzcolor.net\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.ritzcolor.net\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.ritzcolor.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=238"}],"version-history":[{"count":3,"href":"https:\/\/www.ritzcolor.net\/index.php?rest_route=\/wp\/v2\/posts\/238\/revisions"}],"predecessor-version":[{"id":242,"href":"https:\/\/www.ritzcolor.net\/index.php?rest_route=\/wp\/v2\/posts\/238\/revisions\/242"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.ritzcolor.net\/index.php?rest_route=\/wp\/v2\/media\/239"}],"wp:attachment":[{"href":"https:\/\/www.ritzcolor.net\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=238"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.ritzcolor.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=238"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.ritzcolor.net\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=238"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}