Contents
How do I use XGBoost in SageMaker?
Use XGBoost with the SageMaker Python SDK
- Train a Model with Open Source XGBoost. Prepare a Training Script. Create an Estimator. Call the fit Method.
- Deploy Open Source XGBoost Models. SageMaker XGBoost Model Server. Load a Model. Serve a Model. Process Input. Get Predictions. Process Output. Bring Your Own Model.
What is an appropriate choice of an instance type for training XGBoost in SageMaker?
EC2 Instance Recommendation for the XGBoost Algorithm So, a general-purpose compute instance (for example, M5) is a better choice than a compute-optimized instance (for example, C4).
How to retrieve feature importance for XGBoost in SageMaker?
The following example notebook demonstrates how to use SageMaker Debugger to retrieve feature importance: https://github.com/awslabs/amazon-sagemaker-examples/blob/master/sagemaker-debugger/xgboost_builtin_rules/xgboost-regression-debugger-rules.ipynb. Thanks for contributing an answer to Stack Overflow!
What should the feature type be in XGBoost?
A few things I have featured out: xgboost has a parameter called feature_type for DMatrix. What are the acceptable values for feature_type? Can I specify it to be categorical? ordinal?
Which is the best algorithm to use in SageMaker?
Amazon SageMaker supports two ways to use the XGBoost algorithm: The XGBoost open source algorithm provides the following benefits over the built-in algorithm: Latest version – The open source XGBoost algorithm typically supports a more recent version of XGBoost.
How to configure XGBoost model server in Python?
You configure the XGBoost model server by defining functions in the Python source file you passed to the XGBoost constructor. Before a model can be served, it must be loaded. The SageMaker XGBoost model server loads your model by invoking a model_fn function that you must provide in your script.