econml.iv.sieve.HermiteFeatures
- class econml.iv.sieve.HermiteFeatures(degree, shift=0, joint=False)[source]
Bases:
sklearn.base.TransformerMixin
Featurizer that returns(unscaled) Hermite function evaluations.
The evaluated functions are of degrees 0..`degree`, differentiated shift times.
If the input has shape(n, x) and joint is False, the output will have shape(n, (degree`+ 1)×x) if `shift is 0. If the input has shape(n, x) and joint is True, the output will have shape(n, (degree`+ 1) ^ x) if `shift is 0. In either case, if shift is nonzero there will be shift additional dimensions of size x between the first and last.
Methods
__init__
(degree[, shift, joint])fit
(X)Fits the data(a NOP for this class) and returns self.
fit_transform
(X[, y])Fit to data, then transform it.
set_output
(*[, transform])Set output container.
transform
(X)Transform the data by applying the appropriate Hermite functions.
- fit_transform(X, y=None, **fit_params)
Fit to data, then transform it.
Fits transformer to X and y with optional parameters fit_params and returns a transformed version of X.
- Parameters
X (array-like of shape (n_samples, n_features)) – Input samples.
y (array-like of shape (n_samples,) or (n_samples, n_outputs), default=None) – Target values (None for unsupervised transformations).
**fit_params (dict) – Additional fit parameters.
- Returns
X_new – Transformed array.
- Return type
ndarray array of shape (n_samples, n_features_new)
- set_output(*, transform=None)
Set output container.
See Introducing the set_output API for an example on how to use the API.
- Parameters
transform ({“default”, “pandas”}, default=None) – Configure output of transform and fit_transform.
“default”: Default output format of a transformer
“pandas”: DataFrame output
None: Transform configuration is unchanged
- Returns
self – Estimator instance.
- Return type
estimator instance