asreview.models.feature_extraction.EmbeddingLSTM

class asreview.models.feature_extraction.EmbeddingLSTM(*args, loop_sequence=1, num_words=20000, max_sequence_length=1000, padding='post', truncating='post', n_jobs=1, **kwargs)[source]

Embedding LSTM feature extraction technique (embedding-lstm).

Feature extraction technique for asreview.models.classifiers.LSTMBaseClassifier and asreview.models.classifiers.LSTMPoolClassifier models.

Note

This feature extraction technique requires tensorflow to be installed. Use pip install asreview[tensorflow] or install all optional ASReview dependencies with pip install asreview[all]

Parameters:
  • loop_sequence (bool) – Instead of zeros at the start/end of sequence loop it.

  • num_words (int) – Maximum number of unique words to be processed.

  • max_sequence_length (int) – Maximum length of the sequence. Shorter get struncated. Longer sequences get either padded with zeros or looped.

  • padding (str) – Which side should be padded [pre/post].

  • truncating – Which side should be truncated [pre/post].

  • n_jobs – Number of processors used in reading the embedding matrix.

Attributes

default_param

Get the default parameters of the model.

label

name

param

Get the (assigned) parameters of the model.

Methods

fit(texts)

Fit the model to the texts.

fit_transform(texts[, titles, abstracts, ...])

Fit and transform a list of texts.

full_hyper_space()

get_embedding_matrix(texts, embedding_fp)

hyper_space()

transform(texts)

Transform a list of texts.