Version spaces are a binary classification, empirical learning algorithm. The approach, as described in 'Version spaces: a candidate elimination approach to rule learning' by Tom Mitchel (1977) takes training examples (currently Tuples of a like-arity) and manages a 'version space'. A version space is a map containing two 'hypotheses' :S and :G. The :G hypothesis corresponds to the most general versions of the training data that are consistent with them and :S is the most specific versions. When a version space is presented with a new example it runs a 'candidate elimination' algorithm to modify the hypotheses :S and :G accordingly. Examples can be marked as being 'positive' examples, meaning that they are preferred instances. Anything not marked as 'positive' are taken as negative examples. Once trained, a version space can be used to classify new examples as 'positive' or 'negative'. If new examples are not covered by the existing hypotheses then they are classified as 'ambiguous' instead.
Version spaces are a binary classification, empirical learning algorithm. The approach, as described in 'Version spaces: a candidate elimination approach to rule learning' by Tom Mitchel (1977) takes training examples (currently Tuples of a like-arity) and manages a 'version space'. A version space is a map containing two 'hypotheses' :S and :G. The :G hypothesis corresponds to the most general versions of the training data that are consistent with them and :S is the most specific versions. When a version space is presented with a new example it runs a 'candidate elimination' algorithm to modify the hypotheses :S and :G accordingly. Examples can be marked as being 'positive' examples, meaning that they are preferred instances. Anything not marked as 'positive' are taken as negative examples. Once trained, a version space can be used to classify new examples as 'positive' or 'negative'. If new examples are not covered by the existing hypotheses then they are classified as 'ambiguous' instead.
(applicable? vs example)
(applicable? vs example positive?)
Returns true if at least one hypothesis in the version space is consistent with the example.
Returns true if at least one hypothesis in the version space is consistent with the example.
(arity-vec n)
Returns a vector template for arity n.
Returns a vector template for arity n.
(classify vs example)
Attempts to classify an example using the current version space. Returns ::positive, ::negative, or :ambiguous if G and S disagree.
Attempts to classify an example using the current version space. Returns ::positive, ::negative, or :ambiguous if G and S disagree.
(collapsed? vs)
(collapsed? g s)
Returns if a version space vs or a most-general hypothesis g and a most-specific hypothesis s have collapsed. That is, training has caused the hypotheses to become inconsistent, making further classification impossible.
Returns if a version space vs or a most-general hypothesis g and a most-specific hypothesis s have collapsed. That is, training has caused the hypotheses to become inconsistent, making further classification impossible.
(consistent? vs example)
(consistent? vs example positive?)
Returns true if all hypotheses in the version space are consistent with the labeled example.
Returns true if all hypotheses in the version space are consistent with the labeled example.
(converged? vs)
(converged? g s)
Returns if a version space vs or a most-general hypothesis g and a most-specific hypothesis s have converged. That is, training has caused the hypotheses to ground to a single legal case.
Returns if a version space vs or a most-general hypothesis g and a most-specific hypothesis s have converged. That is, training has caused the hypotheses to ground to a single legal case.
(covers? hypothesis example)
Takes a hypothesis from a version space and returns if the example is consistent with it.
Takes a hypothesis from a version space and returns if the example is consistent with it.
(refine vs example)
(refine vs example positive?)
Given a version space vs and an example, returns a new version space with hypotheses adjusted according to the given example's elements and its classification. An example is classified by attaching a metadata mapping :positive? -> boolean or by passing a boolean as the last argument. The explicit classification argument will always dominate the metadata classification.
Given a version space vs and an example, returns a new version space with hypotheses adjusted according to the given example's elements and its classification. An example is classified by attaching a metadata mapping :positive? -> boolean or by passing a boolean as the last argument. The explicit classification argument will always dominate the metadata classification.
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close