Batch#

class capymoa.base.Batch[source]#

Bases: ABC

Base class for batch processing in CapyMOA

abstract batch_predict(x: Tensor) Tensor[source]#

Predict the target values for a batch of instances.

Parameters:

x – A batch of feature vectors of shape (batch_size, num_features).

Returns:

Predicted target values, typically a vector of shape (batch_size,).

abstract batch_train(x: Tensor, y: Tensor) None[source]#

Train the model with a batch of instances.

Parameters:
  • x – A batch of feature vectors of shape (batch_size, num_features).

  • y – A batch of target values, typically a vector of shape (batch_size,).

device: device = device(type='cpu')#

Device on which the batch will be processed.

x_dtype: dtype#

Data type for the input features.

y_dtype: dtype#

Data type for the target value/labels.