module prediction.skmultiflow.skmultiflow_classifier

Scikit-Multiflow Predictive Model Wrapper.

This module contains a wrapper class for scikit-multiflow predictive models.

Copyright (C) 2022 Johannes Haug.


class SkmultiflowClassifier

Wrapper for scikit-multiflow predictive models.

Attributes:

  • model (ClassifierMixin): The scikit-multiflow predictor object.
  • classes (list): A list of all unique classes.

method SkmultiflowClassifier.__init__

__init__(
    model: skmultiflow.core.base.ClassifierMixin,
    classes: list,
    reset_after_drift: bool = False
)

Inits the wrapper.

Args:

  • model: The scikit-multiflow predictor object.
  • classes: A list of all unique classes.
  • reset_after_drift: A boolean indicating if the predictor will be reset after a drift was detected.

method SkmultiflowClassifier.partial_fit

partial_fit(
    X: Union[numpy._array_like._SupportsArray[numpy.dtype], numpy._nested_sequence._NestedSequence[numpy._array_like._SupportsArray[numpy.dtype]], bool, int, float, complex, str, bytes, numpy._nested_sequence._NestedSequence[Union[bool, int, float, complex, str, bytes]]],
    y: Union[numpy._array_like._SupportsArray[numpy.dtype], numpy._nested_sequence._NestedSequence[numpy._array_like._SupportsArray[numpy.dtype]], bool, int, float, complex, str, bytes, numpy._nested_sequence._NestedSequence[Union[bool, int, float, complex, str, bytes]]],
    sample_weight: Optional[numpy._array_like._SupportsArray[numpy.dtype], numpy._nested_sequence._NestedSequence[numpy._array_like._SupportsArray[numpy.dtype]], bool, int, float, complex, str, bytes, numpy._nested_sequence._NestedSequence[Union[bool, int, float, complex, str, bytes]]] = None
)

Updates the predictor.

Args:

  • X: Array/matrix of observations.
  • y: Array of corresponding labels.
  • sample_weight: Weights per sample. Not used by float at the moment, i.e., all observations in x receive equal weight in a pipeline run.

method SkmultiflowClassifier.predict

predict(
    X: Union[numpy._array_like._SupportsArray[numpy.dtype], numpy._nested_sequence._NestedSequence[numpy._array_like._SupportsArray[numpy.dtype]], bool, int, float, complex, str, bytes, numpy._nested_sequence._NestedSequence[Union[bool, int, float, complex, str, bytes]]]
) → Union[numpy._array_like._SupportsArray[numpy.dtype], numpy._nested_sequence._NestedSequence[numpy._array_like._SupportsArray[numpy.dtype]], bool, int, float, complex, str, bytes, numpy._nested_sequence._NestedSequence[Union[bool, int, float, complex, str, bytes]]]

Predicts the target values.

Args:

  • X: Array/matrix of observations.

Returns:

  • ArrayLike: Predicted labels for all observations.

method SkmultiflowClassifier.predict_proba

predict_proba(
    X: Union[numpy._array_like._SupportsArray[numpy.dtype], numpy._nested_sequence._NestedSequence[numpy._array_like._SupportsArray[numpy.dtype]], bool, int, float, complex, str, bytes, numpy._nested_sequence._NestedSequence[Union[bool, int, float, complex, str, bytes]]]
) → Union[numpy._array_like._SupportsArray[numpy.dtype], numpy._nested_sequence._NestedSequence[numpy._array_like._SupportsArray[numpy.dtype]], bool, int, float, complex, str, bytes, numpy._nested_sequence._NestedSequence[Union[bool, int, float, complex, str, bytes]]]

Predicts the probability of target values.

Args:

  • X: Array/matrix of observations.

Returns:

  • ArrayLike: Predicted probability per class label for all observations.

method SkmultiflowClassifier.reset

reset()

Resets the predictor.


This file was automatically generated via lazydocs.