Fading some algorithms from bob.learn.linear
Hi,
This MR goes in the direction of our medium term goal of getting rid of C++ code from our side. In this MR I will:
-
Get rid of PCA (in favor of scikit-learn
) (and get rid of the machine of course) -
Get rid of LDA (in favor of scikit-learn
) -
Get rid of LogisticRegression (in favor of scikit-learn
) -
Get rid of BIC (no one uses it) -
Get rid of GFK (no one uses it, this I've implemented for my thesis) -
Port Whitening to python (the bob.bio.spear is going to use it) (eventually moved to scikit-learn) -
Port WCCN to python (the bob.bio.spear is going to use it) (eventually moved to scikit-learn)
As with the database porting, I'll do it little by little along the weeks. In one day we'll finish it.
Merge request reports
Activity
assigned to @amohammadi
Hi,
I've finished with this package. Now everything is python based. Some classes I've eliminated, some we have a scikit-learn/dask-ml implementation, and some I've ported. The ported
Whitening
andWCCN
will be useful for @ydayer once he reachesiVectors
We can't merge it untils this one bob.learn.em!40 (merged) is merged
Do you mind reviewing this one @amohammadi ?
mentioned in issue bob.ip.gabor#6
Ok. I've fixed the build issues.
Now, everything should be green in a few minutes @amohammadi.
Remember that we can't merge this until bob.learn.em!40 (merged) is merged.
bob.learn.em!40 (merged) was merged so I am reviewing this one.
- bob/learn/linear/whitening.py 0 → 100644
33 .. math:: 34 W = cholesky([Cov(X)]^{-1}) 35 36 37 References: 38 - 1. https://rtmath.net/help/html/e9c12dc0-e813-4ca9-aaa3-82340f1c5d24.htm 39 - 2. http://en.wikipedia.org/wiki/Cholesky_decomposition 40 41 """ 42 43 def __init__(self, pinv: bool = False): 44 self.pinv = pinv 45 46 def fit(self, X: da.Array, y=None): 47 # 1. Computes the mean vector and the covariance matrix of the training set 48 mu = da.mean(X, axis=0) 44 36 - {{ pin_compatible('scipy') }} 37 - {{ pin_compatible('dask') }} 38 - {{ pin_compatible('scikit-learn') }} 45 39 46 40 test: 47 41 imports: 48 42 - {{ name }} 49 43 commands: 50 - nosetests --with-coverage --cover-package={{ name }} -sv {{ name }} 44 - pytest --capture=no --verbose --cov {{ name }} --cov-config {{ project_dir }}/pyproject.toml --cov-report term-missing --cov-report html:{{ project_dir }}/sphinx/coverage --cov-report xml:{{ project_dir }}/coverage.xml --pyargs {{ name }} 51 45 - sphinx-build -aEW {{ project_dir }}/doc {{ project_dir }}/sphinx 52 46 - sphinx-build -aEb doctest {{ project_dir }}/doc sphinx 53 47 - conda inspect linkages -p $PREFIX {{ name }} # [not win] 54 48 - conda inspect objects -p $PREFIX {{ name }} # [osx] 55 49 requires: 56 50 - nose {{ nose }} 12 12 13 13 .. todolist:: 14 14 15 This package includes the definition of a linear machine, which is capable of 16 either projecting the input data into maximally spread representations, 17 linearly, or providing linear separation planes for multi-class data samples. 18 15 The package includes the machine definition *per se* and a selection of 19 16 different trainers for specialized purposes: Can somebody, please, make these improvements?
Thanks
Edited by Tiago de Freitas Pereiramentioned in merge request bob.learn.em!44 (merged)
Closing this one in favor of