flexs.explorer

Defines abstract base explorer class.

class flexs.explorer.Explorer(model, name, rounds, sequences_batch_size, model_queries_per_batch, starting_sequence, log_file=None)[source]

Bases: abc.ABC

Abstract base explorer class.

Run explorer through the run method. Implement subclasses by overriding propose_sequences (do not override run).

abstract propose_sequences(measured_sequences_data)[source]

Propose a list of sequences to be measured in the next round.

This method will be overriden to contain the explorer logic for each explorer.

Parameters
  • measured_sequences_data (DataFrame) – A pandas dataframe of all sequences that have been

  • by the ground truth so far. Has columns "sequence", (measured) –

  • "model_score", and "round". ("true_score",) –

Return type

Tuple[ndarray, ndarray]

Returns

A tuple containing the proposed sequences and their scores

(according to the model).

run(landscape, verbose=True)[source]

Run the exporer.

Parameters
  • landscape (Landscape) – Ground truth fitness landscape.

  • verbose (bool) – Whether to print output or not.

Return type

Tuple[DataFrame, Dict]