JuliaML / LIBSVM.jl

LIBSVM bindings for Julia
Other
88 stars 35 forks source link

Trained model size depends on the training data size #96

Closed MNLubov closed 1 year ago

MNLubov commented 1 year ago

I am training SVM on quite big dataset, and after training I save the model. The size of the model depends on the size of the dataset. The size of my training data is 12MB and size of the model is 66 MB. Do I understand correctly that this depends on number of the support vectors and that model doesn't save training data itself?

till-m commented 1 year ago

Hi @MNLubov,

the model does indeed save the features only for the support vectors. If you increase the cost parameter (to e.g. 100.), you should see that: a) model.SVs.l becomes smaller/the second dimension of model.SVs.X becomes smaller. b) the serialized model file becomes smaller.

Hope this helps!

MNLubov commented 1 year ago

Hi @till-m

Thanks for the clarification!