parameters: (data_file_name)
return_statement: return (prob_y, prob_x)
docstring: svm_read_problem(data_file_name) -> [y, x]
  
  	Read LIBSVM-format data from data_file_name and return labels y
  	and data instances x.
docstring_summary: svm_read_problem(data_file_name) -> [y, x]
docstring_tokens: svm_read_problem ( data_file_name ) - > [ y x ]
function: def svm_read_problem(data_file_name):
  	"""
  	svm_read_problem(data_file_name) -> [y, x]
  
  	Read LIBSVM-format data from data_file_name and return labels y
  	and data instances x.
  	"""
  	prob_y = []
  	prob_x = []
  	for line in open(data_file_name):
  		line = line.split(None, 1)
  		# In case an instance with all zero features
  		if len(line) == 1: line += ['']
  		label, features = line
  		xi = {}
  		for e in features.split():
  			ind, val = e.split(":")
  			xi[int(ind)] = float(val)
  		prob_y += [float(label)]
  		prob_x += [xi]
  	return (prob_y, prob_x)
function_tokens: def svm_read_problem ( data_file_name ) : prob_y = [ ] prob_x = [ ] for line in open ( data_file_name ) : line = line . split ( None , 1 ) # In case an instance with all zero features if len ( line ) == 1 : line += [ '' ] label , features = line xi = { } for e in features . split ( ) : ind , val = e . split ( ":" ) xi [ int ( ind ) ] = float ( val ) prob_y += [ float ( label ) ] prob_x += [ xi ] return ( prob_y , prob_x )