def load_data(fname, icept=True):
 cur_dir = os.path.dirname(os.path.abspath(__file__))
 Z = np.genfromtxt(os.path.join(cur_dir, 'results', fname), delimiter=',')
 group = Z[:, 0]
 endog = Z[:, 1]
 exog = Z[:, 2:]
 if icept:
  exog = np.concatenate((np.ones((exog.shape[0], 1)), exog), axis=1)
 return (endog, exog, group)

def load_data ( fname , icept = True ) : cur_dir = os . path . dirname ( os . path . abspath ( __file__ ) ) Z = np . genfromtxt ( os . path . join ( cur_dir , 'results' , fname ) , delimiter = ',' ) group = Z [ : , 0 ] endog = Z [ : , 1 ] exog = Z [ : , 2 : ] if icept : exog = np . concatenate ( ( np . ones ( ( exog . shape [ 0 ] , 1 ) ) , exog ) , axis = 1 ) return ( endog , exog , group )
return the mnist data as a tuple containing the training data .