flexs.landscape¶
Defines the Landscape class.
-
class
flexs.landscape.
Landscape
(name)[source]¶ Bases:
abc.ABC
Base class for all landscapes and for flexs.Model.
-
name
[source]¶ A human-readable name for the landscape (often contains parameter values in the name) which is used when logging explorer runs.
- Type
str
-
get_fitness
(sequences)[source]¶ Score a list/numpy array of sequences.
This public method should not be overriden – new landscapes should override the private _fitness_function method instead. This method increments self.cost and then calls and returns _fitness_function.
- Parameters
sequences (
Union
[List
[str
],ndarray
]) – A list/numpy array of sequence strings to be scored.- Return type
ndarray
- Returns
Scores for each sequence.
-