We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
isRunning
1 parent 1a2d227 commit 8e11591Copy full SHA for 8e11591
pxtextension.ts
@@ -150,6 +150,10 @@ namespace ml {
150
//% parts="v2"
151
//% help=github:machine-learning/docs/ml_get_event_certainty
152
export function getCertainty(event: MlEvent): number {
153
+ if (!isRunning()) {
154
+ startRunning();
155
+ return 0;
156
+ }
157
const eventValue = event.eventValue;
158
if (eventValue <= 1) {
159
// `unknown` can't have a certainty.
0 commit comments