DisjointCNNNetwork¶
- class DisjointCNNNetwork(n_layers=4, n_filters=64, kernel_size=None, dilation_rate=1, strides=1, padding='same', activation='elu', use_bias=True, kernel_initializer='he_uniform', pool_size=5, pool_strides=None, pool_padding='valid', hidden_fc_units=128, activation_fc='relu')[source]¶
Establish the network structure for a DisjointCNN Network.
The model is proposed in [1] to apply convolutions specifically for multivariate series, temporal-spatial phases using 1+1D Convolution layers.
- Parameters:
- n_layersint, default = 4
Number of 1+1D Convolution layers.
- n_filtersint or list of int, default = 64
Number of filters used in convolution layers. If input is set to a list, the lenght should be the same as n_layers, if input is int the a list of the same element is created of length n_layers.
- kernel_sizeint or list of int, default = [8, 5, 5, 3]
Size of convolution kernel. If input is set to a list, the lenght should be the same as n_layers, if input is int the a list of the same element is created of length n_layers.
- dilation_rateint or list of int, default = 1
The dilation rate for convolution. If input is set to a list, the lenght should be the same as n_layers, if input is int the a list of the same element is created of length n_layers.
- stridesint or list of int, default = 1
The strides of the convolution filter. If input is set to a list, the lenght should be the same as n_layers, if input is int the a list of the same element is created of length n_layers.
- paddingstr or list of str, default = “same”
The type of padding used for convolution. If input is set to a list, the lenght should be the same as n_layers, if input is int the a list of the same element is created of length n_layers.
- activationstr or list of str, default = “elu”
Activation used after the convolution. If input is set to a list, the lenght should be the same as n_layers, if input is int the a list of the same element is created of length n_layers.
- use_biasbool or list of bool, default = True
Whether or not ot use bias in convolution. If input is set to a list, the lenght should be the same as n_layers, if input is int the a list of the same element is created of length n_layers.
- kernel_initializer: str or list of str, default = “he_uniform”
The initialization method of convolution layers. If input is set to a list, the lenght should be the same as n_layers, if input is int the a list of the same element is created of length n_layers.
- pool_size: int, default = 5
The size of the one max pool layer at the end of the model, default = 5.
- pool_strides: int, default = None
The strides used for the one max pool layer at the end of the model, default = None.
- pool_padding: str, default = “valid”
The padding method for the one max pool layer at the end of the model, default = “valid”.
- hidden_fc_units: int, default = 128
The number of fully connected units.
- activation_fc: str, default = “relu”
The activation of the fully connected layer.
Notes
The code is adapted from: https://github.com/Navidfoumani/Disjoint-CNN
References
[1]Foumani, Seyed Navid Mohammadi, Chang Wei Tan, and Mahsa Salehi.
“Disjoint-cnn for multivariate time series classification.” 2021 International Conference on Data Mining Workshops (ICDMW). IEEE, 2021.
Methods
build_network(input_shape, **kwargs)Construct a network and return its input and output layers.