Skip to content

Commit

Permalink
Merge pull request #146 from hasan-sayeed/main
Browse files Browse the repository at this point in the history
propagate `radius` kwarg up to Discover() class
  • Loading branch information
sgbaird authored Feb 27, 2023
2 parents 359d206 + 4a12db2 commit d09b2b2
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion mat_discover/mat_discover_.py
Original file line number Diff line number Diff line change
Expand Up @@ -236,6 +236,7 @@ def __init__(
plotting: bool = False,
pdf: bool = True,
n_peak_neighbors: int = 10,
radius=None,
verbose: bool = True,
dummy_run: bool = False,
Scaler=RobustScaler,
Expand Down Expand Up @@ -390,6 +391,7 @@ def __init__(
self.plotting = plotting
self.pdf = pdf
self.n_peak_neighbors = n_peak_neighbors
self.radius = radius
self.verbose = verbose
self.dummy_run = dummy_run
if dummy_run:
Expand Down Expand Up @@ -768,7 +770,7 @@ def predict(
# compound-wise scores (i.e. individual compounds)
with self.Timer("nearest-neighbor-properties"):
self.rad_neigh_avg_targ, self.k_neigh_avg_targ = nearest_neigh_props(
self.dm, pred, n_neighbors=self.n_peak_neighbors
self.dm, pred, n_neighbors=self.n_peak_neighbors, radius=self.radius
)
self.val_rad_neigh_avg = self.rad_neigh_avg_targ[val_ids]
self.val_k_neigh_avg = self.k_neigh_avg_targ[val_ids]
Expand Down

0 comments on commit d09b2b2

Please sign in to comment.