1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 1 year has passed since last update.

AutoGluon-Tabular を使ってみた

Last updated at Posted at 2022-07-14

feat_1 feat_2 feat_3 feat_4 feat_5 feat_6 feat_7 feat_8 feat_9
0 1 0 0 0 0 0 0 0 0
1 0 0 0 0 0 0 0 1 0
2 0 0 0 0 0 0 0 1 0
3 1 0 0 1 6 1 5 0 0
4 0 0 0 0 0 0 0 0 0

feat_10 ... feat_85 feat_86 feat_87 feat_88 feat_89 feat_90
0 0 ... 1 0 0 0 0 0
1 0 ... 0 0 0 0 0 0
2 0 ... 0 0 0 0 0 0
3 1 ... 0 1 2 0 0 0
4 0 ... 1 0 0 0 0 1

feat_91 feat_92 feat_93 target
0 0 0 0 Class_1
1 0 0 0 Class_1
2 0 0 0 Class_1
3 0 0 0 Class_1
4 0 0 0 Class_1

2.デフォルトでモデルを構築する場合
```R:
label='target'
time_limit=600 #秒単位
predictor = TabularPredictor(label=label).fit(train_data, time_limit=time_limit)

また、leaderboardで訓練を行った各モデルの性能を確認することができます

lboard = predictor.leaderboard()
lboard.sort_values(by='score_val', ascending=False)

今回はアンサンブルモデルがscore_val=0.8312で一番高いという結果になりました。
image.png

3.それではテストデータに対して予測して、5行まで見せます

pred_test = predictor.predict(test_data, as_pandas=True)
pred_test.head()
実行結果
0    Class_2
1    Class_6
2    Class_6
3    Class_2
4    Class_9
Name: target, dtype: object

一番気になった機能

マルチモーダルアンサンブル学習(↓のようにテキストデータや画像データを含めて、複数種類のデータを入力し、統合的にモデル構築する)をやりたい場合、ただfit()関数の中に、hyperparametersを'multimodal'に設定すれば簡単に実現できます。

predictor = TabularPredictor(label=label).fit(train_data, hyperparameters='multimodal')

image.png

参考になるホームページ
https://aws.amazon.com/cn/blogs/china/machine-learning-with-autogluon-an-open-source-automl-library/

1
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?