class_docstr: Class that performs the main optimization.
  Keeps track of the current x and iterates through data to learn x given the penalty and order.
class_docstr_tok: ["Class","that","performs","the","main","optimization",".","Keeps","track","of","the","current","x","and","iterates","through","data","to","learn","x","given","the","penalty","and","order","."]
docstr: Transforms multiclass classification problems into a binary classification problem.
docstr_tok: ["Transforms","multiclass","classification","problems","into","a","binary","classification","problem","."]
code: def transform_y_into_binary(self, ysub, target_class):
      """
      Transforms multiclass classification problems into a binary classification problem.
      """
      with torch.no_grad():
          ysub_binary = torch.zeros_like(ysub)
          if self.ordinal:
              # turn ordinal problems into n-1 classifications of is this
              # example less than rank k
              if target_class == 0:
                  return None
  
              ysub_binary[ysub >= target_class] = 1
              ysub_binary[ysub < target_class] = -1
          else:
              # turn multiclass problems into n binary classifications
              ysub_binary[ysub == target_class] = 1
              ysub_binary[ysub != target_class] = -1
      return ysub_binary
  
imports: import time
  import numpy
  import scipy.special
  import torch
  import torch.nn
  from .None import constants
  from .None import syssettings
  from .fginitialize import ChunkDataLoader
label_desc: Use image node_id 6 for calling the Solver obj's underlying member method code with example usage: obj.transform_y_into_binary(ysub, target_class) and returns: ysub_binary, None