cstjean / ScikitLearn.jl

Julia implementation of the scikit-learn API https://cstjean.github.io/ScikitLearn.jl/dev/
Other
546 stars 76 forks source link

Can I get attributes from the model? #29

Closed xiaohk closed 7 years ago

xiaohk commented 7 years ago

If I use Python SVC model, can I get attributes like coef_, support_vectors_ from the fitted model?

cstjean commented 7 years ago

Yes; the model objects from Python are just regular PyCall objects, so you can access their Python attributes with

svc = fit!(SVC(), ...)
svc[:coef_]
svc[:support_vectors_]
xiaohk commented 7 years ago

@cstjean Oh I see! I tried to use svc .coef_ and it didn't work lol.