Can't figure out how to use Regression Model

Question/Issue: How to setup inference for a Regression Model

Project ID: 315617

**Context/Use case: Trying to run inference on a 5-feature input regression model for local sensor analysis on a Raspberry Pi Pico RP2040. I have ran classification models with no problem by following the tutorials, but I can’t figure out how to inference the regression model. I have deployed the model as a c++ library, but I can’t figure out which functions to use to actually inference the function in my main.cpp file.

In the case of the classification model, I would use the function “run_classifier()” to inference the model. What would be the equivalent function for a regression model?**

Hi @bernarja,

Yes, you still use run_classifier() to perform inference with a regression model. The predicted value is stored in the output (e.g. results.classification[0].value). I have a regression model that I used in a project here: perfect-toast-machine/perfect-toast-machine-limited-sensors/perfect-toast-machine-limited-sensors.ino at e4c575539b4a6bc92c10b2ca1fb182a6d8407705 · ShawnHymel/perfect-toast-machine · GitHub. Hope that helps!

Ahhh of course! I should of thought of that, thank you!

1 Like