Changeset 10085:4d3eae6c94a3 in orange


Ignore:
Timestamp:
02/08/12 16:06:01 (2 years ago)
Author:
Miha Stajdohar <miha.stajdohar@…>
Branch:
default
Children:
10086:6dc6d4c97504, 10090:5f656d83dfd8
rebase_source:
706fabd7d96f427c48a95c54ffd8557462858e71
Message:

Fixed some Gregor's bugs :)

Files:
4 edited

Legend:

Unmodified
Added
Removed
  • Orange/orng/orngOutlier.py

    r9671 r10085  
    1 from Orange.preprocess.outliers import * 
     1from Orange.data.outliers import * 
  • Orange/regression/base.py

    r9671 r10085  
    2121        learner = Orange.core.Learner.__new__(cls, **kwds) 
    2222        if table is not None: 
    23             learner.__init__(**kwds)  
     23            learner.__init__(**kwds) 
    2424            return learner(table, weight_id) 
    2525        else: 
    26             return learner       
     26            return learner 
    2727 
    2828    def __init__(self): 
     
    3434        :param imputer: function which imputes the missing values, 
    3535            if None, the default imputer: mean for the continuous variables 
    36             and most frequent value (majority) for discrete variables  
    37         :type imputer: None or Orange.feature.imputation.ImputerConstructor_model     
     36            and most frequent value (majority) for discrete variables 
     37        :type imputer: None or Orange.feature.imputation.ModelConstructor 
    3838        """ 
    3939        if imputer is not None: 
    4040            imputer = imputer 
    4141        else: # default imputer 
    42             self.imputer = Orange.feature.imputation.ImputerConstructor_model() 
     42            self.imputer = Orange.feature.imputation.ModelConstructor() 
    4343            self.imputer.learner_continuous = Orange.regression.mean.MeanLearner() 
    4444            self.imputer.learner_discrete = Orange.classification.majority.MajorityLearner() 
  • docs/reference/rst/code/outlier1.py

    r9823 r10085  
    22 
    33bridges = Orange.data.Table("bridges") 
    4 outlierDet = Orange.preprocess.outliers.OutlierDetection() 
     4outlierDet = Orange.data.outliers.OutlierDetection() 
    55outlierDet.set_examples(bridges) 
    66print outlierDet.z_values() 
  • docs/reference/rst/code/outlier2.py

    r9889 r10085  
    22 
    33bridges = Orange.data.Table("bridges") 
    4 outlier_det = Orange.preprocess.outliers.OutlierDetection() 
     4outlier_det = Orange.data.outliers.OutlierDetection() 
    55outlier_det.set_examples(bridges, Orange.distance.Euclidean(bridges)) 
    66outlier_det.set_knn(3) 
    77z_values = outlier_det.z_values() 
    8 for ex,zv in sorted(zip(bridges, z_values), key=lambda x: x[1])[-5:]: 
     8for ex, zv in sorted(zip(bridges, z_values), key=lambda x: x[1])[-5:]: 
    99    print ex, "Z-score: %5.3f" % zv 
Note: See TracChangeset for help on using the changeset viewer.