class_docstr: Counterfactual Reinforcement Learning. 
class_docstr_tok: ["Counterfactual","Reinforcement","Learning","."]
docstr: Check if the prediction task is classification by looking at the model's prediction shape.
  
  Parameters
  ----------
  pred
      Model's prediction.
  
  Returns
  -------
  ``True`` if the prediction has shape of 2 and the second dimension bigger grater than 1. ``False`` otherwise.
code: def _is_classification(pred: np.ndarray) -> bool:
      """
      Check if the prediction task is classification by looking at the model's prediction shape.
  
      Parameters
      ----------
      pred
          Model's prediction.
  
      Returns
      -------
      ``True`` if the prediction has shape of 2 and the second dimension bigger grater than 1. ``False`` otherwise.
      """
      return len(pred.shape) == 2 and pred.shape[1] > 1
  
imports: import logging
  import os
  from abc import ABC, abstractmethod
  from copy import deepcopy
  from typing import TYPE_CHECKING, Any, Callable, Dict, Optional, Tuple, Union, cast
  import numpy
  from tqdm import tqdm
  from alibi.api.defaults import DEFAULT_DATA_CFRL, DEFAULT_META_CFRL
  from alibi.api.interfaces import Explainer, Explanation, FitMixin
  from alibi.explainers.backends.cfrl_base import generate_empty_condition, get_classification_reward, get_hard_distribution, identity_function
  from alibi.utils.frameworks import Framework, has_pytorch, has_tensorflow
label_desc: Use image node_id 13 for calling the CounterfactualRL obj's underlying member method code with example usage: obj._is_classification(pred) and returns: unknown