Skip to content

Commit b10f041

Browse files
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
1 parent e67e1c5 commit b10f041

File tree

3 files changed

+2
-10
lines changed

3 files changed

+2
-10
lines changed

sobolev_alignment/scvi_model_search.py

+2-6
Original file line numberDiff line numberDiff line change
@@ -194,10 +194,6 @@ def _objective_function(params):
194194
def split_dataset(data_an, test_size=0.1):
195195
"""Split between training and testing"""
196196
train_data_df, test_data_df = train_test_split(data_an.to_df(), test_size=test_size)
197-
train_data_an = data_an[
198-
train_data_df.index,
199-
]
200-
test_data_an = data_an[
201-
test_data_df.index,
202-
]
197+
train_data_an = data_an[train_data_df.index,]
198+
test_data_an = data_an[test_data_df.index,]
203199
return train_data_an, test_data_an

sobolev_alignment/sobolev_alignment.py

-2
Original file line numberDiff line numberDiff line change
@@ -329,7 +329,6 @@ def _train_krr(
329329
frob_norm_source: bool = False,
330330
lib_size_norm: bool = False,
331331
):
332-
333332
if n_krr_clfs == 1:
334333
self.approximate_krr_regressions_[data_source] = self._train_one_krr(
335334
data_source=data_source,
@@ -702,7 +701,6 @@ def _memmap_log_processing(
702701
unit_std: bool = False,
703702
frob_norm_source: bool = False,
704703
):
705-
706704
# Save embedding
707705
if save_mmap is not None and type(save_mmap) == str:
708706
self._save_mmap = save_mmap

tests/test_krr_approx.py

-2
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,6 @@ def test_laplacian_falkon_fit(self, fit_falkon_laplacian_ridge, valid_input, val
176176
assert pearson_corr[0] > pearson_threshold
177177

178178
def test_ridge_coef_sklearn_fit(self, fit_sklearn_laplacian_ridge, input, valid_input):
179-
180179
pred_reconstruct = fit_sklearn_laplacian_ridge.kernel_(
181180
valid_input, input[fit_sklearn_laplacian_ridge.ridge_samples_idx_, :]
182181
)
@@ -186,7 +185,6 @@ def test_ridge_coef_sklearn_fit(self, fit_sklearn_laplacian_ridge, input, valid_
186185
)
187186

188187
def test_ridge_coef_falkon_fit(self, fit_falkon_laplacian_ridge, input, valid_input):
189-
190188
pred_reconstruct = fit_falkon_laplacian_ridge.kernel_(valid_input, fit_falkon_laplacian_ridge.anchors())
191189
pred_reconstruct = pred_reconstruct.matmul(fit_falkon_laplacian_ridge.sample_weights_)
192190
np.testing.assert_array_almost_equal(

0 commit comments

Comments
 (0)