cleverly.bases.Sieve#
- class cleverly.bases.Sieve(basis: Any, size: Any = 'cv')[source]#
A nested family of bases and the rule that picks its size.
sizeis an integer (a fixed size),"cv"(chosen by cross-validation, which makes the target data-adaptive), or a declared schedule: a callablen -> sizeor a mapping from sample sizes to sizes, read at the largest key at mostn. A fixed size or a schedule resolves to one known basis before the fit.- Parameters:
- basis
Basis The largest member of the family; smaller members are its truncations.
- size
int, “cv”,callable()ormapping How the member is chosen.
- basis
Methods#
- classmethod Sieve.default(modifiers: Modifiers, *, max_size: int = 6, size: Any = 'cv') Sieve[source]#
Additive cosines of the continuous modifiers and indicators of the categorical.
- Parameters:
- modifiers
Modifiers The declared schema; every continuous modifier needs a domain.
- max_size
int The largest number of cosines per continuous modifier.
- size
int, “cv”,callable()ormapping How the member is chosen.
- modifiers
- Returns:
SieveThe default sieve.
Attributes#
- Sieve.chosen_by_cv#
Whether the size is chosen by cross-validation.