• home
  • about
  • 全ての投稿
  • ソフトウェア・ハードウェアの設定のまとめ
  • 分析関連のまとめ
  • ヘルスケア関連のまとめ
  • 生涯学習関連のまとめ

catboost uncertainty

date: 2022-09-05 excerpt: catboost uncertaintyの仕組みとチートシート

tag: pythoncatboostuncertainty不確実性分散


catboost uncertaintyの仕組みとチートシート

概要

  • catboostは決定木でありながら、不確実性を計算することができる
  • 技術的にはVirtual ensembleとうことをやっている
    • 一つのモデルの内部で決定木の乱択をやっているようである
  • 回帰でも使用でき、RMSEWithUncertaintyという損失関数になっている

RMSEWithUncertaintyのスニペット

model = CatBoostRegressor(iterations=1000, learning_rate=0.2, loss_function='RMSEWithUncertainty',
                          verbose=False, random_seed=0)

model.fit(train_pool, eval_set=val_pool)
print("best iteration =", model.get_best_iteration())
preds = model.predict(test)

mean_preds = preds[:, 0] #the first prediction is the estimated mean value
var_preds = preds[:, 1] #the second prediction is the estimated variance

Google Colab

  • catboost-uncertainty-example

参考

  • Tutorial: Uncertainty estimation with CatBoost


pythoncatboostuncertainty不確実性分散 Share Tweet