This module provides a learner implementing the Greedy Learner algorithm. More information about greedy algorithms: http://en.wikipedia.org/wiki/Greedy_algorithm
Maximum number of iterations to run. default=1000
Maximum learner runtime in seconds. default=0
Maximum number of iterations without score improvement before a restart. default=restart_after_max_unimproved_iterations(500)
Starting network for a greedy search. default=’‘
- class pebl.learner.greedy.GreedyLearner(data_=None, prior_=None, **options)¶
Create a learner that uses a greedy learning algorithm.
The algorithm works as follows:
- start with a random network
- Make a small, local change and rescore network
- If new network scores better, accept it, otherwise reject.
- Steps 2-3 are repeated till the restarting_criteria is met, at which point we begin again with a new random network (step 1)
Any config param for ‘greedy’ can be passed in via options. Use just the option part of the parameter name.
For more information about greedy learning algorithms, consult:
- http://en.wikipedia.org/wiki/Greedy_algorithm
- D. Heckerman. A Tutorial on Learning with Bayesian Networks. Microsoft Technical Report MSR-TR-95-06, 1995. p.35.
- run()¶
Run the learner.
Returns a LearnerResult instance. Also sets self.result to that instance.