class_docstr: Base class for models which incorporate inFairness algorithms.
class_docstr_tok: ["Base","class","for","models","which","incorporate","inFairness","algorithms","."]
docstr: Args:
      criterion (torch.nn.Module, keyword-only): Loss function.
      train_split (callable, optional): See :class:`skorch.net.NeuralNet`.
          Note: validation loss *does not* include any fairness loss, only
          the provided criterion, and should not be used for early
          stopping, etc. Default is None (no split).
      regression (bool or 'auto'): Task is regression. If 'auto', this is
          inferred using :func:`sklearn.utils.multiclass.type_of_target`
          on y in fit(). If a Dataset is provided to fit, this defaults to
          False. If y contains 'soft' targets (i.e. probabilities per
          class), this should be manually set to False.
docstr_tok: ["Args",":","criterion","(","torch.nn.Module",",","keyword-only",")",":","Loss","function",".","train_split","(","callable",",","optional",")",":","See",":","class",":","`","skorch.net.NeuralNet","`",".","Note",":","validation","loss","*","does","not","*","include","any","fairness","loss",",","only","the","provided","criterion",",","and","should","not","be","used","for","early","stopping",",","etc",".","Default","is","None","(","no","split",")",".","regression","(","bool","or","'auto","'",")",":","Task","is","regression",".","If","'auto","'",",","this","is","inferred","using",":","func",":","`","sklearn.utils.multiclass.type_of_target","`","on","y","in","fit","(",")",".","If","a","Dataset","is","provided","to","fit",",","this","defaults","to","False",".","If","y","contains","'soft","'","targets","(","i.e",".","probabilities","per","class",")",",","this","should","be","manually","set","to","False","."]
code: def __init__(
      self,
      *args,
      criterion,
      train_split=None,
      regression="auto",
      dataset=Dataset,
      **kwargs,
  ):
      """
      Args:
          criterion (torch.nn.Module, keyword-only): Loss function.
          train_split (callable, optional): See :class:`skorch.net.NeuralNet`.
              Note: validation loss *does not* include any fairness loss, only
              the provided criterion, and should not be used for early
              stopping, etc. Default is None (no split).
          regression (bool or 'auto'): Task is regression. If 'auto', this is
              inferred using :func:`sklearn.utils.multiclass.type_of_target`
              on y in fit(). If a Dataset is provided to fit, this defaults to
              False. If y contains 'soft' targets (i.e. probabilities per
              class), this should be manually set to False.
      """
      super().__init__(
          *args,
          criterion=criterion,
          train_split=train_split,
          dataset=dataset,
          **kwargs,
      )
      self.regression = regression
  
imports: from inFairness import fairalgo
  from sklearn.preprocessing import LabelBinarizer
  from sklearn.utils.multiclass import type_of_target
  from sklearn.exceptions import NotFittedError
  from skorch import NeuralNet
  from skorch.dataset import unpack_data, Dataset
  from skorch.utils import is_pandas_ndframe
label_desc: Use image node_id 1 to create a new InFairnessNet object from inherited base classes: NeuralNet with example: obj = InFairnessNet()