myogestic.models.definitions.sklearn_models.predict#

myogestic.models.definitions.sklearn_models.predict(model, input, is_classifier)[source]#

Predict with a sklearn model.

Parameters:
  • model (Any) – The sklearn model to predict with.

  • input (np.ndarray) – The input data to predict.

  • is_classifier (bool) – Whether the model is a classifier.

Returns:

The prediction of the model. If the model is a classifier, the prediction is a np.array. Otherwise, the prediction is a list of floats.

Return type:

Union[np.ndarray, list[float]]