It is a class for handling the merging of model parameters.
“WeightedAverage” and “Best” does not work with models that do not store tables of matrices or matrix. It also does not work for models with sequential output. For example:
DBSCAN and AffinityPropagation models. (Contains non-matrices)
Recurrent Neural Network and LSTM models. (The outputs are sequential)
Creates a new ModelParametersMerger object. If any of the arguments are not given, default argument values for that argument will be used.
ModelParametersMerger.new(Model: ModelObject, modelType: string, mergeType: string): ModelParametersMergerObject
Model: The model object needed to perform certain merges.
modelType: The type where the model falls under. Available options are “Regression”, “Classification” and “Clustering”.
mergeType: Sets how a new ModelParameters is generated from given multiple ModelParameters. Available options are:
Average
WeightedAverage
WeightedAverageEqual
Best
Custom
Set ModelParametersMerger’s parameters. When any of the arguments are not given, previous argument values for that argument will be used.
ModelParametersMerger:setParameters(Model: ModelObject, modelType: string, mergeType: string)
Model: The model object needed to perform certain merges.
modelType: The type where the model falls under. Available options are “Regression”, “Classification” and “Clustering”.
mergeType: Sets how a new ModelParameters is generated from given multiple ModelParameters. Available options are:
Average
WeightedAverage
WeightedAverageEqual
Best
Custom
Merges existing model parameters to create a new one.
ModelParametersMerger:merge(...: table/matrix): table / matrix
Sets a custom split percentage for each of the model parameters. This will be used when “custom” merge type is used.
ModelParametersMerger:setCustomSplitPercentageArray(splitPercentageArray: number[])
Set the feature matrix and the label vector to perform certain merges.
ModelParametersMerger:setData(featureMatrix: Matrix, labelVector: Matrix)
featureMatrix: The matrix that contains all the data.
labelVector: The matrix that contains data related to feature matrix (optional).