StandardizedPredictors.CenteredTerm
— Typestruct CenteredTerm{T,C} <: AbstractTerm
A lazily centered term. A wrapper around an T<:AbstractTerm
which will produce centered values with modelcols
by subtracting center
from each element generated by the wrapped term with modelcols
.
Fields
term::T
: The wrapped term.center::C
: The center value subtracted from the resultingmodelcols
.
Examples
Directly construct with given center:
julia> d = (x=collect(1:10), );
+ x => center(x, 5.5)