class_docstr: Implementation of Scikit-learn interface for xlearn models.
  
  :param model_type: one of 'lr', 'fm', 'ffm'
  :param task: 'binary' for classification or 'reg' for regression
  :param metric: 'acc', 'prec', 'recall', 'f1', 'auc' for classification,
      and 'mae', 'mape', 'rmsd (rmse)' for regression.
  :param log: location of log
  :param lr: learning rate
  :param k: latent factor for factorization
  :param reg_lambda: alias for lambda
  :param init: initial value
  :param fold: number of fold used in cross validation
  :param epoch: number of training epoch
  :param stop_window: window size for early stopping
  :param opt: optimizer option, one of 'sgd', 'adagrad', 'ftrl'
  :param nthread: number of threads (Deprecated, please use n_jobs)
  :param n_jobs: number of threads used to run xlearn.
  :param block_size: block size for on-disk training.
  :param alpha: alpha for FTRL
  :param beta: beta for FTRL
  :param lambda_1: lambda_1 for FTRL
  :param lambda_2: lambda_2 for FTRL
  :param kwargs: extra input arguments
class_docstr_tok: ["Implementation","of","Scikit-learn","interface","for","xlearn","models",".",":","param","model_type",":","one","of","'lr","'",",","'fm","'",",","'ffm'",":","param","task",":","'binary","'","for","classification","or","'reg","'","for","regression",":","param","metric",":","'acc","'",",","'prec","'",",","'recall","'",",","'f1","'",",","'auc","'","for","classification",",","and","'mae","'",",","'mape","'",",","'rmsd","(","rmse",")","'","for","regression",".",":","param","log",":","location","of","log",":","param","lr",":","learning","rate",":","param","k",":","latent","factor","for","factorization",":","param","reg_lambda",":","alias","for","lambda",":","param","init",":","initial","value",":","param","fold",":","number","of","fold","used","in","cross","validation",":","param","epoch",":","number","of","training","epoch",":","param","stop_window",":","window","size","for","early","stopping",":","param","opt",":","optimizer","option",",","one","of","'sgd","'",",","'adagrad","'",",","'ftrl'",":","param","nthread",":","number","of","threads","(","Deprecated",",","please","use","n_jobs",")",":","param","n_jobs",":","number","of","threads","used","to","run","xlearn",".",":","param","block_size",":","block","size","for","on-disk","training",".",":","param","alpha",":","alpha","for","FTRL",":","param","beta",":","beta","for","FTRL",":","param","lambda_1",":","lambda_1","for","FTRL",":","param","lambda_2",":","lambda_2","for","FTRL",":","param","kwargs",":","extra","input","arguments"]
code: def _remove_temp_file(self, temp_file):
      # The temp_file might be converted to binary file during training/inference.
      # remove both original temp_file and derived binary file if exist
      temp_bin_file = temp_file.name + ".bin"
      if os.path.exists(temp_bin_file):
          os.remove(temp_bin_file)
      temp_file.close()
      if os.path.exists(temp_file.name):
          os.remove(temp_file.name)
  
imports: import os
  import shutil
  import tempfile
  import warnings
  import numpy
  from .xlearn import create_linear, create_fm, create_ffm
  from .data import DMatrix
  from sklearn.base import BaseEstimator
  from sklearn.utils import check_array, check_X_y
label_desc: Use image node_id 10 for calling the BaseXLearnModel obj's underlying member method code with example usage: obj._remove_temp_file(temp_file) without return types