Online learning allows models to update continuously as it receives new data, making it capable of real-time training.
Creates a new online learning object
OnlineLearning.new(Model: ModelObject, isOutputRequired: boolean, batchSize: integer): OnlineLearningObject
Model: The model to be trained.
isOutputRequired: Set whether or not the model requires labels / token output sequence arrays.
batchSize: The size of data needed before training the model.
Creates new threads for real-time training.
OnlineLearning:start(showFinalCost: boolean, showWaitWarning: boolean): coroutine
showFinalCost: Set whether or not the final cost is displayed when training is complete.
showWaitWarning: Set whether or not to show that the model have been waiting for data for more than 30 seconds.
Stops the threads for real-time training.
OnlineLearning:stop()
Adds feature vector / token input sequence array to to queue.
OnlineLearning:addInput(input: matrix / tokenSequenceArray[])
Adds label / token output sequence array to queue.
OnlineLearning:addOutput(output: integer / tokenSequenceArray[])
Returns cost array from the queue.
OnlineLearning:returnCostArray(): number[]