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.KindOfProxyType
LearnAPI.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 observation

  • LearnAPI.Joint: For learners that predict a single probabilistic structure encapsulating correlations between target predictions for different input observations

  • LearnAPI.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.

source

Simple target proxies

LearnAPI.IIDType
LearnAPI.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 provided data (no correlation between observations).

See also LearnAPI.KindOfProxy.

Extended help

typeform of an observation
Pointsame as target observations; may have the interpretation of a 50% quantile, 50% expectile or mode
Sampleableobject that can be sampled to obtain object of the same form as target observation
Distributionexplicit probability density/mass function whose sample space is all possible target observations
LogDistributionexplicit 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
LabelAmbiguouscollections 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
LabelAmbiguousSampleablesampleable version of LabelAmbiguous; see Sampleable above
LabelAmbiguousDistributionpdf/pmf version of LabelAmbiguous; see Distribution above
LabelAmbiguousFuzzysame 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
Fuzzyfinite but possibly varying number of target observations
ProbabilisticFuzzyas for Fuzzy but labeled with probabilities (not necessarily summing to one)
SurvivalFunctionsurvival function
SurvivalDistributionprobability distribution for survival time
SurvivalHazardFunctionhazard function for survival time
OutlierScorenumerical score reflecting degree of outlierness (not necessarily normalized)
Continuousreal-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.

source

Proxies for density estimation algorithms

LearnAPI.SingleType
Single <: 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 Tform of output of predict(model, ::T)
SingleSampleableobject that can be sampled to obtain a single target observation
SingleDistributionexplicit probability density/mass function for sampling the target
SingleLogDistributionexplicit log-probability density/mass function for sampling the target
source

Joint probability distributions

LearnAPI.JointType
Joint <: 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 Tform of output of predict(model, ::T, data)
JointSampleableobject 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.
JointDistributionexplicit probability density/mass function whose sample space is vectors of target observations; the vector length matches the number of observations in data
JointLogDistributionexplicit log-probability density/mass function whose sample space is vectors of target observations; the vector length matches the number of observations in data
source