/usr/share/pyshared/pebl/test/learner/test_simanneal.py is in python-pebl 1.0.2-2+b1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 | from pebl.test import testfile
from pebl import data, result
from pebl.learner import simanneal
class TestGreedyLearner:
def setUp(self):
self.data = data.fromfile(testfile('testdata5.txt'))
self.data.discretize()
def test_default_params(self):
s = simanneal.SimulatedAnnealingLearner(self.data)
s.run()
assert True
def test_param_effect(self):
s1 = simanneal.SimulatedAnnealingLearner(self.data)
s1.run()
s2 = simanneal.SimulatedAnnealingLearner( self.data, start_temp = 50)
s2.run()
assert s1.stats.iterations > s2.stats.iterations
|