Esempio n. 1
0
    def __init__(self, **kwargs):
        """Initializes a ShrinkingLDA classifier.

        Additional arguments will be forwarded to the underlying classifier
        instantiation, which is
        ``sklearn.discriminant_analysis.LinearDiscriminantAnalysis`` here.

        Keyword Arguments
        -----------------
        solver: string, default = lsqr
            Solver used in LDA
        shrinkage: string, default = 'auto'

        """
        super(ShrinkingLDA, self).__init__()
        self.solver = kwargs.pop('solver', 'lsqr')
        self.shrinkage = kwargs.pop('shrinkage', 'auto')
        self.clf = _LinearDiscriminantAnalysis(solver=self.solver, shrinkage=self.shrinkage, **kwargs)
Esempio n. 2
0
 def __init__(self, **kwargs):
     super(LDA, self).__init__()
     self.clf = _LinearDiscriminantAnalysis(**kwargs)