Research Article
A Network Data Reinforcement Method Based on the Multiclass Variational Autoencoder
| def pre_processing (phase): | | if (phase = = ‘before MCVAE’): | | data = get_data() # get the dataset to be processed | | data = features_selected (data, features) # select features uses for training | | data = z_score (data) # scale data with z_score algorithm | | elif (phase = = ‘before Model Training’): | | data = label_encode (data) # map labels to 0 (benign) and 1 (nonbenign) | | else: | | print (‘error’) # if the function is used in other phases, an | | return 0 error will return | | return data # output the processed dataset |
|