OSNN#
- class capymoa.ssl.classifier.OSNN[source]#
- Bases: - ClassifierSSL- Online Semi-Supervised Neural Network. - Online Semi-Supervised Neural Network (OSNN) [1] is a neural network designed for semi-supervised learning in non-stationary data streams. - __init__(
- schema=None,
- num_center=10,
- n_out=1,
- window_size=200,
- beta=1,
- gamma=1,
- optim_steps=200,
- seed=1,
 - predict(instance)[source]#
- Predict the label of an instance. - The base implementation calls - predict_proba()and returns the label with the highest probability.- Parameters:
- instance – The instance to predict the label for. 
- Returns:
- The predicted label or - Noneif the classifier is unable to make a prediction.
 
 - predict_proba(instance)[source]#
- Return probability estimates for each label. - Parameters:
- instance – The instance to estimate the probabilities for. 
- Returns:
- An array of probabilities for each label or - Noneif the classifier is unable to make a prediction.
 
 - train(instance)[source]#
- Train the classifier with a labeled instance. - Parameters:
- instance – The labeled instance to train the classifier with. 
 
 - random_seed: int#
- The random seed for reproducibility. - When implementing a classifier ensure random number generators are seeded.