OutlyingnessBasedDepth#
- class skfda.exploratory.depth.OutlyingnessBasedDepth(outlyingness)[source]#
Computes depth based on an outlyingness measure.
An outlyingness function \(O(x)\) can be converted to a depth function as
\[D(x) = \frac{1}{1 + O(x)}\]if \(O(x)\) is unbounded or as
\[D(x) = 1 - \frac{O(x)}{\sup O(x)}\]if \(O(x)\) is bounded. If the infimum value of the outlyiness function is not zero, it is subtracted beforehand.
- Parameters:
outlyingness (Outlyingness) – Outlyingness object.
References
Serfling, R. (2006). Depth functions in nonparametric multivariate inference. DIMACS Series in Discrete Mathematics and Theoretical Computer Science, 72, 1.
Methods
fit
(X[, y])Learn the distribution from the observations.
fit_transform
(X[, y])Compute the depth or outlyingness of each observation.
Get metadata routing of this object.
get_params
([deep])Get parameters for this estimator.
set_output
(*[, transform])Set output container.
set_params
(**params)Set the parameters of this estimator.
transform
(X)Compute the depth or outlyingness inside the learned distribution.
- fit(X, y=None)[source]#
Learn the distribution from the observations.
- Parameters:
X (T) – Functional dataset from which the distribution of the data is inferred.
y (object) – Unused. Kept only for convention.
- Returns:
Fitted estimator.
- Return type:
- fit_transform(X, y=None)[source]#
Compute the depth or outlyingness of each observation.
This computation is done with respect to the whole dataset.
- get_metadata_routing()#
Get metadata routing of this object.
Please check User Guide on how the routing mechanism works.
- Returns:
routing – A
MetadataRequest
encapsulating routing information.- Return type:
MetadataRequest
- get_params(deep=True)#
Get parameters for this estimator.
- 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
”polars”: Polars output
None: Transform configuration is unchanged
New in version 1.4: “polars” option was added.
- Returns:
self – Estimator instance.
- Return type:
estimator instance
- set_params(**params)#
Set the parameters of this estimator.
The method works on simple estimators as well as on nested objects (such as
Pipeline
). The latter have parameters of the form<component>__<parameter>
so that it’s possible to update each component of a nested object.- Parameters:
**params (dict) – Estimator parameters.
- Returns:
self – Estimator instance.
- Return type:
estimator instance