transform_to_sparse_model

transform_to_sparse_model(
model,
properties: Property | Iterable[Property] | None = None,
)

Transform a model in symbolic representation into a model in sparse representation.

Parameters:
  • model – Symbolic model.

  • properties – (optional) Property or properties which should be preserved. If None, all labels and reward models are preserved.

Returns:

The model in sparse representation.