# SubsetLink

The **SubsetLink** denotes extensional inheritance between two Atoms. An example of a SubsetLink would be:

Subset dog animal

For more information, see InheritanceLink#Extensional_vs_Intensional.

## PLN Semantics

In PLN the truth value of a SubsetLink relationship corresponds to a conditional probability over concepts, formally:

SubsetLink <TV> A B

corresponds to the conditional probability **Failed to parse (MathML with SVG or PNG fallback (recommended for modern browsers and accessibility tools): Invalid response ("Math extension cannot connect to Restbase.") from server "https://en.wikipedia.org/api/rest_v1/":): {\displaystyle P(B|A)}**
with truth value estimate:

**Failed to parse (MathML with SVG or PNG fallback (recommended for modern browsers and accessibility tools): Invalid response ("Math extension cannot connect to Restbase.") from server "https://en.wikipedia.org/api/rest_v1/":): {\displaystyle TV.strength = \frac{\sum_x f_\wedge((\text{Member}\ x\ B).s, (\text{Member}\ x\ A).s)}{\sum_x (\text{Member}\ x\ A).s}}****Failed to parse (MathML with SVG or PNG fallback (recommended for modern browsers and accessibility tools): Invalid response ("Math extension cannot connect to Restbase.") from server "https://en.wikipedia.org/api/rest_v1/":): {\displaystyle TV.count = |A|}**

where (Member x y).s is the degree to which x is a member of concept y, which can also be represented in the AtomSpace via a MemberLink. In case the truth values of such MemberLinks have confidences smaller than 1, then, due to being sums of random variables, convolution products must be used. In practice that isn't currently done due to its computational cost, even though it's likely that for some sub-cases, such as when the confidence is identical across all member links, an accurate estimate should be cost effective.

It should also be noted that such formula only works under the assumption that all members are equally weighted, that is the mass function over their singletons is uniform. Formally

**Failed to parse (MathML with SVG or PNG fallback (recommended for modern browsers and accessibility tools): Invalid response ("Math extension cannot connect to Restbase.") from server "https://en.wikipedia.org/api/rest_v1/":): {\displaystyle \exists m \forall x \forall A\ (\text{Subset}\ A\ (\text{Set}\ x)).s = m}**

If such assumption does not hold, or no knowledge of members is available, then a more general formula can be applied. Let **Failed to parse (MathML with SVG or PNG fallback (recommended for modern browsers and accessibility tools): Invalid response ("Math extension cannot connect to Restbase.") from server "https://en.wikipedia.org/api/rest_v1/":): {\displaystyle \mathcal{P}}**
be a partition of A, then the truth value of such subset is calculated as follows:

**Failed to parse (MathML with SVG or PNG fallback (recommended for modern browsers and accessibility tools): Invalid response ("Math extension cannot connect to Restbase.") from server "https://en.wikipedia.org/api/rest_v1/":): {\displaystyle TV.strength = \sum_{X \in \mathcal{P}} (\text{Subset}\ A\ (\text{And}\ B\ X)).s}**

A formula for its confidence remains to be determined, although the size of the partition could be used as an approximation of its count.

### Mapping Classifiers to SubsetLink

The following document explains how to map classifiers to equivalent SubsetLink (or ImplicationLink as used in the document) and how to set its TruthValue given their scores such as accuracy, precision and recall [1].