public interface Discretizer extends Function<Serializable,Double>, Serializable
Discretization is used by Anchors tabular to perturb instances and find similar neighbours.
This interface supports both unsupervised and supervised discretizers. In supervised cases, labels are passed to
fit(Serializable[], Double[])
| Modifier and Type | Method and Description |
|---|---|
default Double[] |
apply(Serializable[] data)
Applies this discretizer to the passed data
|
void |
fit(Serializable[] values,
Double[] labels)
Fits the discretizer and passes all values that it might get asked to discretize
|
default DiscretizationTransition |
getTransition(Double discretizedValue)
This method returns the relation for a certain discretized value.
|
Collection<DiscretizationTransition> |
getTransitions()
This method returns all stored transitions
|
default Double[] apply(Serializable[] data)
data - the data to discretizevoid fit(Serializable[] values, Double[] labels)
values - the domainlabels - the labels or null, iff unsupervised. Caution: labels are required to be discretized firstdefault DiscretizationTransition getTransition(Double discretizedValue)
This allows to unApply a discretization and obtain the original value
discretizedValue - the value to get the relation forDiscretizationTransitionCollection<DiscretizationTransition> getTransitions()
DiscretizationTransitionsCopyright © 2019 viadee Unternehmensberatung AG. All rights reserved.