BatchClassifierSSL#
- class capymoa.ssl.classifier.BatchClassifierSSL[source]#
Bases:
ClassifierSSL
,ABC
- abstract train_on_batch(
- x_batch: ndarray[Any, dtype[float64]],
- y_indices: ndarray[Any, dtype[int64]],
Train the model on a batch of instances. Some of the instances may be unlabeled, this is coded as a -1 in the y array.
- Parameters:
x_batch – Batched instances of shape (batch_size, num_attributes)
y_indices – Batched label vector of shape (batch_size,)
- train(instance: LabeledInstance)[source]#
Add an instance to the batch and train the model if the batch is full.