Module tripleblind.xgboost

XGBoost model support

The XGBoost library supports an approach known as "Extreme Gradient Boosting". This is a decision tree model designed for speed and performance. TripleBlind allows training these models via the tb.Operation.XGBOOST_TRAIN protocol, but you can also upload a pre-trained XGBoost model as an Asset. This asset can then be used to run inferences by you or others against platform datasets.

Functions

def upload_xgboost_model(name: str, file_handle: Union[_io.TextIOWrapper, _io.BufferedReader] = None, description: Optional[str] = None, is_discoverable: bool = True, asset_cost: int = 0, session: Optional[Session] = None, strategy: Optional[str] = None) -> Asset

Upload an XGBoost pretrained model to be used for inference.

NOTE: Only models using the "gbtree" booster are currently supported.

Args

name : str
Name of the new Asset model to create
file_handle : Union[io.TextIOWrapper, io.BufferedReader]
File to place on Access Point
description : Optional[str], optional
Longer description of the model (input data format and etc.).
is_discoverable : bool, optional
Should model be discoverable by others?
asset_cost : int, optional
Price of accessing this model (in US cents)
session : Session, optional
A connection session. If not specified, the default session is used.
strategy : str, optional
Upload strategy Use 'stream' to use a web socket, or 'post' to perform a simple post to position the asset. Default is 'stream'.

Returns

Asset
New model (algorithm) asset