Search code examples
ioscoreml

How to use Naive Bayes Binary Classification in CoreML?


I am trying to build a number classification model in CoreML and want to use the naive bayes classifier but not able to find how to use it. My algorithm is using naive bayes


Solution

  • At the moment, coremltools support only following types of classifiers:

    • SVMs (scikitlearn)
    • Neural networks (Keras, Caffe)
    • Decision trees and their ensembles (scikitlearn, xgboost)
    • Linear and logistic regression (scikitlearn)

    However, implementing Naïve Bayes in Swift yourself is not that hard, check this implementation, for example.