Ignore:
Files:
1 deleted
8 edited

Legend:

Unmodified
Added
Removed
  • Orange/OrangeWidgets/Unsupervised/OWDistanceFile.py

    r9671 r10398  
    1010import OWGUI 
    1111import orange 
     12import orngMisc 
    1213import exceptions 
    1314import os.path 
  • Orange/regression/base.py

    r10238 r10396  
    11"""\ 
    2 ==================================== 
    3 Basic regression learner (``basic``) 
    4 ==================================== 
     2======================= 
     3Base regression learner 
     4======================= 
    55 
    66.. index:: regression 
     
    1414 
    1515class BaseRegressionLearner(Orange.core.Learner): 
    16     """ Base Regression Learner "learns" how to treat the discrete 
    17         variables and missing data. 
     16    """Fitting regressors typically requires data that has only 
     17    continuous-valued features and no missing values. This class 
     18    provides methods for appropriate transformation of the data and 
     19    serves as a base class for most regressor classes. 
    1820    """ 
    1921 
     
    3537 
    3638    def set_imputer(self, imputer=None): 
    37         """ Sets the imputer for missing values. 
     39        """ Set the imputer for missing data. 
    3840 
    39         :param imputer: function which imputes the missing values, 
    40             if None, the default imputer: mean for the continuous variables 
    41             and most frequent value (majority) for discrete variables 
     41        :param imputer: function which constructs the imputer for the 
     42            missing values, if ``None``, the default imputer replaces 
     43            missing continuous data with the average of the 
     44            corresponding variable and missing discrete data with the 
     45            most frequent value. 
    4246        :type imputer: None or Orange.feature.imputation.ModelConstructor 
    4347        """ 
     
    5054 
    5155    def set_continuizer(self, continuizer=None): 
    52         """ Sets the continuizer of the discrete variables 
     56        """Set the continuizer of the discrete variables 
    5357 
    54         :param continuizer: function which replaces the categorical (dicrete) 
    55             variables with numerical variables. If None, the default continuizer 
    56             is used 
     58        :param continuizer: function which replaces the categorical 
     59            (dicrete) variables with numerical variables. If ``None``, 
     60            the default continuizer is used 
    5761        :type continuizer: None or Orange.data.continuization.DomainContinuizer 
    5862        """ 
     
    6569 
    6670    def impute_table(self, table): 
    67         """ Imputes missing values. 
    68         Returns a new :class:`Orange.data.Table` object 
     71        """Impute missing values and return a new 
     72        :class:`Orange.data.Table` object 
    6973 
    7074        :param table: data instances. 
     
    7781 
    7882    def continuize_table(self, table): 
    79         """ Continuizes the discrete variables. 
    80         Returns a new :class:`Orange.data.Table` object 
     83        """Replace discrete variables with continuous and return a new 
     84        instance of :class:`Orange.data.Table`. 
    8185 
    8286        :param table: data instances. 
  • Orange/regression/tree.py

    r10294 r10395  
    99*************************** 
    1010 
    11 Regression tree shares its implementation with Orange.classification.tree.TreeLearner, 
    12 but uses a different set of functions to evaluate node splitting and stop 
    13 criteria. Usage of regression trees is straightforward as demonstrated on the 
    14 following example (:download:`regression-tree-run.py <code/regression-tree-run.py>`): 
     11Regression tree shares its implementation with 
     12:obj:`Orange.classification.tree.TreeLearner`, but uses a different set of 
     13functions to evaluate node splitting and stop criteria. Usage of 
     14regression trees is straightforward as demonstrated on the following 
     15example (:download:`regression-tree-run.py 
     16<code/regression-tree-run.py>`): 
    1517 
    1618.. literalinclude:: code/regression-tree-run.py 
  • Orange/statistics/basic.py

    r9994 r10399  
    1 """ 
    2 .. index:: Basic Statistics for Continuous Features 
    3  
    4 ======================================== 
    5 Basic Statistics for Continuous Features 
    6 ======================================== 
    7  
    8 The are two simple classes for computing basic statistics 
    9 for continuous features, such as their minimal and maximal value 
    10 or average: :class:`Orange.statistics.basic.Variable` holds the statistics for a single variable 
    11 and :class:`Orange.statistics.basic.Domain` behaves like a list of instances of 
    12 the above class for all variables in the domain. 
    13  
    14 .. class:: Variable 
    15  
    16     Computes and stores minimal, maximal, average and 
    17     standard deviation of a variable. It does not include the median or any 
    18     other statistics that can be computed on the fly, without remembering the 
    19     data; such statistics can be obtained classes from module :obj:`Orange.statistics.distribution`. 
    20  
    21     Instances of this class are seldom constructed manually; they are more often 
    22     returned by :obj:`Domain` described below. 
    23  
    24     .. attribute:: variable 
    25      
    26         The variable to which the data applies. 
    27  
    28     .. attribute:: min 
    29  
    30         Minimal value encountered 
    31  
    32     .. attribute:: max 
    33  
    34         Maximal value encountered 
    35  
    36     .. attribute:: avg 
    37  
    38         Average value 
    39  
    40     .. attribute:: dev 
    41  
    42         Standard deviation 
    43  
    44     .. attribute:: n 
    45  
    46         Number of instances for which the value was defined. 
    47         If instances were weighted, :obj:`n` holds the sum of weights 
    48          
    49     .. attribute:: sum 
    50  
    51         Weighted sum of values 
    52  
    53     .. attribute:: sum2 
    54  
    55         Weighted sum of squared values 
    56  
    57     .. 
    58         .. attribute:: holdRecomputation 
    59      
    60             Holds recomputation of the average and standard deviation. 
    61  
    62     .. method:: add(value[, weight=1]) 
    63      
    64         Add a value to the statistics: adjust :obj:`min` and :obj:`max` if 
    65         necessary, increase :obj:`n` and recompute :obj:`sum`, :obj:`sum2`, 
    66         :obj:`avg` and :obj:`dev`. 
    67  
    68         :param value: Value to be added to the statistics 
    69         :type value: float 
    70         :param weight: Weight assigned to the value 
    71         :type weight: float 
    72  
    73     .. 
    74         .. method:: recompute() 
    75  
    76             Recompute the average and deviation. 
    77  
    78 .. class:: Domain 
    79  
    80     ``statistics.basic.Domain`` behaves like an ordinary list, except that its 
    81     elements can also be indexed by variable names or descriptors. 
    82  
    83     .. method:: __init__(data[, weight=None]) 
    84  
    85         Compute the statistics for all continuous variables in the data, and put 
    86         :obj:`None` to the places corresponding to variables of other types. 
    87  
    88         :param data: A table of instances 
    89         :type data: Orange.data.Table 
    90         :param weight: The id of the meta-attribute with weights 
    91         :type weight: `int` or none 
    92          
    93     .. method:: purge() 
    94      
    95         Remove the :obj:`None`'s corresponding to non-continuous features; this 
    96         truncates the list, so the indices do not respond to indices of 
    97         variables in the domain. 
    98      
    99     part of :download:`distributions-basic-stat.py <code/distributions-basic-stat.py>` 
    100      
    101     .. literalinclude:: code/distributions-basic-stat.py 
    102         :lines: 1-10 
    103  
    104     Output:: 
    105  
    106              feature   min   max   avg 
    107         sepal length 4.300 7.900 5.843 
    108          sepal width 2.000 4.400 3.054 
    109         petal length 1.000 6.900 3.759 
    110          petal width 0.100 2.500 1.199 
    111  
    112  
    113     part of :download:`distributions-basic-stat.py <code/distributions-basic-stat.py>` 
    114      
    115     .. literalinclude:: code/distributions-basic-stat.py 
    116         :lines: 11- 
    117  
    118     Output:: 
    119  
    120         5.84333467484  
    121  
    122 """ 
    123  
    1241from Orange.core import BasicAttrStat as Variable 
    1252from Orange.core import DomainBasicAttrStat as Domain 
  • docs/reference/rst/Orange.regression.rst

    r9372 r10396  
    33########################### 
    44 
     5Orange uses the term `classification` to also denote the 
     6regression. For instance, the dependent variable is called a `class 
     7variable` even when it is continuous, and models are generally called 
     8classifiers. A part of the reason is that classification and 
     9regression rely on the same set of basic classes. 
     10 
     11Please see the documentation on :doc:`Orange.classification` for 
     12information on how to fit models in general. 
     13 
     14Orange contains a number of regression models which are listed below. 
     15 
    516.. toctree:: 
    6    :maxdepth: 4 
     17   :maxdepth: 1 
    718 
    819   Orange.regression.mean 
    9    Orange.regression.base 
    1020   Orange.regression.linear 
    1121   Orange.regression.lasso 
     
    1424   Orange.regression.tree 
    1525 
     26.. automodule:: Orange.regression.base 
  • docs/reference/rst/Orange.statistics.basic.rst

    r9372 r10397  
    1 .. automodule:: Orange.statistics.basic 
     1.. py:currentmodule:: Orange.statistics.basic 
     2 
     3.. index:: Basic Statistics for Continuous Features 
     4 
     5==================================================== 
     6Basic Statistics for Continuous Features (``basic``) 
     7==================================================== 
     8 
     9The are two simple classes for computing basic statistics 
     10for continuous features, such as their minimal and maximal value 
     11or average: :class:`Orange.statistics.basic.Variable` holds the statistics for a single variable 
     12and :class:`Orange.statistics.basic.Domain` behaves like a list of instances of 
     13the above class for all variables in the domain. 
     14 
     15.. class:: Variable 
     16 
     17    Computes and stores minimal, maximal, average and 
     18    standard deviation of a variable. It does not include the median or any 
     19    other statistics that can be computed on the fly, without remembering the 
     20    data; such statistics can be obtained classes from module :obj:`Orange.statistics.distribution`. 
     21 
     22    Instances of this class are seldom constructed manually; they are more often 
     23    returned by :obj:`Domain` described below. 
     24 
     25    .. attribute:: variable 
     26     
     27        The variable to which the data applies. 
     28 
     29    .. attribute:: min 
     30 
     31        Minimal value encountered 
     32 
     33    .. attribute:: max 
     34 
     35        Maximal value encountered 
     36 
     37    .. attribute:: avg 
     38 
     39        Average value 
     40 
     41    .. attribute:: dev 
     42 
     43        Standard deviation 
     44 
     45    .. attribute:: n 
     46 
     47        Number of instances for which the value was defined. 
     48        If instances were weighted, :obj:`n` holds the sum of weights 
     49         
     50    .. attribute:: sum 
     51 
     52        Weighted sum of values 
     53 
     54    .. attribute:: sum2 
     55 
     56        Weighted sum of squared values 
     57 
     58    .. 
     59        .. attribute:: holdRecomputation 
     60     
     61            Holds recomputation of the average and standard deviation. 
     62 
     63    .. method:: add(value[, weight=1]) 
     64     
     65        Add a value to the statistics: adjust :obj:`min` and :obj:`max` if 
     66        necessary, increase :obj:`n` and recompute :obj:`sum`, :obj:`sum2`, 
     67        :obj:`avg` and :obj:`dev`. 
     68 
     69        :param value: Value to be added to the statistics 
     70        :type value: float 
     71        :param weight: Weight assigned to the value 
     72        :type weight: float 
     73 
     74    .. 
     75        .. method:: recompute() 
     76 
     77            Recompute the average and deviation. 
     78 
     79.. class:: Domain 
     80 
     81    ``statistics.basic.Domain`` behaves like an ordinary list, except that its 
     82    elements can also be indexed by variable names or descriptors. 
     83 
     84    .. method:: __init__(data[, weight=None]) 
     85 
     86        Compute the statistics for all continuous variables in the data, and put 
     87        :obj:`None` to the places corresponding to variables of other types. 
     88 
     89        :param data: A table of instances 
     90        :type data: Orange.data.Table 
     91        :param weight: The id of the meta-attribute with weights 
     92        :type weight: `int` or none 
     93         
     94    .. method:: purge() 
     95     
     96        Remove the :obj:`None`'s corresponding to non-continuous features; this 
     97        truncates the list, so the indices do not respond to indices of 
     98        variables in the domain. 
     99     
     100    part of :download:`distributions-basic-stat.py <code/distributions-basic-stat.py>` 
     101     
     102    .. literalinclude:: code/distributions-basic-stat.py 
     103        :lines: 1-10 
     104 
     105    Output:: 
     106 
     107             feature   min   max   avg 
     108        sepal length 4.300 7.900 5.843 
     109         sepal width 2.000 4.400 3.054 
     110        petal length 1.000 6.900 3.759 
     111         petal width 0.100 2.500 1.199 
     112 
     113 
     114    part of :download:`distributions-basic-stat.py <code/distributions-basic-stat.py>` 
     115     
     116    .. literalinclude:: code/distributions-basic-stat.py 
     117        :lines: 11- 
     118 
     119    Output:: 
     120 
     121        5.84333467484  
  • docs/reference/rst/Orange.statistics.contingency.rst

    r10246 r10397  
    1 .. py:currentmodule::Orange.statistics.contingency 
     1.. py:currentmodule:: Orange.statistics.contingency 
    22 
    33.. index:: Contingency table 
    44 
    5 ================= 
    6 Contingency table 
    7 ================= 
     5=================================== 
     6Contingency table (``contingency``) 
     7=================================== 
    88 
    99Contingency table contains conditional distributions. Unless explicitly 
  • docs/reference/rst/Orange.statistics.distribution.rst

    r10372 r10397  
    33.. index:: Distributions 
    44 
    5 ============= 
    6 Distributions 
    7 ============= 
     5================================ 
     6Distributions (``distribution``) 
     7================================ 
    88 
    99:obj:`Distribution` and derived classes store empirical 
Note: See TracChangeset for help on using the changeset viewer.