DataPredict

API Reference - Others - OnlineLearning

Online learning allows models to update continuously as it receives new data, making it capable of real-time training.

Constructors

new()

Creates a new online learning object

 OnlineLearning.new(Model: ModelObject, isOutputRequired: boolean, batchSize: integer): OnlineLearningObject

Parameters:

Functions

start()

Creates new threads for real-time training.

OnlineLearning:start(showFinalCost: boolean, showWaitWarning: boolean): coroutine

Parameters:

Returns:

stop()

Stops the threads for real-time training.

OnlineLearning:stop()

addInput()

Adds feature vector / token input sequence array to to queue.

OnlineLearning:addInput(input: matrix / tokenSequenceArray[])

Parameters:

addOutput()

Adds label / token output sequence array to queue.

OnlineLearning:addOutput(output: integer / tokenSequenceArray[])

Parameters:

returnCostArray()

Returns cost array from the queue.

OnlineLearning:returnCostArray(): number[]

Returns:

Notes: