Changeset 3693:a48e781fed0a in orange


Ignore:
Timestamp:
05/27/07 17:16:15 (7 years ago)
Author:
blaz <blaz.zupan@…>
Branch:
default
Convert:
6caa505f1a23bc6bce2df4626f37e3fb9e40dc0a
Message:

linear regression now returns distribution (which is false, 0, just so that it works with orngTest and orngStat) (minor correction here) + minor correction in PLS in the calling part of the learner (did not work properly before)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • orange/orngRegression.py

    r3692 r3693  
    8989        self.beta = self.statistics['model']['estCoeff'] 
    9090 
    91     def __call__(self, example, returntype=None): 
     91    def __call__(self, example, result_type=orange.GetValue): 
    9292        ex = orange.Example(self.domain, example) 
    9393        ex = numpy.array(ex.native()) 
     
    141141class PLSRegressionLearner(object): 
    142142    """PLSRegressionLearner(data, y, x=None, nc=None)""" 
    143     def __new__(self, data=None, name='PLS regression', **kwds): 
     143    def __new__(self, data=None, y=None, x=None, nc = None, name='PLS regression', **kwds): 
    144144        learner = object.__new__(self, **kwds) 
    145145        if data: 
    146146            learner.__init__(name) # force init 
    147             return learner(data) 
     147            return learner(data, y) 
    148148        else: 
    149149            return learner  # invokes the __init__ 
Note: See TracChangeset for help on using the changeset viewer.