class_docstr: Generic test scenario for classifiers.
class_docstr_tok: ["Generic","test","scenario","for","classifiers","."]
docstr: Check whether scenario is applicable to obj.
  
  Parameters
  ----------
  obj : class or object to check against scenario
  
  Returns
  -------
  applicable: bool
      True if self is applicable to obj, False if not
docstr_tok: ["Check","whether","scenario","is","applicable","to","obj",".","Parameters","--","--","--","--","--","obj",":","class","or","object","to","check","against","scenario","Returns","--","--","--","-","applicable",":","bool","True","if","self","is","applicable","to","obj",",","False","if","not"]
code: def is_applicable(self, obj):
      """Check whether scenario is applicable to obj.
  
      Parameters
      ----------
      obj : class or object to check against scenario
  
      Returns
      -------
      applicable: bool
          True if self is applicable to obj, False if not
      """
  
      def get_tag(obj, tag_name):
          if isclass(obj):
              return obj.get_class_tag(tag_name)
          else:
              return obj.get_tag(tag_name)
  
      # applicable only if obj inherits from BaseClassifier, BaseEarlyClassifier or
      #   BaseRegressor. currently we test both classifiers and regressors using these
      #   scenarios
      if not scitype(obj) in (
          "classifier",
          "early_classifier",
          "regressor",
      ):
          return False
  
      # if X is multivariate, applicable only if can handle multivariate
      is_multivariate = not self.get_tag("X_univariate")
      if is_multivariate and not get_tag(
          obj, "capability:multivariate"
      ):
          return False
  
      # if X is unequal length, applicable only if can handle unequal length
      is_unequal_length = self.get_tag("X_unequal_length")
      if is_unequal_length and not get_tag(
          obj, "capability:unequal_length"
      ):
          return False
  
      return True
  
file_path: sktime/sktime/utils/_testing/scenarios_classification.py
imports: from inspect import isclass
  from sktime.base import BaseObject
  from sktime.registry import scitype
  from sktime.utils._testing.hierarchical import _make_hierarchical
  from sktime.utils._testing.panel import _make_classification_y, _make_panel_X
  from sktime.utils._testing.scenarios import TestScenario
label_desc: Use image node_id 2 for calling the ClassifierTestScenario obj's underlying member method code with example usage: obj.is_applicable(obj) and returns: True, False, False, False, obj, obj