#NEWLINE# @ staticmethod #NEWLINE# def get_glass_data( ) : #NEWLINE# #INDENT# data_dir = os . sep . join ( ( __file__ . split ( os . sep ) [ : ( - 3 ) ] + [ 'data' ] ) ) #NEWLINE# filename = ( ( data_dir + os . sep ) + 'glass.data' ) #NEWLINE# data = loadtxt ( filename , delimiter = ',' ) #NEWLINE# lab = data [ : , ( - 1 ) ] #NEWLINE# lab = array ( [ ( 1.0 if ( x <= 4 ) else ( - 1.0 ) ) for x in lab ] ) #NEWLINE# data = data_dir [ : , 1 : ( - 1 ) ] #NEWLINE# return ( data , lab )