[機械学習であそぼ]AI Builderで銀行の顧客のローンが通るかどうかを予測するモデルを作成しよう
![azblob://2022/11/11/eyecatch/2019-08-16-predicting-whether-a-bank-customers-loan-will-pass-or-not-with-ai-builder-000-1.jpg](https://prtechblogfd-crhzb5g6hkhqafdm.z01.azurefd.net/drupalimages/2022/11/11/eyecatch/2019-08-16-predicting-whether-a-bank-customers-loan-will-pass-or-not-with-ai-builder-000-1.jpg)
目次
- はじめに
- データのアップロード
- 1. 「データ」>「エンティティ」>「データを取得」を選択
- 2. 「テキスト/CSV」を選択
- 3. aib_personalbankloan.csvをアップロード
- 4. クエリは特に編集せずに「次へ」
- 5. 以下のようにエンティティをマッピング
- 6. 「手動で更新」を選択して「作成」
- モデルの作成
- 1. 「AI Builder」>「ビルド」を開き、「二項分類」を選択
- 2. モデル名を入力し、作成(名前が被っていたら適宜変えてください)
- 3. 過去の実績を以下のように選択
- 4. 予測の内容に影響するフィールドをExcelに載っていたものすべてにして「次へ」
- 5. 「電車(trainの誤訳)」をクリック
- 6. 作成したモデルを開き、パフォーマンスを確認する
- おわりに
はじめに
前回はAI Builderの物体検出モデルをPowerAppsで使ってみました。
今回は公式が公開しているデータセットを用いて、銀行の顧客のローンが通るかどうかを予測するモデルを作成しましょう。
データのアップロード
ここからダウンロードしてきたデータをAI Builderで利用できるようにアップロードします。
あらかじめ、テスト用に上から10人分のデータは抜いておきます。
1. 「データ」>「エンティティ」>「データを取得」を選択
![](https://prtechblogfd-crhzb5g6hkhqafdm.z01.azurefd.net/drupalimages/beforemigration/2019-08-16-predicting-whether-a-bank-customers-loan-will-pass-or-not-with-ai-builder-001-1.jpg)
2. 「テキスト/CSV」を選択
![](https://prtechblogfd-crhzb5g6hkhqafdm.z01.azurefd.net/drupalimages/beforemigration/2019-08-16-predicting-whether-a-bank-customers-loan-will-pass-or-not-with-ai-builder-002-1024x459.jpg)
3. aib_personalbankloan.csvをアップロード
![](https://prtechblogfd-crhzb5g6hkhqafdm.z01.azurefd.net/drupalimages/beforemigration/2019-08-16-predicting-whether-a-bank-customers-loan-will-pass-or-not-with-ai-builder-003-1024x465.jpg)
4. クエリは特に編集せずに「次へ」
![](https://prtechblogfd-crhzb5g6hkhqafdm.z01.azurefd.net/drupalimages/beforemigration/2019-08-16-predicting-whether-a-bank-customers-loan-will-pass-or-not-with-ai-builder-004-1024x446.jpg)
5. 以下のようにエンティティをマッピング
![](https://prtechblogfd-crhzb5g6hkhqafdm.z01.azurefd.net/drupalimages/beforemigration/2019-08-16-predicting-whether-a-bank-customers-loan-will-pass-or-not-with-ai-builder-005-1024x452.jpg)
6. 「手動で更新」を選択して「作成」
![](https://prtechblogfd-crhzb5g6hkhqafdm.z01.azurefd.net/drupalimages/beforemigration/2019-08-16-predicting-whether-a-bank-customers-loan-will-pass-or-not-with-ai-builder-006-1024x455.jpg)
モデルの作成
いよいよ、モデルの作成をしていきます。
1. 「AI Builder」>「ビルド」を開き、「二項分類」を選択
![](https://prtechblogfd-crhzb5g6hkhqafdm.z01.azurefd.net/drupalimages/beforemigration/2019-08-16-predicting-whether-a-bank-customers-loan-will-pass-or-not-with-ai-builder-007-1024x510.jpg)
2. モデル名を入力し、作成(名前が被っていたら適宜変えてください)
![](https://prtechblogfd-crhzb5g6hkhqafdm.z01.azurefd.net/drupalimages/beforemigration/2019-08-16-predicting-whether-a-bank-customers-loan-will-pass-or-not-with-ai-builder-008-1024x663.jpg)
3. 過去の実績を以下のように選択
![](https://prtechblogfd-crhzb5g6hkhqafdm.z01.azurefd.net/drupalimages/beforemigration/2019-08-16-predicting-whether-a-bank-customers-loan-will-pass-or-not-with-ai-builder-009-1024x421.jpg)
4. 予測の内容に影響するフィールドをExcelに載っていたものすべてにして「次へ」
![](https://prtechblogfd-crhzb5g6hkhqafdm.z01.azurefd.net/drupalimages/beforemigration/2019-08-16-predicting-whether-a-bank-customers-loan-will-pass-or-not-with-ai-builder-010-1024x436.jpg)
5. 「電車(trainの誤訳)」をクリック
![](https://prtechblogfd-crhzb5g6hkhqafdm.z01.azurefd.net/drupalimages/beforemigration/2019-08-16-predicting-whether-a-bank-customers-loan-will-pass-or-not-with-ai-builder-011-1024x432.jpg)
データサイズが大きくないので3分くらいで終わるはずです。
6. 作成したモデルを開き、パフォーマンスを確認する
![](https://prtechblogfd-crhzb5g6hkhqafdm.z01.azurefd.net/drupalimages/beforemigration/2019-08-16-predicting-whether-a-bank-customers-loan-will-pass-or-not-with-ai-builder-012-1024x476.jpg)
トレーニングレポートが作成されていたので確認します。
![](https://prtechblogfd-crhzb5g6hkhqafdm.z01.azurefd.net/drupalimages/beforemigration/2019-08-16-predicting-whether-a-bank-customers-loan-will-pass-or-not-with-ai-builder-013.jpg)
一応リトレインしておきましょう。
![](https://prtechblogfd-crhzb5g6hkhqafdm.z01.azurefd.net/drupalimages/beforemigration/2019-08-16-predicting-whether-a-bank-customers-loan-will-pass-or-not-with-ai-builder-014-1024x445.jpg)
リトレインしてもトレーニングレポートが変わりませんでした・・・。エラーではなく、警告なので大丈夫でしょうということで、公開してモデルをPowerAppsで使えるようにしておきます。
![](https://prtechblogfd-crhzb5g6hkhqafdm.z01.azurefd.net/drupalimages/beforemigration/2019-08-16-predicting-whether-a-bank-customers-loan-will-pass-or-not-with-ai-builder-015-1024x336.jpg)
おわりに
公式が公開しているデータセットを用いて、銀行の顧客のローンが通るかどうかを予測するモデルを作成しました。
物体検出モデルなどのようにクイックテストができないので、うまくいっているか不安ですが、次回からPowerAppsでアプリを作成していきたいと思います。