Keras-1D-NN-Classifier
This code is based on the reference codes linked below.
This code is for 1-D array data classification.
The given data in 'data' directory is simple data for training and testing this code.
About this code
This code is iterated by changing the'learn rate' variable to find the optimal learning rate. The related part is the code below.
var = [ 4e-5,8e-5, 12e-5]
for i in range(len(var)):
var_str = 'lr replay %d th' % i
dense1 = 16
dense2 = 16
train_epoch = 160
batch_size = 300
classes = 7
learn_rate = var[i]
In addition, it monitors during learning through the code below and stops learning when there is no improvement in accuracy.
checkpoint = ModelCheckpoint(filepath=model_path, monitor='val_acc', verbose=1, save_best_only=True, mode='auto', period=1)
earlystopping = EarlyStopping(monitor='val_acc', patience=50)
How the model is saved
Size of each data class imbalance should be modified