Skip to content

Commit

Permalink
improve splitobs docstring (#187)
Browse files Browse the repository at this point in the history
  • Loading branch information
CarloLucibello authored Jan 25, 2025
1 parent db92264 commit 2fe174d
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions src/splitobs.jl
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,13 @@ end
Partition the `data` into two or more subsets.
When `at` is a number (between 0 and 1) this specifies the proportion in the first subset.
When `at` is a tuple, each entry specifies the proportion an a subset,
with the last having `1-sum(at)`. In all there are `length(at)+1` subsets returned.
When `at` is a number between 0 and 1, this specifies the proportion in the first subset.
When `at` is an integer, it specifies the number of observations in the first subset.
When `at` is a tuple, entries specifies the number or proportion in each subset, except
for the last which will contain the remaning observations.
The number of returned subsets is `length(at)+1`.
If `shuffle=true`, randomly permute the observations before splitting.
A random number generator `rng` can be optionally passed as the first argument.
Expand Down

0 comments on commit 2fe174d

Please sign in to comment.