【发布时间】:2019-12-12 17:32:20
【问题描述】:
我正在尝试在我的 xgboost 模型上使用 what if 工具。 但在link 上,我只能找到通过 google AI Platform 使用的 xgboost 示例。有没有什么方法可以在没有 Google AI 平台的情况下在 XGboost 上使用 whatif 工具
我尝试了 tensorflow 和 keras 示例中使用的函数,并使用了函数 set_estimator_and_feature_spec 和 set_compare_custom_predict_fn
bst = xgb.XGBClassifier(
objective='reg:logistic'
)
bst.fit(x_train, y_train)
test_examples = df_to_examples(df_test)
config_builder = WitConfigBuilder(test_examples).set_custom_predict_fn(xg.predict)
WitWidget(config_builder)
尝试执行运行推理时,显示错误消息cannot initialize DMatrix from a list,我无法执行此操作
【问题讨论】:
-
我遇到了同样的问题。 XGBoost 模型需要通过 TensorFlow 模型服务器提供服务才能工作
标签: tensorflow google-cloud-platform tensorboard xgboost