Zurück zu den Modellen
Classifier

GRUClassifier

Gated Recurrent Unit (GRU) for time series classification.

This classifier has been wrapped around implementations from [1], [2] and [3].

Schnellstart

python
from sktime.classification.deep_learning.gru import GRUClassifier

estimator = GRUClassifier(hidden_dim: int=256, n_layers: int=4, batch_first: bool=False, bias: bool=True, init_weights: bool=True, dropout: float=0.0, fc_dropout: float=0.0, bidirectional: bool=False, num_epochs: int=10, batch_size: int=8, optimizer: str=None, criterion: str=None, criterion_kwargs: dict=None, optimizer_kwargs: dict=None, lr: float=0.001, verbose: bool=False, random_state: int=None)

Parameter(18)

hidden_dimint
Number of features in the hidden state.
n_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. default is 0.0
fc_dropoutfloat
Dropout rate to apply to the fully connected layer. default is 0.0
bidirectionalbool
If True, then the GRU is bidirectional, default is False.
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.

Referenzen

[1]

Cho, Kyunghyun, et al. “Learning phrase representations using RNN encoder-decoder for statistical machine translation.” arXiv preprint arXiv:1406.1078 (2014).

[2]

Junyoung Chung, Caglar Gulcehre, KyungHyun Cho, Yoshua Bengio. Empirical Evaluation of Gated Recurrent Neural Networks on Sequence Modeling. arXiv preprint arXiv:1412.3555 (2014).