def load_linnerud(return_X_y=False):
 base_dir = join(dirname(__file__), 'data/')
 data_exercise = np.loadtxt((base_dir + 'linnerud_exercise.csv'), skiprows=1)
 data_physiological = np.loadtxt((base_dir + 'linnerud_physiological.csv'), skiprows=1)
 with open((base_dir + 'linnerud_exercise.csv')) as f:
  header_exercise = f.readline().split()
 with open((base_dir + 'linnerud_physiological.csv')) as f:
  header_physiological = f.readline().split()
 with open((dirname(__file__) + '/descr/linnerud.rst')) as f:
  descr = f.read()
 if return_X_y:
  return (data_exercise, data_physiological)
 return Bunch(data=data_exercise, feature_names=header_exercise, target=data_physiological, target_names=header_physiological, DESCR=descr)

def load_linnerud ( return_X_y = False ) : base_dir = join ( dirname ( __file__ ) , 'data/' ) data_exercise = np . loadtxt ( ( base_dir + 'linnerud_exercise.csv' ) , skiprows = 1 ) data_physiological = np . loadtxt ( ( base_dir + 'linnerud_physiological.csv' ) , skiprows = 1 ) with open ( ( base_dir + 'linnerud_exercise.csv' ) ) as f : header_exercise = f . readline ( ) . split ( ) with open ( ( base_dir + 'linnerud_physiological.csv' ) ) as f : header_physiological = f . readline ( ) . split ( ) with open ( ( dirname ( __file__ ) + '/descr/linnerud.rst' ) ) as f : descr = f . read ( ) if return_X_y : return ( data_exercise , data_physiological ) return Bunch ( data = data_exercise , feature_names = header_exercise , target = data_physiological , target_names = header_physiological , DESCR = descr )
load and return the linnerud dataset .