docstr: Apply predictor arguments and get predictions
docstr_tok: ["Apply","predictor","arguments","and","get","predictions"]
code: def _predict_model(self, s, model, df, args):
      """Apply predictor arguments and get predictions"""
      model_type = args["model_type"]
      kwargs = self._select_keys(args, "predict_")
      if (
          model_type == "classification"
          or model_type == "regression"
          or model_type == "clustering"
          or model_type == "anomaly"
      ):
          kwargs["data"] = df
      elif model_type == "time_series":
          # do nothing
          pass
      else:
          raise Exception(f"Unrecognized model type '{model_type}'")
      return s.predict_model(model, **kwargs)
  
file_path: mindsdb/mindsdb/integrations/handlers/pycaret_handler/pycaret_handler.py
imports: from typing import Optional, Dict
  import os
  import pandas
  from mindsdb.integrations.libs.base import BaseMLEngine
  from pycaret.classification import ClassificationExperiment
  from pycaret.regression import RegressionExperiment
  from pycaret.time_series import TSForecastingExperiment
  from pycaret.clustering import ClusteringExperiment
  from pycaret.anomaly import AnomalyExperiment
label_desc: Use image node_id 6 for calling the PyCaretHandler obj's underlying member method code with example usage: obj._predict_model(s, model, df, args) and returns: s