https://github.com/edgeimpulse/example-custom-ml-block-sklearn-linear-models
https://github.com/edgeimpulse/example-custom-ml-block-sklearn-linear-models
Last synced: about 2 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/edgeimpulse/example-custom-ml-block-sklearn-linear-models
- Owner: edgeimpulse
- License: bsd-3-clause-clear
- Created: 2024-02-29T20:05:50.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2025-02-10T09:51:14.000Z (3 months ago)
- Last Synced: 2025-03-07T00:58:40.715Z (about 2 months ago)
- Language: Python
- Size: 13.7 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Custom Scikit Learn linear model ML block examples for Edge Impulse
Documentation on the inner workings of these models is found on scikit-learns website [here](https://scikit-learn.org/stable/modules/classes.html#module-sklearn.linear_model).
As a primer, read the [Custom learning blocks](https://docs.edgeimpulse.com/docs/edge-impulse-studio/learning-blocks/adding-custom-learning-blocks) page in the Edge Impulse docs and see another example [here](https://github.com/edgeimpulse/example-custom-ml-block-scikit) which also shows how to test the block locally.
For more information read [Adding parameters to custom blocks](https://docs.edgeimpulse.com/docs/tips-and-tricks/adding-parameters-to-custom-blocks).
### Pushing the block to Edge Impulse
1. Install the [Edge Impulse CLI](https://docs.edgeimpulse.com/docs/edge-impulse-cli/cli-installation) v1.19.3 or higher.
2. Navigate to the directory with the linear model you want to push to edge impulse.
3. Initialize the block:```
$ edge-impulse-blocks init
# Answer the questions, select "Classification" or "Regression" based on the block you wish to install for 'What type of data does this model operate on?'
```
4. Push the block:```
$ edge-impulse-blocks push
```
5. The block is now available under any of your projects. Depending on the data your block operates on, you can add it via:
* Classification: **Create impulse > Add learning block > Classification**, then select the block via 'Add an extra layer' on the 'Classifier' page.
* Regression: **Create impulse > Add learning block > Regression**, then select the block via 'Add an extra layer' on the 'Regression' page.
Or you can select the block on the "Impulse design" page