Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • docs/extend-widgets/rst/progressbar.rst

    r11408 r11593  
    77computation. For that purpose orange widgets use progress bar 
    88functions, to which they report progress in terms of per-cent 
    9 completion of the task. The progress is then either reported above the 
    10 icon of the widget in Orange Canvas. 
     9completion of the task. The progress is then either on the icon 
     10of the widget in Orange Canvas 
    1111 
    12 .. image:: progressbar-canvas.png 
     12.. image:: learningcurve.png 
    1313 
    1414or in the title bar of the widget's window. There, Orange also 
    1515reports on the estimated time of completion of the task: 
    1616 
    17 .. image:: progressbar-widget.png 
     17.. image:: learningcurve-output.png 
    1818 
    19 Class :obj:`OWWidget`, the mother class of all 
    20 widgets, has for this purpose a set of functions, which include: 
     19:class:`OWWidget` has for this purpose a set of functions, which include: 
    2120 
    2221.. method:: progressBarInit() 
     
    2625.. method:: progressBarFinished() 
    2726 
    28  
    2927where value is any number between 0 and 100. Sometimes, like it is 
    3028the case for our widgets, we know about the number of iterations involved in 
    3129computation, and we would only like to advance the progress bar for 
    3230some constant at the end of the iteration. For this, we use 
    33 :obj:`ProgressBar` class in :obj:`OWGUI`, and the code in 
     31:class:`ProgressBar` class in :mod:`OWGUI`, and the code in 
    3432the learning curve widget described in the previous lesson that does 
    3533it is as follows:: 
    3634 
    3735    def getLearningCurve(self, learners): 
    38         pb = OWGUI.ProgressBar(self, iterations=self.steps*self.folds) 
    39         curve = orngTest.learningCurveN(learners, self.data, 
    40             folds=self.folds, proportions=self.curvePoints, callback=pb.advance) 
     36        pb = OWGUI.ProgressBar(self, iterations=self.steps * self.folds) 
     37        curve = Orange.evaluation.testing.learning_curve_n( 
     38            learners, self.data, folds=self.folds, 
     39            proportions=self.curvePoints, callback=pb.advance) 
    4140        pb.finish() 
    4241        return curve 
    4342 
    44 :obj:`ProgressBar` class removes the need to define any 
    45 special function to compute the percent of the task done and set the 
    46 progress bar, and instead uses :obj:`ProgressBar`'s method 
    47 :obj:`advance` for this purpose. 
     43:class:`ProgressBar` class removes the need to define any special 
     44function to compute the percent of the task done and set the 
     45progress bar, and instead uses :class:`ProgressBar`'s method 
     46:func:`advance` for this purpose. 
Note: See TracChangeset for help on using the changeset viewer.