I had to use a higher memory machine (4 vCPU and 32GB vs 4 vCPU and 16GB) to enable the cost sensitive models to complete. Otherwise a memory allocation error was generated or the kernel crashed.
Amended 'from keras import regularizers' to import from tensorflow as 'from tensorflow.keras import regularizers'
Autoencoder training takes a while to complete 100 epochs.
cost_log = conf_mat_log[0][1] cost_fp + conf_mat_boost[1][0] \ cost_fn.mean() + conf_mat_log[1][1] cost_tp cost_dt = conf_mat_dt[0][1] cost_fp + conf_mat_boost[1][0] \ cost_fn.mean() + conf_mat_dt[1][1] cost_tp cost_rf = conf_mat_rf[0][1] cost_fp + conf_mat_boost[1][0] \ cost_fn.mean() + conf_mat_rf[1][1] * cost_tp
Should all 3 cost variables be using conf_mat_boost[1][0] or should it be:
cost_log = conf_mat_log[0][1] cost_fp + conf_mat_log[1][0] \ cost_fn.mean() + conf_mat_log[1][1] cost_tp cost_dt = conf_mat_dt[0][1] cost_fp + conf_mat_dt[1][0] \ cost_fn.mean() + conf_mat_dt[1][1] cost_tp cost_rf = conf_mat_rf[0][1] cost_fp + conf_mat_rf[1][0] \ cost_fn.mean() + conf_mat_rf[1][1] * cost_tp
I had to use a higher memory machine (4 vCPU and 32GB vs 4 vCPU and 16GB) to enable the cost sensitive models to complete. Otherwise a memory allocation error was generated or the kernel crashed.
Amended 'from keras import regularizers' to import from tensorflow as 'from tensorflow.keras import regularizers'
Autoencoder training takes a while to complete 100 epochs.