- Many learning involves acquiring general concepts from specific training examples.
- [i] Each concept could be:
- Considered as a Boolean-valued function over a set.
- A concept:
$f: S\mapsto {\text{true},\text{false}}$
- A concept:
- Considered as a Boolean-valued function over a set.
- Concept Learning is the process of approximating such a Boolean-valued function from given examples.
Given
-
Variable vector structure
$X={x_1, x_2, ..., x_n}$ - A vector, that's a sequence of values, each having its own meaning.
- e.g.,
$X={\text{Sky}, \text{Temp}, \text{Humid}, \text{Wind}, \text{Water}, \text{Forecast}}$
-
Hypothesis
$h$ :- Conjunction of constraints on attributes, where each could be:
- A specific value (e.g.,
$Water=Warm$ ), or - Any value (e.g.,
$Water=?$ ), or - No value (e.g.,
$Water=\emptyset$ ). - e.g.,
$h=\langle\text{Sky}=\text{Sunny}, \text{Temp}=\text{Warm}, \text{Humid}=\text{Normal}$ $\text{Wind}=\text{Strong}, \text{Water}=\text{Warm}, \text{Forecast}=\text{Same}\rangle$
- A specific value (e.g.,
- [?] What's different between a hypothesis
$h$ and a data$x$ ?- A hypothesis
$h$ is a rule, while a data$x$ is a vector/data sample to be tested by the rule. - That is, the hypothesis assumes that
- Any
$x$ that conform it shall be true; - Any
$x$ that doesn't conform it shall be false.
- Any
- For instance:
- Given
- A hypothesis
$h=\langle?,?,\text{Normal},\text{Strong},\text{Warm},\text{Same}\rangle$ - Two data samples:
$X_{1}={{\text{Sunny},\text{Warm},\text{Normal},\text{Strong},\text{Warm},\text{Same}}}$ $X_{2}={{\text{Sunny},\text{Warm},\text{Normal},\text{Strong},\text{Cold},\text{Same}}}$
- A hypothesis
- Then, the hypothesis
$h$ :-
Assumes
$X_{1}$ to be$\text{Yes}$ , since$X_{1}$ confronts$h$ . -
Assumes
$X_{2}$ to be$\text{No}$ , since$X_{2}$ does not confronts$h$ ($\text{Cold}\neq \text{Warm}$ ).
-
Assumes
- Given
- A hypothesis
- Conjunction of constraints on attributes, where each could be:
-
Target Function
$c: X \rightarrow {0,1}$ - e.g.,
$c\Bigl({\text{Sunny}, \text{High}, \text{Normal}, \text{Strong}, \text{Warm}, \text{Same}}\Bigr)$ $= (\text{EnjoySpt}=\text{Yes})$ . - [?] Relationships between a target function and a hypothesis?
- They share the same structure, i.e.
$f:X\mapsto{\text{Yes},\text{No}}$ . - A target function is defined as the ground truth in the training examples;
- While a hypothesis is a general concept we're attempting to derive from the training examples.
- That is, instead of Assuming, the target function Restricts.
- They share the same structure, i.e.
- e.g.,
-
Training examples
$D$ :- Positive and negative examples of target function, paired with training samples.
-
$D={\langle X_1, c(X_1)\rangle, \langle X_2, c(X_2) \rangle, ..., \langle X_m, c(X_m) \rangle}$ Do
-
Derive a general if-then rule to best summarize the training examples.
- [i] More-General-than-or-Equal-to 详于或等于
- Let
$h_j$ and$h_k$ be bool-valued functions defined over$X$ . - Then,
$h_j$ is$more_general_than_or_equal_to$ $h_k$ ($h_j\ge_g h_k$ ) iff:$\forall x\in X, h_k(x)=1 \rightarrow h_j(x)=1$
- Moreover,
$h_j$ is strictly$more_general$ than$h_k$ iff:$(h_j\ge_g h_k)\land(h_k\ngeq_g h_j)$
- Let
- From Specific to General Procedure:
- Initialize
$h$ to the most specific hypothesis in$H$ . - for
$X$ where$c(X)=1$ :- for
$x_i$ where$x_i\in X={x_1,x_2,...}$ :- if
$x_i$ in$h$ doesn't satisfy$x_i$ in$X$ :- Replace
$x_i$ in$h$ with a more general constraint that's accepted by$X$ .
- Replace
- if
- for
- Output:
$h$ .
Example:
| Training Samples | S | Description |
|---|---|---|
|
|
|
Initialized to be the most specific. |
|
|
|
|
|
|
Ignore negative training samples. | |
|
|
|
|
-
Unable to determine uniqueness of
$h$ . 无法确定$h$的唯一性- It does not inform that whether the derived hypothesis is the only one in
$H$ that is consistent with$D$ , or there are other hypothesis that are also consistent with$D$ as well.
- It does not inform that whether the derived hypothesis is the only one in
-
Picks a maximally specific
$h$ . 总是选择最详尽的假设$h$- Find-S algorithm always pick the most specific hypothesis among all the consistent ones.
-
Does not display the noise in Training data itself.
无法指出训练数据$D$内部本身的不一致性
- Occasionally, training examples would contain at least one error, i.e., noise.
- That is, there may be two data samples in the training data that are inconsistent with each other.
- This kind of inconsistency can severely mislead Find-S algorithm, since it ignores the negative examples.
-
Doesn't give alternative ways to find
$h$ . 只能选择多个相同详尽的$h$中的其中一个.- There might be several hypothesis in
$H$ that's equally specific to the selected one. - Therefore, there ought to be different paths to reach those goal.
- There might be several hypothesis in
-
[DEF] A hypothesis
$h$ is consistent with a set of training examples$D$ of target concept$c$ iff:-
$Consistent(h,D)\equiv\forall\langle X,c(X)\rangle\in D, h(X)=c(X)$ . - That is,
$h$ produces the same corresponding output facing all input vectors in$D$ .
-
-
[DEF] The version space
$VS_{H,D}$ with respect to:- Hypothesis space
$H={h_1, h_2, ...,h_n}$ - That is, the set of all the possible hypothesis with respect to the format of
$X$ .
- That is, the set of all the possible hypothesis with respect to the format of
- Training examples
$D={\langle X_1, c(X_1)\rangle,\langle X_2, c(X_2)\rangle,...,\langle X_m, c(X_m)\rangle,}$
- Hypothesis space
-
is defined as:
$VS_{H,D} \equiv {h\in H|Consistent(h,D)}$ - That is, a subset
- from the set of all hypotheses
$H$ - that's consistent with all training examples in
$D$ .
- from the set of all hypotheses
-
[DEF] Specific Boundary (
$S$ ) of$VS_{H,D}$ 一致空间的详尽边界- The set of
$VS_{H,D}$ 's maximally specific members of$H$ that's consistent with$D$ . -
$S\equiv {s\in H | Consistent(s,D)$ $\land (\neg\exists s'\in H)[(s>_g s') \land Consistent(s',D)]}$ -
$s$ is consistent with$D$ . - Doesn't exist
$s'$ who is consistent with$D$ and also less general than the$s$ . - 一致空间中没有比集合$S$中的假设更加详尽的假设了。
-
- The set of
-
[DEF] General Boundary (
$G$ ) of$VS_{H,D}$ 一致空间的通用边界- The set of
$VS_{H,D}$ 's maximally general members of$H$ that's consistent with$D$ . -
$G\equiv {g\in H | Consistent(sg,D)$ $\land (\neg\exists g'\in H)[(g'>_g g) \land Consistent(g',D)]}$ -
$g$ is consistent with$D$ . - Doesn't exist
$g'$ who is consistent with D and also more general than$g$ . - 一致空间中没有比集合$G$中的假设更加通用的假设了。
-
- The set of
Procedure:
- For each training example
$\langle x,c(x)\rangle\in D$ do:- if$c(x)=Positive$ do:
- Remove from
$G$ any hypothesis inconsistent with$d$ . - For each hypothesis
$s\in S$ that's inconsistent with$d$ :- Remove
$s$ from$S$ . - Add to
$S$ a small minimal generalizations$h$ of$s$ s.t.,-
$h$ is consistent with$d$ , and some member of$G$ is more general than$h$ .
-
- Remove from
$S$ any hypothesis that- is more general than another hypothesis in
$S$ .
- is more general than another hypothesis in
- Remove
- Remove from
- if$c(x)=Negative$ do:
- Remove from
$S$ any hypothesis inconsistent with d. - For each hypothesis
$g\in G$ that's inconsistent with$d$ :- Remove
$g$ from$G$ . - Add to
$G$ a small minimal specializations$h$ of$g$ s.t.,-
$h$ is consistent with$d$ , and some other member of$S$ is more specific than$h$ .
-
- Remove from
$G$ any hypothesis that- is less general than another hypothesis in
$G$ .
- is less general than another hypothesis in
- Remove
- Remove from
- if$c(x)=Positive$ do:
Example
| Training Samples | S | G | Description |
|---|---|---|---|
| Training Samples | S - Specific Bound | G - General Bound | Description |
|---|---|---|---|
|
|
|
||
|
|
|
||
|
|
|
Remove inconsistent hypothesis. Here, the classification is "-". Therefore, to be "consistent", the target value should be different from the original. |
|
|
|
|
|
|
The relationships among "Spaces" could be defined as:
- Hypothesis Space
- is the "Union" set with respect to
$X$ , the vector structure. - It contains all the possible hypothesis under the structure of
$X$ .
- is the "Union" set with respect to
- Version Space
- is a subset of hypothesis space.
- Contains all the special hypothesis in hypothesis space, which are consistent to the given training data.
-
$S\cup G$ :-
$S$ and$G$ are the most extreme hypothesis within a given version space, i.e., the boundaries.-
$S$ contains the most specific hypothesis in version space. -
$G$ contains the most general hypothesis in version space.
-
- Any other hypothesis in version space can not be more general than the ones in
$G$ , and also can not be more specific than the ones in$S$ .
-