Expand description
Model serialization and deserialization support.
Provides JSON serialization (default feature) and optional bincode
serialization for model persistence. Currently exposes utility functions
for serializing/deserializing generic Serialize/Deserialize types.
Re-exports§
pub use crate::loss::LossType;
Structs§
- Distributional
Model State - Serializable state for
DistributionalSGBT. - Model
State - Complete serializable state of an SGBT model.
- Step
Snapshot - Serializable snapshot of a single boosting step.
- Tree
Snapshot - Serializable snapshot of the tree arena structure.
Functions§
- from_
bincode - Deserialize a value from bincode bytes.
- from_
json - Deserialize a value from a JSON string.
- from_
json_ bytes - Deserialize a value from JSON bytes.
- load_
distributional_ model - Deserialize a
DistributionalModelStatefrom JSON. - load_
distributional_ model_ bincode - Deserialize a
DistributionalModelStatefrom bincode bytes. - load_
model - Load an SGBT model from a JSON string.
- load_
model_ bincode - Load an SGBT model from bincode bytes.
- save_
distributional_ model - Serialize a
DistributionalModelStateto JSON. - save_
distributional_ model_ bincode - Serialize a
DistributionalModelStateto bincode bytes. - save_
model - Save an SGBT model to a JSON string.
- save_
model_ bincode - Save an SGBT model to bincode bytes.
- save_
model_ with - Save an SGBT model to a JSON string with an explicit loss type tag.
- to_
bincode - Serialize a value to bincode bytes.
- to_json
- Serialize a value to a JSON string.
- to_
json_ bytes - Serialize a value to JSON bytes.
- to_
json_ pretty - Serialize a value to a pretty-printed JSON string.