crested.utils.EnhancerOptimizer#
- class crested.utils.EnhancerOptimizer(optimize_func)#
Class to optimize the mutated sequence based on the original prediction.
Can be passed as the ‘enhancer_optimizer’ argument to
crested.tl.enhancer_design_in_silico_evolution()
Methods table#
|
Get the index of the best mutated sequence based on the original prediction. |
Methods#
- EnhancerOptimizer.get_best(mutated_predictions, original_prediction, target, **kwargs)#
Get the index of the best mutated sequence based on the original prediction.
- Parameters:
mutated_predictions (
ndarray
) – The predictions of the mutated sequences.original_prediction (
ndarray
) – The prediction of the original sequence.target (
int
|ndarray
) – An integer or array representing some target to optimize for. For example, this can be the target class index, or an array of target values to maximize. Depends on the optimization function used.**kwargs (
dict
[str
,Any
]) – Additional keyword arguments to pass to the optimization function.
- Return type: