简体   繁体   中英

Is it possible to use a trained sklearn.mixture.GMM model with C++ for iOS?

I have an established model that I'm trying to extend to an iOS app.

Ultimately I would like to train the model on the server, and then be able to score a feature vector on the device rather than making a call to the server each time.

Yes, this is possible, but it involves...math. It will involve computing the probabilities of membership manually using the coefficients determined by the scikit-learn model ( weights_, means_, covars_, converged_ ).

You will need to understand exactly what your particular GMM model is doing (possibly dig up the source code ) in the 'predict' method, then use the data members of your model (see the attributes section of the docs ).

I realize this is not a detailed answer, but what I just described is what I would have to do to come up with a math/code formula for you to follow.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM