bugfinder.models.blstm_classifier

Bidirectional LSTM classifier.

class bugfinder.models.blstm_classifier.BLSTMClassifierModel(dataset)

Bases: AbstractProcessing

Class which implements the Bidirectional LSTM model.

Parameters

AbstractProcessing (_type_) – _description_

static evaluate(model, weights_path, batch_size, x_test, y_test)

Evaluates the model using several metrics.

Parameters
  • model (Sequential) – the model representation

  • weights_path (str) – path for the model’s weight file to be loaded

  • batch_size (int) – batch size of the testing set

  • x_test (np.array) – testing instances

  • y_test (np.array) – testing labels

execute(name, **kwargs)

Run the model training and evaluation.

Parameters

name (str) – This parameter will be the name of the model saved in disk.

abstract init_model(name, **kwargs)

Setup the model. Abstract method.

class bugfinder.models.blstm_classifier.BLSTMClassifierTraining(dataset)

Bases: BLSTMClassifierModel

Bidirectional Long Short-Term Memory classifier

init_model(**kwargs)

Setup the model