We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 60f022a commit d22bc74Copy full SHA for d22bc74
learning.py
@@ -444,8 +444,7 @@ def train(dataset, weights):
444
return train
445
446
def replicated_dataset(dataset, weights, n=None):
447
- """Copy dataset, replicating each example in proportion to the
448
- corresponding weight."""
+ "Copy dataset, replicating each example in proportion to its weight."
449
n = n or len(dataset.examples)
450
result = copy.copy(dataset)
451
result.examples = weighted_replicate(dataset.examples, weights, n)
0 commit comments