cleverly.bases.Tensor#
- class cleverly.bases.Tensor(left: Any, right: Any)[source]#
The tensor product of two bases: every product of a column of each.
With both intercepts kept, the product carries the intercept, each basis’s own terms, and their interactions.
Tensor(basis, Linear(["A"]))is the basis, the columnAandAtimes every term of the basis.
Methods#
- Tensor.evaluate(frame: Any, modifiers: Modifiers | None = None) ndarray[source]#
The
(n, p_left * p_right)design of products.
Attributes#
- Tensor.basis_kind#
"known"when both factors are.
- Tensor.columns#
The modifier columns either factor reads.
- Tensor.max_size#
The larger of the factors’ sizes.
- Tensor.n_terms#
The number of design columns.
- Tensor.terms#
a:bfor every pair of terms, the intercept absorbed.