source: orange/Orange/doc/reference/pf_progress.py @ 9671:a7b056375472

Revision 9671:a7b056375472, 468 bytes checked in by anze <anze.staric@…>, 2 years ago (diff)

Moved orange to Orange (part 2)

Line 
1import orngNetwork
2from orangeom import Pathfinder
3
4def myCb(complete):
5    """
6    The callback function.
7    """
8    print 'The procedure is %d%% complete.' % int(complete * 100)
9
10# Read a demo network from a file
11net = orngNetwork.Network.read('demo.net')
12
13# Choose some parameters
14r, q = 1, 6
15
16# Create a pathfinder instance
17pf = Pathfinder()
18
19# Pass the reference to the desired function
20pf.setProgressCallback(myCb)
21
22# Simplify the network
23pf.simplify(r, q, net)
Note: See TracBrowser for help on using the repository browser.