parameters: (dataset_dir)
return_statement: return xs, ys
docstring: TaskType:binclass
      NumberOfFeatures:2000
      NumberOfInstances:500K
docstring_summary: TaskType:binclass
      NumberOfFeatures:2000
      NumberOfInstances:500K
docstring_tokens: TaskType : binclass NumberOfFeatures : 2000 NumberOfInstances : 500K
function: def epsilon(dataset_dir):
      """
      TaskType:binclass
      NumberOfFeatures:2000
      NumberOfInstances:500K
      """
      url = 'https://www.csie.ntu.edu.tw/~cjlin/libsvmtools/datasets/binary/'
  
      name_train = 'epsilon_normalized.bz2'
      name_test = 'epsilon_normalized.t.bz2'
  
      xs = []
      ys = []
  
      for name in [name_train, name_test]:
          filename = os.path.join(dataset_dir, name)
          if not os.path.exists(filename):
              print('Downloading ' + name)
              urlretrieve(url + name, filename)
  
          print('Processing')
          if name == name_train:
              n_samples = 400000
          else:
              n_samples = 100000
  
          with bz2.BZ2File(filename, 'r') as f:
              x, y = read_libsvm(f, n_samples=n_samples, n_features=2000)
  
              y[y <= 0] = 0
              y[y > 0] = 1
              y.astype(int)
  
              xs.append(x)
              ys.append(y)
  
      return xs, ys
function_tokens: def epsilon ( dataset_dir ) : url = 'https://www.csie.ntu.edu.tw/~cjlin/libsvmtools/datasets/binary/' name_train = 'epsilon_normalized.bz2' name_test = 'epsilon_normalized.t.bz2' xs = [ ] ys = [ ] for name in [ name_train , name_test ] : filename = os . path . join ( dataset_dir , name ) if not os . path . exists ( filename ) : print ( 'Downloading ' + name ) urlretrieve ( url + name , filename ) print ( 'Processing' ) if name == name_train : n_samples = 400000 else : n_samples = 100000 with bz2 . BZ2File ( filename , 'r' ) as f : x , y = read_libsvm ( f , n_samples = n_samples , n_features = 2000 ) y [ y <= 0 ] = 0 y [ y > 0 ] = 1 y . astype ( int ) xs . append ( x ) ys . append ( y ) return xs , ys