spaCy - Util.decaying



This utility function will yield an infinite series of linearly decaying values.

Arguments

The table below explains its arguments −

NAME TYPE DESCRIPTION
Start int/float It represents the first value.
Stop int/float It represents the maximum value.
compound int/float It is the compounding factor.

Example 1

An example of util.decaying() function is as follows −

import spacy
sizes = spacy.util.decaying(50., 5., 0.001)
next(sizes) == 50.

Output

You will receive the following output −

True

Example 2

An another example of util.decaying() function is as follows −

next(sizes) == 50. - 0.001

Output

You will receive the following output −

True

Example 3

Here is one more example of util.decaying() function. However, here the output is False.

next(sizes) == 9.999 - 0.001

Output

You will receive the following output −

False
spacy_util_get_data_path.htm
Advertisements