Merge pull request #9 from pglez82/master

Small mistake in some docstring (I think)
This commit is contained in:
Alejandro Moreo Fernandez 2022-02-14 09:34:01 +01:00 committed by GitHub
commit 6104a88ba0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 4 deletions

View File

@ -103,8 +103,8 @@ class LabelledCollection:
"""
Returns an index to be used to extract a random sample of desired size and desired prevalence values. If the
prevalence values are not specified, then returns the index of a uniform sampling.
For each class, the sampling is drawn without replacement if the requested prevalence is larger than
the actual prevalence of the class, or with replacement otherwise.
For each class, the sampling is drawn with replacement if the requested prevalence is larger than
the actual prevalence of the class, or without replacement otherwise.
:param size: integer, the requested size
:param prevs: the prevalence for each class; the prevalence value for the last class can be lead empty since
@ -146,7 +146,7 @@ class LabelledCollection:
def uniform_sampling_index(self, size):
"""
Returns an index to be used to extract a uniform sample of desired size. The sampling is drawn
without replacement if the requested size is greater than the number of instances, or with replacement
with replacement if the requested size is greater than the number of instances, or without replacement
otherwise.
:param size: integer, the size of the uniform sample
@ -174,7 +174,7 @@ class LabelledCollection:
def uniform_sampling(self, size):
"""
Returns a uniform sample (an instance of :class:`LabelledCollection`) of desired size. The sampling is drawn
without replacement if the requested size is greater than the number of instances, or with replacement
with replacement if the requested size is greater than the number of instances, or without replacement
otherwise.
:param size: integer, the requested size