Classifier
FCNClassifier
Fully Convolutional Network (FCN), as described in [1].
Schnellstart
python
from sktime.classification.deep_learning.fcn import FCNClassifier
estimator = FCNClassifier(n_epochs=2000, batch_size=16, callbacks=None, verbose=False, loss='categorical_crossentropy', metrics=None, random_state=None, activation='sigmoid', activation_hidden='relu', use_bias=True, optimizer=None, filter_sizes=(128, 256, 128), kernel_sizes=(8, 5, 3))Parameter(14)
- n_epochsint, default = 2000
- the number of epochs to train the model
- batch_sizeint, default = 16
- the number of samples per gradient update.
- callbackslist of keras.callbacks.Callback, optional (default=None)
- List of Keras callbacks to apply during model training.
- random_stateint or None, default=None
- Seed for random number generation.
- verboseboolean, default = False
- whether to output extra information
- lossstring, default=”mean_squared_error”
- fit parameter for the keras model
- optimizerkeras.optimizer, default=keras.optimizers.Adam(),
- metricslist of strings, default=[“accuracy”],
- activationstring or a tf callable, default=”sigmoid”
Activation function used in the output layer. List of available activation functions: https://keras.io/api/layers/activations/
- activation_hiddenstring or a tf callable, default=”relu”
Activation function used in the hidden layers. List of available activation functions: https://keras.io/api/layers/activations/
- use_biasboolean, default = True
- whether the layer uses a bias vector.
- optimizerkeras.optimizers object, default = Adam(lr=0.01)
- specify the optimizer and the learning rate to be used.
- filter_sizeslist or tuple of int, default = (128,256,128)
- number of filters for each convolutional layer. must have length equal to kernel_sizes.
- kernel_sizeslist or tuple of int, default = (8,5,3)
- kernel size for each convolutional layer. must have length equal to filter_sizes.
Beispiele
>>> from sktime.classification.deep_learning.fcn import FCNClassifier
>>> from sktime.datasets import load_unit_test
>>> X_train, y_train = load_unit_test (split = "train", return_X_y = True)
>>> X_test, y_test = load_unit_test (split = "test", return_X_y = True)
>>> fcn = FCNClassifier (n_epochs = 20, batch_size = 4)
>>> fcn. fit (X_train, y_train) FCNClassifier(
... )Referenzen
- [1 ] Wang et al, Time series classification from scratch with deep neural networks: A strong baseline. 2017 International Joint Conference on Neural Networks (IJCNN)