Skip to content

Commit

Permalink
fix: fixed enzyme optmization with Kcat fitness function
Browse files Browse the repository at this point in the history
Signed-off-by: yvesnana <[email protected]>
  • Loading branch information
yvesnana committed Apr 24, 2024
1 parent d38e837 commit 65f6eb7
Showing 1 changed file with 0 additions and 24 deletions.
24 changes: 0 additions & 24 deletions src/gt4sd/frameworks/enzeptional/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -341,30 +341,6 @@ def get_mutations(
return random.sample(mutated_sequences_set, num_sequences)


<<<<<<< HEAD
=======
class Scorer:
def __init__(self, scorer_filepath: str, scaler_filepath: Optional[str] = None):
"""Initialize the scorer.
Args:
scorer_filepath (str): Pickled scorer filepath.
scaler_filepath (Optional[str], optional): Pickled scaler filepath. Defaults to None.
"""
self.scorer_filepath = scorer_filepath
self.scorer = load(scorer_filepath)
if scaler_filepath is not None:
self.scaler = load(scaler_filepath)

def predict_proba(self, feature_vector):
return self.scorer.predict_proba(feature_vector)

def predict(self, feature_vector):
if self.scaler is not None:
feature_vector = self.scaler.transform(feature_vector)
return self.scorer.predict(xgb.DMatrix(feature_vector))


>>>>>>> 4d4c6fc (fix: fixed enzyme optmization with Kcat fitness function)
class EnzymeOptimizer:
"""
Optimizes protein sequences based on interaction with
Expand Down

0 comments on commit 65f6eb7

Please sign in to comment.