diff --git a/mlprimitives/jsons/keras.Sequential.1DCNNBinaryClassifier.json b/mlprimitives/jsons/keras.Sequential.1DCNNBinaryClassifier.json new file mode 100644 index 00000000..252d074c --- /dev/null +++ b/mlprimitives/jsons/keras.Sequential.1DCNNBinaryClassifier.json @@ -0,0 +1,227 @@ +{ + "name": "keras.Sequential.1DCNNBinaryClassifier", + "contributors": [ + "Hector Dominguez " + ], + "description": "1D-Convolutional Neural Network (CNN) classifier for binary problems", + "classifiers": { + "type": "estimator", + "subtype": "classifier" + }, + "modalities": [], + "primitive": "mlprimitives.adapters.keras.Sequential", + "fit": { + "method": "fit", + "args": [ + { + "name": "X", + "type": "ndarray" + }, + { + "name": "y", + "type": "array" + }, + { + "name": "classes", + "type": "int", + "description": "Number of classes" + } + ] + }, + "produce": { + "method": "predict", + "args": [ + { + "name": "X", + "type": "ndarray" + } + ], + "output": [ + { + "name": "y", + "type": "array" + } + ] + }, + "hyperparameters": { + "fixed": { + "classification": { + "type": "bool", + "default": true + }, + "input_shape": { + "type": "list", + "default": [ + 224, + 224, + 3 + ] + }, + "loss": { + "type": "str", + "default": "keras.losses.binary_crossentropy" + }, + "optimizer": { + "type": "str", + "default": "keras.optimizers.RMSprop" + }, + "metrics": { + "type": "list", + "default": [ + "accuracy" + ] + }, + "epochs": { + "type": "int", + "default": 20 + }, + "layers": { + "type": "list", + "default": [ + { + "class": "keras.layers.Conv1D", + "parameters": { + "filters": "conv1d_1_filters", + "kernel_size": "conv1d_1_kernel_size", + "activation": "relu", + "input_shape": "input_shape" + } + }, + { + "class": "keras.layers.Conv1D", + "parameters": { + "filters": "conv1d_2_filters", + "kernel_size": "conv1d_2_kernel_size", + "activation": "relu" + } + }, + { + "class": "keras.layers.MaxPooling1D", + "parameters": { + "pool_size": "maxpooling1d_pool_size" + } + }, + { + "class": "keras.layers.Conv1D", + "parameters": { + "filters": "conv1d_3_filters", + "kernel_size": "conv1d_3_kernel_size", + "activation": "relu" + } + }, + { + "class": "keras.layers.Conv1D", + "parameters": { + "filters": "conv1d_4_filters", + "kernel_size": "conv1d_4_kernel_size", + "activation": "relu" + } + }, + { + "class": "keras.layers.GlobalAveragePooling1D", + "parameters": {} + }, + { + "class": "keras.layers.Dropout", + "parameters": { + "rate": "dropout_rate" + } + }, + { + "class": "keras.layers.Dense", + "parameters": { + "units": 2, + "activation": "sigmoid" + } + } + ] + } + }, + "tunable": { + "conv1d_1_filters": { + "type": "int", + "default": 64, + "range": [ + 1, + 500 + ] + }, + "conv1d_1_kernel_size": { + "type": "int", + "default": 3, + "range": [ + 3, + 10 + ] + }, + "conv1d_2_filters": { + "type": "int", + "default": 64, + "range": [ + 1, + 500 + ] + }, + "conv1d_2_kernel_size": { + "type": "int", + "default": 3, + "range": [ + 3, + 10 + ] + }, + "maxpooling1d_pool_size": { + "type": "int", + "default": 2, + "range": [ + 2, + 10 + ] + }, + "conv1d_3_filters": { + "type": "int", + "default": 64, + "range": [ + 1, + 500 + ] + }, + "conv1d_3_kernel_size": { + "type": "int", + "default": 3, + "range": [ + 3, + 10 + ] + }, + "conv1d_4_filters": { + "type": "int", + "default": 64, + "range": [ + 1, + 500 + ] + }, + "conv1d_4_kernel_size": { + "type": "int", + "default": 3, + "range": [ + 3, + 10 + ] + }, + "dropout_rate": { + "type": "float", + "default": 0.5, + "range": [ + 0.0, + 0.75 + ] + }, + "batch_size": { + "type": "int", + "default": 128 + } + } + } +}