是否可以将经过训练的 sklearn.mixture.GMM 模型与 C++ 一起用于 iOS?

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

我有一个已建立的模型,我正在尝试将其扩展到 iOS 应用程序。

最终我想在服务器上训练模型,然后能够在设备上对特征向量进行评分,而不是每次都调用服务器。

是的,这是可能的,但它涉及……数学。它将涉及使用由 scikit-learn 模型 (weights_, means_, covars_, converged_) 确定的系数手动计算成员概率。

您需要准确了解您的特定 GMM 模型在做什么(可能会挖掘 source code) in the 'predict' method, then use the data members of your model (see the attributes section of the docs)。

我知道这不是一个详细的答案,但我刚才描述的是我必须做的才能得出一个 math/code 公式供您遵循。