Persist an XGM v2 model from a pre-serialized JSON blob. The client never imports xplainable_gm and so cannot fit a v2 model locally; the blob is produced by an internal/agent training path (the closed package) and posted as-is to the v2 create endpoint.
Optional train-set metric dict. When provided, the platform materialises it into the shared evaluation table so aggregate endpoints surface the v2 model (parity with v1).
feature_importancesdictdefault: None
Optional normalised importance dict, materialised onto the v2 partition row alongside the evaluation.
health_infolistdefault: None
Optional per-feature health list (XScan profile shape), materialised into the shared partition-health table.
profiledictdefault: None
Optional v1-shaped ``{base_value, numeric, categorical}`` per-bin profile, materialised onto the v2 partition row so the model-profile UI renders the same two-panel view as v1.
xDataFramedefault: None
Optional training feature matrix. When provided (and ``health_info`` is not), the client computes ``health_info`` via XScan — the SAME open-``xplainable`` code path v1 ``create_model`` uses (never ``xplainable_gm``).
ySeriesdefault: None
Optional training target. Together with ``y_prob``/``y_pred`` (and when ``evaluation`` is not supplied) the client computes ``evaluation`` as ``{'train': evaluate_classification(...)}`` or ``{'train': evaluate_regression(...)}`` — v1's exact shape.
y_probdefault: None
Predicted probabilities (required to auto-compute a classification evaluation).
y_preddefault: None
Predicted values (required to auto-compute a regression evaluation). Explicit ``evaluation=``/``health_info=`` always take precedence over anything computed from ``x``/``y``.
Add a new version to an EXISTING XGM v2 model (retrain path). v2 counterpart of add_version: persists a pre-serialized blob as a new version under the same model instead of creating a new one. The parent model must have algorithm_version='v2'.
List all models for the current team (based on API key). This method returns comprehensive information about all models accessible to the authenticated user's team.
Train an xplainable model on a dataset and upload it to the platform. Provide ONE of: dataset_id (preferred for hosted MCP), file_path (local CSV), dataset_name (xplainable public dataset), or csv_content (raw CSV string).
Name of an xplainable public dataset (e.g. "telco_churn").
dataset_idstrdefault: None
ID of a dataset already on the xplainable platform. Use datasets_list_team_datasets to find available IDs. This is the preferred method for hosted/remote MCP servers.
csv_contentstrdefault: None
Raw CSV string for when file paths aren't accessible.
model_typestrdefault: 'classifier'
Either "classifier" or "regressor".
partition_onstrdefault: None
Optional column name to partition on. Trains a separate sub-model per unique value in this column (e.g. partition_on="Industry" trains one model per industry). The column stays in the data for routing predictions but each partition gets its own tuned model.
preprocessor_version_idstrdefault: None
Optional preprocessor version ID to load and apply a fitted pipeline to the features before training.
drop_columnslistdefault: None
Optional list of column names to exclude from features.
test_sizefloatdefault: 0.2
Fraction of data to hold out for testing (0 to 1).
Rapidly refit an existing model with new parameters without retraining. Everything happens server-side in a single API call -- data never leaves the platform. Orders of magnitude faster than train_model. Two modes: 1. Same params for features: set max_depth, weight, etc. directly. Use 'features' to target specific features, or omit for all. 2. Per-feature params: pass feature_params dict to tune each feature independently in one call. e.g.: feature_params={"Tenure Months": {"max_depth": 3}, "Contract": {"max_depth": 5}}