source: orange/orange/doc/reference/pf_progress.py @ 6926:1203c5503207

Revision 6926:1203c5503207, 468 bytes checked in by anzevap <anzevap@…>, 4 years ago (diff)

Added some documentation for the Pathfinder procedure.

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.