Machine Learning with Swift
上QQ阅读APP看书,第一时间看更新

Probabilistic interpretation

The CMMotionActivity class provides a confidence level for each predicted motion type. We can also add this feature to our algorithm. Instead of returning one label, we can return the proportion of labels among neighbors.