Skip to content

Commit

Permalink
Add subsampling function
Browse files Browse the repository at this point in the history
  • Loading branch information
koerper committed Mar 27, 2024
1 parent 8ccd375 commit ac61b72
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion utils/subsampling.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ def random_subsample(df, num_samples):
np.random.seed(42)
indices = np.random.choice(df.index, num_samples, replace=False)
subsampled_df = df.loc[indices]
return subsampled_df
return subsampled_df

0 comments on commit ac61b72

Please sign in to comment.