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
andasreview.models.classifiers.LSTMPoolClassifier
models.Note
This feature extraction technique requires
tensorflow
to be installed. Usepip install tensorflow
or install all optional ASReview dependencies withpip 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
Get the default parameters of the model.
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.
get_embedding_matrix
(texts, embedding_fp)transform
(texts)Transform a list of texts.