- class asreview.models.classifiers.LSTMBaseClassifier(embedding_matrix=None, backwards=True, dropout=0.4, optimizer='rmsprop', lstm_out_width=20, learn_rate=1.0, dense_width=128, verbose=0, batch_size=32, epochs=35, shuffle=False, class_weight=30.0)
LSTM-base classifier (
LSTM model that consists of an embedding layer, LSTM layer with one output, dense 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.
learn_rate (float) – Learn rate multiplier of default learning rate.
dense_width (int) – Size of the dense layer of the model.
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.