CreateML Activity Classifier Continuous Prediction

144 Views Asked by At

I am building an application that uses CreateML Activity Classifier to make a prediction from sensor data. Currently I am able to get the prediction to work correctly when telling the app when to start and stop recording live sensor data.( Ex. 1. Start recording sensor data 2. Do gesture 3. Stop recording sensor data. 4. Predict ) This works fine but I am confused on how I can predict sensor data coming in live without telling the app when to record and stop recording. If I set it to a fixed value and use a counter such as when you have 300 values, make a prediction; I feel this wouldn't work because what if I didn't start doing the gesture until it already had recorded 200 values and it only got 100 values of my gesture which takes 300 values to complete and the following recording would only get the last 200 values of my gesture. This would result in an incorrect prediction correct? Is there a technique where I can have continuous predictions? I am new to iOS and ML so forgive my ignorance on the subject, any help is appreciated.

0

There are 0 best solutions below