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.KindOfProxy
Abstract 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 three abstract subtypes:
LearnAPI.IID
: The main type, for proxies consisting of uncorrelated individual components, one for each input observationLearnAPI.Joint
: For learners that predict a single probabilistic structure encapsulating correlations between target predictions for different input observationsLearnAPI.Single
: For learners, such as density estimators, that are trained on a target variable only (no features);predict
consumes no data and the returned target proxy is a single probabilistic structure.
For lists of all concrete instances, refer to documentation for the relevant subtype.
Simple target proxies
LearnAPI.IID
— TypeLearnAPI.IID <: LearnAPI.KindOfProxy
Abstract subtype of LearnAPI.KindOfProxy
. If kind_of_proxy
is an instance of LearnAPI.IID
then, given data
constisting 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).
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 |
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 |
SurvivalHazardFunction | hazard function for survival time |
OutlierScore | numerical score reflecting degree of outlierness (not necessarily normalized) |
Continuous | real-valued approximation/interpolation of a discrete-valued target, such as a count (e.g., number of phone calls) |
¹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.
Proxies for density estimation algorithms
LearnAPI.Single
— TypeSingle <: KindOfProxy
Abstract subtype of LearnAPI.KindOfProxy
. It applies only to learners for which predict
has no data argument, i.e., is of the form predict(model, kind_of_proxy)
. An example is an algorithm learning a probability distribution from samples, and we regard the samples as drawn from the "target" variable. If in this case, kind_of_proxy
is an instance of LearnAPI.Single
then, predict(learner)
returns a single object representing a probability distribution.
type T | form of output of predict(model, ::T) |
---|---|
SingleSampleable | object that can be sampled to obtain a single target observation |
SingleDistribution | explicit probability density/mass function for sampling the target |
SingleLogDistribution | explicit log-probability density/mass function for sampling the target |
Joint probability distributions
LearnAPI.Joint
— TypeJoint <: KindOfProxy
Abstract 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 |