# Introduction of MotokoLearn V0.1: on-chain training and inference of machine learning models

**URL:** <https://forum.dfinity.org/t/introduction-of-motokolearn-v0-1-on-chain-training-and-inference-of-machine-learning-models/25312>\
**Category:** Motoko\
**Created:** [December 6, 2023, 6:05pm UTC](https://forum.dfinity.org/t/introduction-of-motokolearn-v0-1-on-chain-training-and-inference-of-machine-learning-models/25312 "2023-12-06T18:05:00Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![ildefons](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.dfinity.org/ildefons/32/2638_2.png) [@ildefons](https://forum.dfinity.org/u/ildefons)\
**Post date:** [December 6, 2023, 6:05pm UTC](https://forum.dfinity.org/t/introduction-of-motokolearn-v0-1-on-chain-training-and-inference-of-machine-learning-models/25312/1 "2023-12-06T18:05:00Z")

</div>

# motokolearn

Motokolearn is a Motoko package meant to facilitate on-chain training and inference of machine learning models where having a GPU is not a requirement.

### Project github: [GitHub - ildefons/motokolearn](https://github.com/ildefons/motokolearn)

### Why on-chain training and inference of machine learning models is interesting?​

- Web3 services using on-chain trained models can inherit security and verification capabilities from the underlying Internet Computer protocol ​
- Overall dapp architecture can be simplified by eeliminate dependencies with external web2 providers and/or avoid using pre-compiled WASM modules of pre-trained machine learning models

### Why do we care about small to mid-sized data problems not requiring a GPU?​

- Small to medium size data problems of heterogenous “tabular” data is often better solved with ensemble of boosted trees​
- From personal experience, 1) many Kaggle challenges are better solved with ensembles of trees; and 2) last year alone, I consulted with three medium sized startups and all projects involved data bases below 100 megabytes and none of them required the use of large neural network nor GPUs.

### Installation and tutorial: [motokolearn/README.md at master · ildefons/motokolearn · GitHub](https://github.com/ildefons/motokolearn/blob/master/README.md)

### Next steps:

✅ Final Dfinity Grant milestone review  
2) Do mops package  
3) Integration of linear algebra library (linear solver and matrix decomposition functionalities)  
4) Development of filtering methods for efficient sequential model updates (Kalman filter, recursive least squares)  
5) Development of clusting methods (K-means, spectral clustering)  
6) Community support

### Please, let me know if you are interested in prioritizing a particular machine learning method

---

<div class="post-metadata">

**Author:** ![Gekctek](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.dfinity.org/gekctek/32/6863_2.png) [@Gekctek](https://forum.dfinity.org/u/Gekctek)\
**Post date:** [December 7, 2023, 12:21am UTC](https://forum.dfinity.org/t/introduction-of-motokolearn-v0-1-on-chain-training-and-inference-of-machine-learning-models/25312/2 "2023-12-07T00:21:43Z")

</div>

Not a machine learning dev, but as a Motoko dev I appreciate when people decide to expand the Motoko ecosystem. Nice work

---

<div class="post-metadata">

**Author:** ![Samer](https://sea1.discourse-cdn.com/flex023/user_avatar/forum.dfinity.org/samer/32/8943_2.png) [@Samer](https://forum.dfinity.org/u/Samer)\
**Post date:** [April 2, 2024, 1:33pm UTC](https://forum.dfinity.org/t/introduction-of-motokolearn-v0-1-on-chain-training-and-inference-of-machine-learning-models/25312/3 "2024-04-02T13:33:18Z")

</div>

Exciting stuff!

Looking forward to delve into the technical concepts.
