flox.logic.base_model_trainer.BaseModelTrainer

class BaseModelTrainer[source]

Bases: object

Abstract base class for FLoX ML model trainers

Methods

evaluate

Evaluates the model using testing data

fit

Fits the model using training data

get_weights

Returns the weights of the model as a Numpy array

set_weights

Sets the model's weights to the new weights

evaluate()[source]

Evaluates the model using testing data

fit()[source]

Fits the model using training data

Return type:

List[ndarray[Any, dtype[Any]]]

Returns

NDArrays

the new model weights in the Numpy array form

get_weights()[source]

Returns the weights of the model as a Numpy array

Return type:

List[ndarray[Any, dtype[Any]]]

Returns

NDArrays

the model’s weights as Numpy arrays

set_weights(new_weights)[source]

Sets the model’s weights to the new weights

Return type:

None

Parameters

new_weights: NDArrays

new model weights in the Numpy array form