Skip to content

Commit

Permalink
Format code
Browse files Browse the repository at this point in the history
  • Loading branch information
labdmitriy committed Apr 18, 2022
1 parent 31d33a1 commit 1ce5928
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions ml_lab/model_selection.py
Original file line number Diff line number Diff line change
Expand Up @@ -110,11 +110,15 @@ def split(self,
# Process each split
for _ in range(n_splits):
# Calculate train indices range
train_idx = np.r_[slice(groups_dict[group_seqs[train_start_idx]], groups_dict[group_seqs[train_end_idx]])]
train_idx = np.r_[slice(
groups_dict[group_seqs[train_start_idx]], groups_dict[group_seqs[train_end_idx]]
)]

# Calculate test indices range
if test_end_idx < n_groups:
test_idx = np.r_[slice(groups_dict[group_seqs[test_start_idx]], groups_dict[group_seqs[test_end_idx]])]
test_idx = np.r_[slice(
groups_dict[group_seqs[test_start_idx]], groups_dict[group_seqs[test_end_idx]]
)]
else:
test_idx = np.r_[slice(groups_dict[group_seqs[test_start_idx]], n_samples)]

Expand Down

0 comments on commit 1ce5928

Please sign in to comment.