diff --git a/docs/ml_get_event_certainty.md b/docs/ml_get_event_certainty.md index 6bd03b7..da7f2ae 100644 --- a/docs/ml_get_event_certainty.md +++ b/docs/ml_get_event_certainty.md @@ -22,10 +22,11 @@ This example displays the ML model's certainty that the current action is `unkno ```blocks loops.everyInterval(1000, function () { - basic.showNumber(ml.getCertainty(ml.event.Unknown)) + basic.showNumber(ml.getCertainty(ml.event.Clapping)) }) ``` ```package +machine-learning-help-stubs=github:microbit-foundation/pxt-microbit-ml-help-stubs#v0.0.1 machine-learning=github:microbit-foundation/pxt-microbit-ml#v1.0.2 ``` diff --git a/docs/ml_is_event_detected.md b/docs/ml_is_event_detected.md index e03764f..4b54294 100644 --- a/docs/ml_is_event_detected.md +++ b/docs/ml_is_event_detected.md @@ -24,12 +24,13 @@ This example will show a tick icon on the LED display if the estimated action is ```blocks basic.forever(function () { - if (ml.isDetected(ml.event.Unknown)) { + if (ml.isDetected(ml.event.Clapping)) { basic.showIcon(IconNames.Yes) } }) ``` ```package +machine-learning-help-stubs=github:microbit-foundation/pxt-microbit-ml-help-stubs#v0.0.1 machine-learning=github:microbit-foundation/pxt-microbit-ml#v1.0.2 ``` diff --git a/docs/ml_on_event_start.md b/docs/ml_on_event_start.md index 985b091..54b48b7 100644 --- a/docs/ml_on_event_start.md +++ b/docs/ml_on_event_start.md @@ -18,11 +18,12 @@ The ML model updates its estimated action several times a second, but this event This example uses the special `unknown` value and plays a musical melody in the background when no action has a certainty above the recognition point. ```blocks -ml.onStart(ml.event.Unknown, function () { +ml.onStart(ml.event.Clapping, function () { music._playDefaultBackground(music.builtInPlayableMelody(Melodies.Dadadadum), music.PlaybackMode.InBackground) }) ``` ```package +machine-learning-help-stubs=github:microbit-foundation/pxt-microbit-ml-help-stubs#v0.0.1 machine-learning=github:microbit-foundation/pxt-microbit-ml#v1.0.2 ``` diff --git a/docs/ml_on_event_stop.md b/docs/ml_on_event_stop.md index 0fa4329..248d7bc 100644 --- a/docs/ml_on_event_stop.md +++ b/docs/ml_on_event_stop.md @@ -20,11 +20,12 @@ For example, if your start event handler for an action starts music playing in t This example uses the special `unknown` option and stops playing a musical melody when the estimated action changes to any other action. ```blocks -ml.onStop(ml.event.Unknown, function () { +ml.onStop(ml.event.Clapping, function () { music.stopMelody(MelodyStopOptions.All) }) ``` ```package +machine-learning-help-stubs=github:microbit-foundation/pxt-microbit-ml-help-stubs#v0.0.1 machine-learning=github:microbit-foundation/pxt-microbit-ml#v1.0.2 ``` diff --git a/docs/ml_on_event_stop_detailed.md b/docs/ml_on_event_stop_detailed.md index f048349..6b831ea 100644 --- a/docs/ml_on_event_stop_detailed.md +++ b/docs/ml_on_event_stop_detailed.md @@ -22,11 +22,12 @@ The event handler is passed a `duration` parameter. The duration is the [number] This example uses the special `unknown` option and shows the duration that `unknown` was the estimated action for in seconds when the estimated action changes to any other action. ```blocks -ml.onStopDetailed(ml.event.Unknown, function (duration) { +ml.onStopDetailed(ml.event.Clapping, function (duration) { basic.showNumber(duration / 1000) }) ``` ```package +machine-learning-help-stubs=github:microbit-foundation/pxt-microbit-ml-help-stubs#v0.0.1 machine-learning=github:microbit-foundation/pxt-microbit-ml#v1.0.2 ```