class_docstr: Inductive conformal classifier.
  
  Parameters
  ----------
  nc_function : BaseScorer
      Nonconformity scorer object used to calculate nonconformity of
      calibration examples and test patterns. Should implement ``fit(x, y)``
      and ``calc_nc(x, y)``.
  
  smoothing : boolean
      Decides whether to use stochastic smoothing of p-values.
  
  Attributes
  ----------
  cal_x : numpy array of shape [n_cal_examples, n_features]
      Inputs of calibration set.
  
  cal_y : numpy array of shape [n_cal_examples]
      Outputs of calibration set.
  
  nc_function : BaseScorer
      Nonconformity scorer object used to calculate nonconformity scores.
  
  classes : numpy array of shape [n_classes]
      List of class labels, with indices corresponding to output columns
       of IcpClassifier.predict()
  
  See also
  --------
  IcpRegressor
  
  References
  ----------
  .. [1] Papadopoulos, H., & Haralambous, H. (2011). Reliable prediction
      intervals with regression neural networks. Neural Networks, 24(8),
      842-851.
class_docstr_tok: ["Inductive","conformal","classifier",".","Parameters","--","--","--","--","--","nc_function",":","BaseScorer","Nonconformity","scorer","object","used","to","calculate","nonconformity","of","calibration","examples","and","test","patterns",".","Should","implement","``","fit","(","x",",","y",")","``","and","``","calc_nc","(","x",",","y",")","``",".","smoothing",":","boolean","Decides","whether","to","use","stochastic","smoothing","of","p-values",".","Attributes","--","--","--","--","--","cal_x",":","numpy","array","of","shape","[","n_cal_examples",",","n_features","]","Inputs","of","calibration","set",".","cal_y",":","numpy","array","of","shape","[","n_cal_examples","]","Outputs","of","calibration","set",".","nc_function",":","BaseScorer","Nonconformity","scorer","object","used","to","calculate","nonconformity","scores",".","classes",":","numpy","array","of","shape","[","n_classes","]","List","of","class","labels",",","with","indices","corresponding","to","output","columns","of","IcpClassifier.predict","(",")","See","also","--","--","--","--","IcpRegressor","References","--","--","--","--","--","..","[","1","]","Papadopoulos",",","H.",",","&","Haralambous",",","H.","(","2011",")",".","Reliable","prediction","intervals","with","regression","neural","networks",".","Neural","Networks",",","24","(","8",")",",","842-851","."]
code: def __init__(
      self,
      nc_function: FunctionType,
      condition: Union[bool, FunctionType] = None,
      cal_size: int = None,
      smoothing: bool = True,
  ) -> None:
      super(IcpClassifier, self).__init__(
          nc_function, condition, cal_size
      )
      self.classes = None
      self.smoothing = smoothing
  
imports: from collections import defaultdict
  from functools import partial
  from typing import Optional, Union
  import numpy
  from sklearn.base import BaseEstimator
  from lightwood.analysis.nc.base import RegressorMixin, ClassifierMixin, TSMixin
  from types import FunctionType
label_desc: Use image node_id 1 to create a new IcpClassifier object from inherited base classes: BaseIcp, ClassifierMixin with example: obj = IcpClassifier(nc_function, condition, cal_size, smoothing)