23.02.2015 Views

Machine Learning - DISCo

Machine Learning - DISCo

Machine Learning - DISCo

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

search, there is a danger that a suboptimal choice will be made at any step. To<br />

reduce this risk, we can extend the algorithm to perform a beam search; that is,<br />

a search in which the algorithm maintains a list of the k best candidates at each<br />

step, rather than a single best candidate. On each search step, descendants (specializations)<br />

are generated for each of these k best candidates, and the resulting<br />

set is again reduced to the k most promising members. Beam search keeps track<br />

of the most promising alternatives to the current top-rated hypothesis, so that all<br />

of their successors can be considered at each search step. This general to specific<br />

beam search algorithm is used by the CN2 program described by Clark and Niblett<br />

(1989). The algorithm is described in Table 10.2.<br />

LEARN-ONE-RULE(T~~~~~~~~~~~U~~,<br />

Attributes, Examples, k)<br />

Returns a single rule that covers some of the Examples. Conducts a generalJotospec$c<br />

greedy beam search for the best rule, guided by the PERFORMANCE metric.<br />

a Initialize Besthypothesis to the most general hypothesis 0<br />

a Initialize Candidatehypotheses to the set (Besthypothesis)<br />

a While Candidatehypotheses is not empty, Do<br />

I. Generate the next more spec@ candidatehypotheses<br />

a Allronstraints c the set of all constraints of the form (a = v), where a is a member<br />

of Attributes, and v is a value of a that occurs in the current set of Examples<br />

a Newrandidatehypotheses c<br />

for each h in Candidatehypotheses,<br />

for each c in Alll-onstraints,<br />

create a specialization of h by adding the constraint c<br />

a Remove from Newl-andidatehypotheses any hypotheses that are duplicates, inconsistent,<br />

or not maximally specific<br />

2. Update Besthypothesis<br />

a For all h in Newnandidatehypotheses do<br />

a If PERFORMANCE(^, Examples, Targetattribute)<br />

z PERFORMANCE(Besthypothesis, Examples, Targetattribute))<br />

Then Besthypothesis t h<br />

3. Update Candidatehypotheses<br />

a Candidatehypotheses c the k best members of New-candidatehypotheses, according<br />

to the PERFORMANCE measure.<br />

a Return a rule of the form<br />

"IF Best hypothesis THEN prediction"<br />

where prediction is the most frequent value of Targetattribute among those Examples<br />

that match Besthypothesis.<br />

PERM)RMANCE(~, Examples, Target attribute)<br />

a hxxamples t the subset of Examples that match h<br />

return -Entropy(hxxarnples), where entropy is with respect to Targetattribute<br />

TABLE 10.2<br />

One implementation for LEARN-ONE-RULE is a general-to-specific beam search. The frontier of current<br />

hypotheses is represented by the variable Candidatehypotheses. This algorithm is similar to that<br />

used by the CN2 program, described by Clark and Niblett (1989).

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!