accelbrainbase.observabledata._mxnet.lstmnetworks package

Submodules

accelbrainbase.observabledata._mxnet.lstmnetworks.encoder_decoder module

class accelbrainbase.observabledata._mxnet.lstmnetworks.encoder_decoder.EncoderDecoder(encoder, decoder, computable_loss, initializer=None, batch_size=100, learning_rate=1e-05, learning_attenuate_rate=0.1, attenuate_epoch=50, seq_len=0, hidden_n=200, output_n=1, dropout_rate=0.5, optimizer_name='SGD', observed_activation='tanh', input_gate_activation='sigmoid', forget_gate_activation='sigmoid', output_gate_activation='sigmoid', hidden_activation='tanh', output_activation='tanh', output_layer_flag=True, ctx=gpu(0), hybridize_flag=True, regularizatable_data_list=[], scale=1.0, generating_flag=True, **kwargs)

Bases: accelbrainbase.observabledata._mxnet.lstm_networks.LSTMNetworks

Encoder/Decoder based on LSTM networks.

This library provides Encoder/Decoder based on LSTM, which is a reconstruction model and makes it possible to extract series features embedded in deeper layers. The LSTM encoder learns a fixed length vector of time-series observed data points and the LSTM decoder uses this representation to reconstruct the time-series using the current hidden state and the value inferenced at the previous time-step.

One interesting application example is the Encoder/Decoder for Anomaly Detection (EncDec-AD) paradigm (Malhotra, P., et al. 2016). This reconstruction model learns to reconstruct normal time-series behavior, and thereafter uses reconstruction error to detect anomalies. Malhotra, P., et al. (2016) showed that EncDec-AD paradigm is robust and can detect anomalies from predictable, unpredictable, periodic, aperiodic, and quasi-periodic time-series. Further, they showed that the paradigm is able to detect anomalies from short time-series (length as small as 30) as well as long time-series (length as large as 500).

References

  • Cho, K., Van Merriënboer, B., Gulcehre, C., Bahdanau, D., Bougares, F., Schwenk, H., & Bengio, Y. (2014). Learning phrase representations using RNN encoder-decoder for statistical machine translation. arXiv preprint arXiv:1406.1078.
  • Malhotra, P., Ramakrishnan, A., Anand, G., Vig, L., Agarwal, P., & Shroff, G. (2016). LSTM-based encoder-decoder for multi-sensor anomaly detection. arXiv preprint arXiv:1607.00148.
collect_params(select=None)

Overrided collect_params in mxnet.gluon.HybridBlok.

decoder

getter for LSTMNetworks of decoder.

encoder

getter for LSTMNetworks of encoder.

forward_propagation(F, x)

Hybrid forward with Gluon API.

Parameters:
  • Fmxnet.ndarray or mxnet.symbol.
  • xmxnet.ndarray of observed data points.
Returns:

mxnet.ndarray or mxnet.symbol of inferenced feature points.

get_decoder()

getter for LSTMNetworks of decoder.

get_encoder()

getter for LSTMNetworks of encoder.

load_parameters(filename, ctx=None, allow_missing=False, ignore_extra=False)

Load parameters to files.

Parameters:
  • filename – File name.
  • ctxmx.cpu() or mx.gpu().
  • allow_missingbool of whether to silently skip loading parameters not represents in the file.
  • ignore_extrabool of whether to silently ignre parameters from the file that are not present in this Block.
save_parameters(filename)

Save parameters to files.

Parameters:filename – File name.
set_decoder(value)

setter for LSTMNetworks of decoder.

set_encoder(value)

setter for LSTMNetworks of encoder.

set_readonly(value)

setter

Module contents