API Reference - Models - BaseModel
The base model for all machine and deep learning models.
Constructors
new()
Creates a new machine learning base model.
BaseModel.new(): BaseModelObject
Functions
setModelParametersInitializationMode()
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)
Parameters:
-
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.
getModelParameters()
Gets the model parameters from the base model.
BaseModel:getModelParameters(doNotDeepCopy: boolean): ModelParameters
Parameters
- doNotDeepCopy: Set whether or not to deep copy the model parameters.
Returns
- ModelParameters: A matrix/table containing model parameters fetched from the base model.
setModelParameters()
Set the model parameters to the base model.
BaseModel:setModelParameters(ModelParameters: ModelParameters, doNotDeepCopy: boolean)
Parameters
-
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.
clearModelParameters()
Clears the model parameters contained inside base model.
BaseModel:clearModelParameters()
setPrintOutput()
Set if the model prints output.
BaseModel:setPrintOutput(option: boolean)
Parameters:
- option: A boolean value that specifies if the output is printed.