rust-ml / linfa

A Rust machine learning framework.
Apache License 2.0
3.77k stars 252 forks source link

how to save svm model data and resuse it ? #338

Open coolstudio1678 opened 7 months ago

coolstudio1678 commented 7 months ago

SVM(Multi) calculation consumes memory and time, so I want to save the model calculation data for subsequent calls, but it seems that SVM does not support the serde feature. How should I save the SVM model data?

benjamasu commented 1 month ago

@coolstudio1678 As a workaround, you could implement your own version of MultiTargetModel with generic types instead of dynamic dispatch and derive serde's traits to it. That's what I've done and it at least works.

coolstudio1678 commented 5 days ago

thanks!