官术网_书友最值得收藏!

Ensemble learning random forest

One-sentence explanation for LOTR fans: if decision trees were Ents, the random forest would be an Entmoot. For everyone else, random forest algorithm works like this:

  • Split data into random subsets of equal size, maybe with replacement
  • On each of those subsets, build a decision tree, choosing for every split a random feature subset of fixed size
  • To perform inference, perform a voting among the trees (classification), or average their predictions (regression)

Such tree ensembles are very popular in certain domains, because their prediction quality beats most other models.

Most likely, this is not the model you want to train on a mobile device, due to the memory and time limitations, but you can still use it for inference thanks to Core ML. The workflow looks like this:

  • Pre-train random forest in scikit-learn
  • Export the model in the scikit-learn format
  • Convert it to the Apple mlmodel format with the help of the coremltool Python package
  • Import it in your iOS project using Core ML framework

By the way, if you look at the inner structure of the GameplayKit's tree learner in a debugger or playground, you'll see that it also uses random forest under the hood.

主站蜘蛛池模板: 遂昌县| 洛浦县| 宣恩县| 南溪县| 天长市| 黄梅县| 长武县| 长武县| 阿克陶县| 东海县| 彭州市| 淅川县| 陆河县| 桑植县| 阳谷县| 桐城市| 南通市| 牙克石市| 交口县| 西城区| 崇信县| 弥渡县| 新宁县| 平邑县| 中江县| 枣庄市| 惠来县| 新源县| 峨眉山市| 通山县| 陇西县| 五大连池市| 宁安市| 灵台县| 平山县| 木兰县| 山阳县| 临湘市| 竹溪县| 泸西县| 东山县|