parameters: (self, bonsaiObj, lW, lT, lV, lZ, sW, sT, sV, sZ,
                   learningRate, X, Y, useMCHLoss=False, outFile=None, regLoss='huber')
docstring: bonsaiObj - Initialised Bonsai Object and Graph
          lW, lT, lV and lZ are regularisers to Bonsai Params
          sW, sT, sV and sZ are sparsity factors to Bonsai Params
          learningRate - learningRate fro optimizer
          X is the Data Placeholder - Dims [_, dataDimension]
          Y - Label placeholder for loss computation
          useMCHLoss - For choice between HingeLoss vs CrossEntropy
          useMCHLoss - True - MultiClass - multiClassHingeLoss
          useMCHLoss - False - MultiClass - crossEntropyLoss
docstring_summary: bonsaiObj - Initialised Bonsai Object and Graph
          lW, lT, lV and lZ are regularisers to Bonsai Params
          sW, sT, sV and sZ are sparsity factors to Bonsai Params
          learningRate - learningRate fro optimizer
          X is the Data Placeholder - Dims [_, dataDimension]
          Y - Label placeholder for loss computation
          useMCHLoss - For choice between HingeLoss vs CrossEntropy
          useMCHLoss - True - MultiClass - multiClassHingeLoss
          useMCHLoss - False - MultiClass - crossEntropyLoss
docstring_tokens: bonsaiObj - Initialised Bonsai Object and Graph lW lT lV and lZ are regularisers to Bonsai Params sW sT sV and sZ are sparsity factors to Bonsai Params learningRate - learningRate fro optimizer X is the Data Placeholder - Dims [ _ dataDimension ] Y - Label placeholder for loss computation useMCHLoss - For choice between HingeLoss vs CrossEntropy useMCHLoss - True - MultiClass - multiClassHingeLoss useMCHLoss - False - MultiClass - crossEntropyLoss
function: def __init__(self, bonsaiObj, lW, lT, lV, lZ, sW, sT, sV, sZ,
                   learningRate, X, Y, useMCHLoss=False, outFile=None, regLoss='huber'):
          '''
          bonsaiObj - Initialised Bonsai Object and Graph
          lW, lT, lV and lZ are regularisers to Bonsai Params
          sW, sT, sV and sZ are sparsity factors to Bonsai Params
          learningRate - learningRate fro optimizer
          X is the Data Placeholder - Dims [_, dataDimension]
          Y - Label placeholder for loss computation
          useMCHLoss - For choice between HingeLoss vs CrossEntropy
          useMCHLoss - True - MultiClass - multiClassHingeLoss
          useMCHLoss - False - MultiClass - crossEntropyLoss
          '''
  
          self.bonsaiObj = bonsaiObj
          self.regressionLoss = regLoss
  
          self.lW = lW
          self.lV = lV
          self.lT = lT
          self.lZ = lZ
  
          self.sW = sW
          self.sV = sV
          self.sT = sT
          self.sZ = sZ
  
          self.Y = Y
          self.X = X
  
          self.useMCHLoss = useMCHLoss
  
          if outFile is not None:
              print("Outfile : ", outFile)
              self.outFile = open(outFile, 'w')
          else:
              self.outFile = sys.stdout
  
          self.learningRate = learningRate
  
          self.assertInit()
  
          self.sigmaI = tf.placeholder(tf.float32, name='sigmaI')
  
          self.score, self.X_ = self.bonsaiObj(self.X, self.sigmaI)
  
          self.loss, self.marginLoss, self.regLoss = self.lossGraph()
  
          self.trainStep = self.trainGraph()
          '''
          self.accuracy -> 'MAE' for Regression.
          self.accuracy -> 'Accuracy' for Classification.
          '''
          self.accuracy = self.accuracyGraph()
          self.prediction = self.bonsaiObj.getPrediction()
  
          if self.sW > 0.99 and self.sV > 0.99 and self.sZ > 0.99 and self.sT > 0.99:
              self.isDenseTraining = True
          else:
              self.isDenseTraining = False
  
          self.hardThrsd()
          self.sparseTraining()
function_tokens: def __init__ ( self , bonsaiObj , lW , lT , lV , lZ , sW , sT , sV , sZ , learningRate , X , Y , useMCHLoss = False , outFile = None , regLoss = 'huber' ) : self . bonsaiObj = bonsaiObj self . regressionLoss = regLoss self . lW = lW self . lV = lV self . lT = lT self . lZ = lZ self . sW = sW self . sV = sV self . sT = sT self . sZ = sZ self . Y = Y self . X = X self . useMCHLoss = useMCHLoss if outFile is not None : print ( "Outfile : " , outFile ) self . outFile = open ( outFile , 'w' ) else : self . outFile = sys . stdout self . learningRate = learningRate self . assertInit ( ) self . sigmaI = tf . placeholder ( tf . float32 , name = 'sigmaI' ) self . score , self . X_ = self . bonsaiObj ( self . X , self . sigmaI ) self . loss , self . marginLoss , self . regLoss = self . lossGraph ( ) self . trainStep = self . trainGraph ( ) '''
          self.accuracy -> 'MAE' for Regression.
          self.accuracy -> 'Accuracy' for Classification.
          ''' self . accuracy = self . accuracyGraph ( ) self . prediction = self . bonsaiObj . getPrediction ( ) if self . sW > 0.99 and self . sV > 0.99 and self . sZ > 0.99 and self . sT > 0.99 : self . isDenseTraining = True else : self . isDenseTraining = False self . hardThrsd ( ) self . sparseTraining ( )