parameters: (objID, data, minVal_Y, extent_Y, hyperbox, batchSize, patience)
return_statement: return treeNode, rrmse, sampleNum, testX, testY
docstring: 仅用数据训练当前结点
docstring_summary: 仅用数据训练当前结点
docstring_tokens: 仅用数据训练当前结点
function: def TrainKDTreeNode(objID, data, minVal_Y, extent_Y, hyperbox, batchSize, patience):
      """
      仅用数据训练当前结点
      """
  
      expendedHyperbox = hyperbox.GenExpandedHyperbox(expandRate)
      dataInBox = expendedHyperbox.SelectData(data)
  
      # check sample num
      sampleNum = dataInBox.shape[0]
      if sampleNum < 6030:
          print("sampleNum({0}) < 6030, not enough".format(sampleNum))
          return None, 9999, sampleNum
      else:
          print("sampleNum: {0}".format(sampleNum))
  
      # train model
      trainX, trainY, testX, testY = DivideData(dataInBox)
      model = TrainModel(trainX, trainY, batchSize, patience)
  
      # evaluate rrmse
      rrmse = EvaluateRRMSE(model, testX, testY, minVal_Y, extent_Y)
      print("rrmse: {0}".format(rrmse))
  
      treeNode = util.ModelKDTree(objID, rrmse, model)
  
      return treeNode, rrmse, sampleNum, testX, testY
function_tokens: def TrainKDTreeNode ( objID , data , minVal_Y , extent_Y , hyperbox , batchSize , patience ) : expendedHyperbox = hyperbox . GenExpandedHyperbox ( expandRate ) dataInBox = expendedHyperbox . SelectData ( data ) # check sample num sampleNum = dataInBox . shape [ 0 ] if sampleNum < 6030 : print ( "sampleNum({0}) < 6030, not enough" . format ( sampleNum ) ) return None , 9999 , sampleNum else : print ( "sampleNum: {0}" . format ( sampleNum ) ) # train model trainX , trainY , testX , testY = DivideData ( dataInBox ) model = TrainModel ( trainX , trainY , batchSize , patience ) # evaluate rrmse rrmse = EvaluateRRMSE ( model , testX , testY , minVal_Y , extent_Y ) print ( "rrmse: {0}" . format ( rrmse ) ) treeNode = util . ModelKDTree ( objID , rrmse , model ) return treeNode , rrmse , sampleNum , testX , testY