Changeset 9944:3dbc10862da3 in orange


Ignore:
Timestamp:
02/07/12 19:19:21 (2 years ago)
Author:
blaz <blaz.zupan@…>
Branch:
default
Children:
9945:ba7e22d4ebc5, 9963:7598327495d7
Parents:
9943:364085431ea7 (diff), 9942:32d14842ffc7 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Resolved conflicts in discretization.

Files:
8 deleted
6 edited

Legend:

Unmodified
Added
Removed
  • Orange/__init__.py

    r9929 r9944  
    1919_import("data.io") 
    2020_import("data.sample") 
     21_import("data.discretization") 
    2122 
    2223_import("network") 
  • Orange/__init__.py

    r9943 r9944  
    1919_import("data.io") 
    2020_import("data.sample") 
    21 _import("data.variable") 
    2221_import("data.discretization") 
    2322 
  • Orange/feature/discretization.py

    r9927 r9944  
    9393 
    9494        from Orange.feature import discretization 
    95         bayes = Orange.classification.bayes.NaiveBayesLearner() 
     95        bayes = Orange.classification.bayes.Learner() 
    9696        disc = orange.Preprocessor_discretize(method=discretization.EquiNDiscretization(numberOfIntervals=10)) 
    9797        dBayes = discretization.DiscretizedLearner(bayes, name='disc bayes') 
     
    127127  def __call__(self, example, resultType = orange.GetValue): 
    128128    return self.classifier(example, resultType) 
    129  
    130 class DiscretizeTable(object): 
    131     """Discretizes all continuous features of the data table. 
    132  
    133     :param data: data to discretize. 
    134     :type data: :class:`Orange.data.Table` 
    135  
    136     :param features: data features to discretize. None (default) to discretize all features. 
    137     :type features: list of :class:`Orange.feature.Descriptor` 
    138  
    139     :param method: feature discretization method. 
    140     :type method: :class:`Discretization` 
    141     """ 
    142     def __new__(cls, data=None, features=None, discretize_class=False, method=EqualFreq(n=3)): 
    143         if data is None: 
    144             self = object.__new__(cls) 
    145             return self 
    146         else: 
    147             self = cls(features=features, discretize_class=discretize_class, method=method) 
    148             return self(data) 
    149  
    150     def __init__(self, features=None, discretize_class=False, method=EqualFreq(n=3)): 
    151         self.features = features 
    152         self.discretize_class = discretize_class 
    153         self.method = method 
    154  
    155     def __call__(self, data): 
    156         pp = Preprocessor_discretize(attributes=self.features, discretizeClass=self.discretize_class) 
    157         pp.method = self.method 
    158         return pp(data) 
    159  
  • Orange/feature/discretization.py

    r9943 r9944  
    9393 
    9494        from Orange.feature import discretization 
    95         bayes = Orange.classification.bayes.NaiveBayesLearner() 
     95        bayes = Orange.classification.bayes.Learner() 
    9696        disc = orange.Preprocessor_discretize(method=discretization.EquiNDiscretization(numberOfIntervals=10)) 
    9797        dBayes = discretization.DiscretizedLearner(bayes, name='disc bayes') 
  • docs/reference/rst/Orange.feature.discretization.rst

    r9927 r9944  
    11.. py:currentmodule:: Orange.feature.discretization 
    22 
    3 ################################### 
    4 Discretization (``discretization``) 
    5 ################################### 
     3########################################### 
     4Feature discretization (``discretization``) 
     5########################################### 
    66 
    77.. index:: discretization 
  • docs/reference/rst/Orange.feature.discretization.rst

    r9943 r9944  
    342342continuous variable by adding a prefix ``D_``. The values of the new attributes 
    343343are computed automatically when they are needed using a transformation 
    344 function :obj:`~Orange.data.variable.Variable.get_value_from` 
    345 (see :class:`Orange.data.variable.Variable`) which encodes the discretization:: 
     344function :obj:`~Orange.feature.Descriptor.get_value_from` 
     345(see :class:`Orange.feature.Descriptor`) which encodes the discretization:: 
    346346 
    347347    >>> sep_w 
Note: See TracChangeset for help on using the changeset viewer.