- class asreview.models.classifiers.LSTMPoolClassifier(embedding_matrix=None, backwards=True, dropout=0.4, optimizer='rmsprop', lstm_out_width=20, lstm_pool_size=128, learn_rate=1.0, verbose=0, batch_size=32, epochs=35, shuffle=False, class_weight=30.0)
LSTM-pool classifier (
LSTM model that consists of an embedding layer, LSTM layer with many outputs, max pooling layer, and a single sigmoid output node. Use the
asreview.models.feature_extraction.EmbeddingLSTMfeature extraction method. Currently not so well optimized and slow.
This model requires
tensorflowto be installed. Use
pip install tensorflowor install all optional ASReview dependencies with
pip install asreview[all]
embedding_matrix (numpy.ndarray) – Embedding matrix to use with LSTM model.
backwards (bool) – Whether to have a forward or backward LSTM.
dropout (float) – Value in [0, 1.0) that gives the dropout and recurrent dropout rate for the LSTM model.
optimizer (str) – Optimizer to use.
lstm_out_width (int) – Output width of the LSTM.
lstm_pool_size (int) – Size of the pool, must be a divisor of max_sequence_length.
learn_rate (float) – Learn rate multiplier of default learning rate.
verbose (int) – Verbosity.
batch_size (int) – Size of the batch size for the LSTM model.
epochs (int) – Number of epochs to train the LSTM model.
shuffle (bool) – Whether to shuffle the data before starting to train.
class_weight (float) – Class weight for the included papers.
Get the default parameters of the model.
Get the (assigned) parameters of the model.
Fit the model to the data.
Get a hyperparameter space to use with hyperopt.
Get the inclusion probability for each sample.