The base model for all machine and deep learning models.
Creates a new machine learning base model.
BaseModel.new(): BaseModelObject
Sets how the initial model parameters values are generated. The model parameters will be generated when train() function is run.
BaseModel:setModelParametersInitializationMode(initializationMode: string, minimumModelParametersInitializationValue: number, maximumModelParametersInitializationValue: number)
initializationMode: The mode for the matrices to be initialized. Available options are:
Zero
Random
RandomNormal
RandomUniformPositive
RandomUniformNegative
RandomUniformNegativeAndPositive
HeUniform
HeNormal
XavierUniform
XavierNormal
LeCunUniform
LeCunNormal
None
minimumModelParametersInitializationValue: The minimum value to be generated by the model. Only applicable to “Random” initialization mode.
maximumModelParametersInitializationValue: The maximum value to be generated by the model. Only applicable to “Random” initialization mode.
Gets the model parameters from the base model.
BaseModel:getModelParameters(doNotDeepCopy: boolean): ModelParameters
Set the model parameters to the base model.
BaseModel:setModelParameters(ModelParameters: ModelParameters, doNotDeepCopy: boolean)
ModelParameters: A matrix/table containing model parameters to be given to the base model.
doNotDeepCopy: Set whether or not to deep copy the model parameters.
Clears the model parameters contained inside base model.
BaseModel:clearModelParameters()
Set the number of iterations needed to calculate the costs. This is to save computational time.
BaseModel:setModelParameters(numberOfIterationsPerCostCalculation: number)
Set the number of iterations needed to confirm convergence.
BaseModel:setNumberOfIterationsToCheckIfConverged(numberOfIterations: number)
Set the upper bound and lower bounds of the target cost.
BaseModel:setTargetCost(upperBound: number, lowerBound: number)
upperBound: The upper bound of target cost.
lowerBound: The lower bound of target cost.
Set if the model prints output.
BaseModel:setPrintOutput(option: boolean)
Set wait durations inside the models to avoid exhausting script running time.
BaseModel:setWaitDurations(iterationWaitDuration: number, dataWaitDuration: number, sequenceWaitDuration: number)
iterationWaitDuration: The wait duration between the iterations.
dataWaitDuration: The wait duration between the data calculations.
sequenceWaitDuration: The wait duration between the token sequence.