I'm working on ANN model (a binary classification problem) in R using the h2o
package because neuralnet
takes too long with the data set I'm working on .
model <- h2o.deeplearning(model_id = "h2o_ANN" ,
training_frame = aa.h2o.tra ,
seed = 1 ,y = target ,
x = predictors ,epochs = 500 ,
hidden = 16 ,adaptive_rate = F ,
rate = 0.01 ,activation = "Tanh")
However, when I plot loss vs epochs, the line graph looks weird (for me!). I only have a small number of values within the linechart. Perhaps this is because h2o
stores only a summary of the results
loss vs epoch
How can I plot the results for each epoch?
This is a sample of the data I am using.
LIMIT_BAL SEX EDUCATION MARRIAGE AGE
6756 0.7065360 -0.8112315 -1.2947658 -0.9235809 -0.2603721
8362 -1.0616096 -0.8112315 0.5637609 1.0827051 1.2644609
25951 -0.9847337 1.2326514 -1.2947658 -0.9235809 -1.0227887
18182 -0.5234783 -0.8112315 0.5637609 1.0827051 -0.6960387
28379 1.7827986 1.2326514 0.5637609 -0.9235809 -1.0227887
23527 0.2452807 1.2326514 0.5637609 -0.9235809 -0.8049554
PAY_1 PAY_2 PAY_3 PAY_4 PAY_5
6756 0.01322092 0.1083065 0.1357685 0.1858918 0.2313689
8362 0.01322092 0.1083065 0.1357685 0.1858918 0.2313689
25951 0.90161187 -1.5567129 -1.5299515 -1.5196811 -0.6477726
18182 0.01322092 0.1083065 0.1357685 0.1858918 0.2313689
28379 0.90161187 -0.7242032 -0.6970915 -0.6668946 -0.6477726
23527 0.01322092 0.1083065 0.1357685 -0.6668946 -0.6477726
PAY_6 BILL_AMT1 BILL_AMT2 BILL_AMT3 BILL_AMT4
6756 0.2495171 -0.4432728 -0.4042181 -0.3504430 -0.3479263
8362 0.2495171 -0.2973090 -0.2785499 -0.2412887 0.2332462
25951 0.2495171 -0.6944606 -0.6900911 -0.6772422 -0.6719405
18182 0.2495171 0.9112907 0.9514314 0.9672028 1.0530965
28379 -0.6177853 -0.6816971 -0.6851955 -0.6730279 -0.4750689
23527 -0.6177853 0.6555853 0.7186927 -0.1841930 -0.6608832
BILL_AMT5 BILL_AMT6 PAY_AMT1 PAY_AMT2
6756 -0.2428634 -0.1717688 -0.166281672 -0.12988389
8362 -0.1785104 -0.1490618 -0.260590656 -0.19971668
25951 -0.6206216 -0.5939683 -0.355530470 -0.26565731
18182 1.0982856 1.1123754 -0.001382886 -0.01221359
28379 -0.6363075 -0.6281210 -0.333451444 -0.25244203
23527 -0.6517141 -0.6390807 -0.021190927 -0.12988389
PAY_AMT3 PAY_AMT4 PAY_AMT5 PAY_AMT6 DEFAULT
6756 -0.18856887 0.05263758 -0.06912059 -0.23740829 0
8362 -0.24714368 -0.23512972 -0.21064007 -0.23740829 0
25951 -0.30762337 -0.14425583 -0.25017065 -0.18093455 0
18182 0.01977649 -0.02107557 0.01336656 0.04496042 0
28379 0.44700354 -0.20633349 -0.21617435 0.38476293 0
23527 0.21097801 -0.26730609 -0.25926268 -0.25412452 0