Package parsimony :: Module estimators :: Class LogisticRegressionEstimator
[hide private]
[frames] | no frames]

Class LogisticRegressionEstimator

source code

   object --+    
            |    
BaseEstimator --+
                |
               LogisticRegressionEstimator
Known Subclasses:

Base estimator for logistic regression estimation

Parameters
----------
algorithm : ExplicitAlgorithm. The algorithm that will be applied.

start_vector : Numpy array. Generates the start vector that will be used.

class_weight : {dict, "auto"}, optional. Set the parameter weight of
        sample belonging to class i to class_weight[i]. If not given, all
        classes are supposed to have weight one. The "auto" mode uses the
        values of y to automatically adjust weights inversely proportional
        to class frequencies.

Instance Methods [hide private]
 
__init__(self, algorithm, start_vector=start_vectors.RandomStartVector(), class_weight=None)
x.__init__(...) initializes x; see help(type(x)) for signature
source code
 
fit(self, X, y)
Fit the model to the data.
source code
 
predict(self, X)
Return a predicted y corresponding to the X given and the beta previously determined.
source code
 
predict_probability(self, X) source code
 
score(self, X, y)
Rate of correct classification.
source code

Inherited from BaseEstimator: get_info, get_params, parameters, set_params

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Class Variables [hide private]
  __metaclass__ = abc.ABCMeta
Metaclass for defining Abstract Base Classes (ABCs).
  __abstractmethods__ = frozenset(['fit', 'get_params'])
Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, algorithm, start_vector=start_vectors.RandomStartVector(), class_weight=None)
(Constructor)

source code 

x.__init__(...) initializes x; see help(type(x)) for signature

Overrides: object.__init__
(inherited documentation)

fit(self, X, y)

source code 

Fit the model to the data.

Decorators:
  • @abc.abstractmethod
Overrides: BaseEstimator.fit

predict(self, X)

source code 

Return a predicted y corresponding to the X given and the beta previously determined.

Overrides: BaseEstimator.predict

score(self, X, y)

source code 

Rate of correct classification.

Overrides: BaseEstimator.score