Classifier
GRUFCNNClassifier
GRU-FCN for time series classification.
Quickstart
python
from sktime.classification.deep_learning.gru import GRUFCNNClassifier
estimator = GRUFCNNClassifier(hidden_dim: int, gru_layers: int, batch_first: bool=False, bias: bool=True, init_weights: bool=True, dropout: float=0.0, gru_dropout: float=0.0, bidirectional: bool=False, conv_layers: list=[128, 256, 128], kernel_sizes: list=[7, 5, 3], num_epochs: int=10, batch_size: int=8, optimizer: str='Adam', criterion: str=None, criterion_kwargs: dict=None, optimizer_kwargs: dict=None, lr: float=0.01, verbose: bool=False, random_state: int=None)Parameters(20)
- hidden_dimint
- Number of features in the hidden state.
- gru_layersint
- Number of recurrent layers.
- batch_firstbool
- If True, then the input and output tensors are provided as (batch, seq, feature), default is False.
- biasbool
- If False, then the layer does not use bias weights, default is True.
- init_weightsbool
- If True, then the weights are initialized, default is True.
- dropoutfloat
- Dropout rate to apply inside gru cell. default is 0.0
- gru_dropoutfloat
- Dropout rate to apply to the gru output layer. default is 0.0
- bidirectionalbool
- If True, then the GRU is bidirectional, default is False.
- conv_layerslist
- List of integers specifying the number of filters in each convolutional layer. default is [128, 256, 128].
- kernel_sizeslist
- List of integers specifying the kernel size in each convolutional layer. default is [7, 5, 3].
- num_epochsint, optional (default=10)
- The number of epochs to train the model.
- optimizerstr, optional (default=None)
- The optimizer to use. If None, Adam will be used.
- activationstr, optional (default=”relu”)
- The activation function to use. Options: [“relu”, “softmax”].
- batch_sizeint, optional (default=8)
- The size of each mini-batch during training.
- criterioncallable, optional (default=None)
- The loss function to use. If None, CrossEntropyLoss will be used.
- criterion_kwargsdict, optional (default=None)
- Additional keyword arguments to pass to the loss function.
- optimizer_kwargsdict, optional (default=None)
- Additional keyword arguments to pass to the optimizer.
- lrfloat, optional (default=0.001)
- The learning rate to use for the optimizer.
- verbosebool, optional (default=False)
- Whether to print progress information during training.
- random_stateint, optional (default=None)
- Seed to ensure reproducibility.
References
- [1 ] Elsayed, et al. “Deep Gated Recurrent and Convolutional Network Hybrid Model for Univariate Time Series Classification.” arXiv preprint arXiv:1812.07683 (2018). [2 ] https://github.com/NellyElsayed/GRU-FCN-model-for-univariate-time-series-classification [3 ] https://github.com/titu1994/LSTM-FCN