Kinds of Target Proxy
The available kinds of target proxy (used for predict dispatch) are classified by subtypes of LearnAPI.KindOfProxy. These types are intended for dispatch only and have no fields.
LearnAPI.KindOfProxy — TypeLearnAPI.KindOfProxyAbstract type whose concrete subtypes T each represent a different kind of proxy for some target variable, associated with some learner. Instances T() are used to request the form of target predictions in predict calls.
See LearnAPI.jl documentation for an explanation of "targets" and "target proxies".
For example, Distribution is a concrete subtype of IID <: LearnAPI.KindOfProxy and a call like predict(model, Distribution(), Xnew) returns a data object whose observations are probability density/mass functions, assuming learner = LearnAPI.learner(model) supports predictions of that form, which is true if Distribution() in LearnAPI.kinds_of_proxy(learner).
Proxy types are grouped under two abstract subtypes:
LearnAPI.IID: The main type, for proxies consisting of uncorrelated individual components, one for each input observation. The type also applies to learners, such as density estimators, that are trained on a target variable only (no features), and wherepredictconsumes no data and the returned target proxy is a single observation (e.g., a single probability mass function)LearnAPI.Joint: For learners that predict a single probabilistic structure encapsulating correlations between target predictions for different input observations.
For lists of all concrete instances, refer to documentation for the relevant subtype.
Simple target proxies
LearnAPI.IID — TypeLearnAPI.IID <: LearnAPI.KindOfProxyAbstract subtype of LearnAPI.KindOfProxy. If kind_of_proxy is an instance of LearnAPI.IID then, given data consisting of $n$ observations, the following must hold:
ŷ = LearnAPI.predict(model, kind_of_proxy, data)is data also consisting of $n$ observations.The $j$th observation of
ŷ, for any $j$, depends only on the $j$th observation of the provideddata(no correlation between observations).
An exception holds in the case that LearnAPI.kind_of(learner)== LearnAPI.Generative():
LearnAPI.predict(model, kind_of_proxy)consists of a single observation (such as a single probability distribution).
See also LearnAPI.KindOfProxy.
Extended help
| type | form of an observation |
|---|---|
Point | same as target observations; may have the interpretation of a 50% quantile, 50% expectile or mode |
Interpolated | real-valued approximation/interpolation of a discrete-valued target, such as a count (e.g., number of phone calls) |
Sampleable | object that can be sampled to obtain object of the same form as target observation |
Distribution | explicit probability density/mass function whose sample space is all possible target observations |
LogDistribution | explicit log-probability density/mass function whose sample space is possible target observations |
Probability¹ | numerical probability or probability vector |
LogProbability¹ | log-probability or log-probability vector |
Parametric¹ | a list of parameters (e.g., mean and variance) describing some distribution |
LabelAmbiguous | collections of labels (in case of multi-class target) but without a known correspondence to the original target labels (and of possibly different number) as in, e.g., clustering |
LabelAmbiguousSampleable | sampleable version of LabelAmbiguous; see Sampleable above |
LabelAmbiguousDistribution | pdf/pmf version of LabelAmbiguous; see Distribution above |
LabelAmbiguousFuzzy | same as LabelAmbiguous but with multiple values of indeterminant number |
Quantile² | same as target but with quantile interpretation |
Expectile² | same as target but with expectile interpretation |
ConfidenceInterval² | confidence interval |
Fuzzy | finite but possibly varying number of target observations |
ProbabilisticFuzzy | as for Fuzzy but labeled with probabilities (not necessarily summing to one) |
SurvivalFunction | survival function |
SurvivalDistribution | probability distribution for survival time |
HazardFunction | hazard function for survival time |
OutlierScore | numerical score reflecting degree of outlierness (not necessarily normalized) |
¹Provided for completeness but discouraged to avoid ambiguities in representation.
²The level will be controlled by a hyper-parameter; models providing only quantiles or expectiles at 50% will provide Point instead.
Joint probability distributions
LearnAPI.Joint — TypeJoint <: KindOfProxyAbstract subtype of LearnAPI.KindOfProxy. If kind_of_proxy is an instance of LearnAPI.Joint then, given data consisting of $n$ observations, predict(model, kind_of_proxy, data) represents a single probability distribution for the sample space $Y^n$, where $Y$ is the space from which the target variable takes its values.
type T | form of output of predict(model, ::T, data) |
|---|---|
JointSampleable | object that can be sampled to obtain a vector whose elements have the form of target observations; the vector length matches the number of observations in data. |
JointDistribution | explicit probability density/mass function whose sample space is vectors of target observations; the vector length matches the number of observations in data |
JointLogDistribution | explicit log-probability density/mass function whose sample space is vectors of target observations; the vector length matches the number of observations in data |