#NEWLINE# def Build_Data_Set( ) : #NEWLINE# #INDENT# data_df = pd . DataFrame . from_csv ( 'key_stats_acc_perf_NO_NA_enhanced.csv' ) #NEWLINE# data_df = data_df . reindex ( np . random . permutation ( data_df . index ) ) #NEWLINE# data_df = data_df . replace ( 'NaN' , 0 ) . replace ( 'N/A' , 0 ) #NEWLINE# X = np . array ( data_df [ FEATURES ] . values ) #NEWLINE# y = data_df [ 'Status' ] . replace ( 'underperform' , 0 ) . replace ( 'outperform' , 1 ) . values . tolist ( ) #NEWLINE# X = preprocessing . scale ( X ) #NEWLINE# Z = np . array ( data_df [ [ 'stock_p_change' , 'sp500_p_change' ] ] ) #NEWLINE# return ( X , y , Z )