class_docstr: Core layer of IRV classifier, architecture described in:
  https://www.ncbi.nlm.nih.gov/pmc/articles/PMC2750043/
class_docstr_tok: ["Core","layer","of","IRV","classifier",",","architecture","described","in",":","https",":","\/\/www.ncbi.nlm.nih.gov\/pmc\/articles\/PMC2750043\/"]
docstr: Parameters
  ----------
  n_tasks: int
      Number of tasks
  K: int
      Number of nearest neighbours used in classification
  penalty: float
      Amount of penalty (l2 or l1 applied)
docstr_tok: ["Parameters","--","--","--","--","--","n_tasks",":","int","Number","of","tasks","K",":","int","Number","of","nearest","neighbours","used","in","classification","penalty",":","float","Amount","of","penalty","(","l2","or","l1","applied",")"]
code: def __init__(self, n_tasks, K, penalty, **kwargs):
      """
      Parameters
      ----------
      n_tasks: int
          Number of tasks
      K: int
          Number of nearest neighbours used in classification
      penalty: float
          Amount of penalty (l2 or l1 applied)
      """
      self.n_tasks = n_tasks
      self.K = K
      self.penalty = penalty
      super(IRVLayer, self).__init__(**kwargs)
  
imports: import numpy
  import tensorflow
  from deepchem.models import KerasModel, layers
  from deepchem.models.losses import SigmoidCrossEntropy
  from tensorflow.keras.layers import Input, Layer, Activation, Concatenate, Lambda
  import warnings
label_desc: Use image node_id 1 to create a new IRVLayer object from inherited base classes: Layer with example: obj = IRVLayer(n_tasks, K, penalty)