Class XGBoostModel (2.30.0)

XGBoostModel(
    model_path: str,
    *,
    input: typing.Optional[typing.Mapping[str, str]] = None,
    output: typing.Optional[typing.Mapping[str, str]] = None,
    session: typing.Optional[bigframes.session.Session] = None
)

Imported XGBoost model.

Methods

XGBoostModel

XGBoostModel(
    model_path: str,
    *,
    input: typing.Optional[typing.Mapping[str, str]] = None,
    output: typing.Optional[typing.Mapping[str, str]] = None,
    session: typing.Optional[bigframes.session.Session] = None
)

Imported XGBoost model.

__init__

__init__(model_path, *, input=None, output=None, session=None)

API documentation for __init__ method.

get_params

get_params(deep=True)

Get parameters for this estimator.

Parameter
Name Description
deep bool, default True

Default True. If True, will return the parameters for this estimator and contained subobjects that are estimators.

Returns
Type Description
Dictionary A dictionary of parameter names mapped to their values.

predict

predict(X)

Predict the result from input DataFrame.

Returns
Type Description
bigframes.dataframe.DataFrame Output DataFrame. Schema is defined by the model.

register

register(vertex_ai_model_id=None)

Register the model to Vertex AI.

After register, go to the Google Cloud console (https://console.cloud.google.com/vertex-ai/models) to manage the model registries. Refer to https://cloud.google.com/vertex-ai/docs/model-registry/introduction for more options.

Parameter
Name Description
vertex_ai_model_id Optional[str], default None

Optional string id as model id in Vertex. If not set, will default to 'bigframes_{bq_model_id}'. Vertex Ai model id will be truncated to 63 characters due to its limitation.

to_gbq

to_gbq(model_name, replace=False)

Save the model to BigQuery.

Returns
Type Description
XGBoostModel Saved model.