||Traverse through the tree and append to the tree spec.|
||Convert a generic tree model to the protobuf spec.|
recurse_json(mlkit_tree, xgb_tree_json, tree_id, node_id, feature_map, force_32bit_float)¶
Traverse through the tree and append to the tree spec.
convert_tree_ensemble(model, feature_names, target, force_32bit_float)¶
Convert a generic tree model to the protobuf spec.
- This currently supports:
- Decision tree regression
- model: str | Booster
- Path on disk where the XGboost JSON representation of the model is or a handle to the XGboost model.
- feature_names : list of strings or None
- Names of each of the features. When set to None, the feature names are extracted from the model.
- target: str,
- Name of the output column.
- force_32bit_float: bool
- If True, then the resulting CoreML model will use 32 bit floats internally.
- model_spec: An object of type Model_pb.
- Protobuf representation of the model