[WIP] Domain-invariant partial least squares regression#286
[WIP] Domain-invariant partial least squares regression#286B-Analytics wants to merge 22 commits intoscikit-adaptation:mainfrom
Conversation
|
Thanks for the PR! It seems your linter changed |
|
Hi Antoine I have reverted the changes as you suggested but it seems that the tests are still not successful... |
|
Hello @B-Analytics , You need to merge the README.md file because the current merge conflit prevent te doc and the test from running. |
|
Got it! |
|
Hey guys I still face problems with the tests. However, this time the problem is associated with the docs. Following files seem to cause the problem: ../../examples/deep/plot_adversarial.py Can you please give me a hand? |
|
You can generate and open the doc locally with |
|
Which version of scikit-learn are you using? |
|
Yes, I am using scikit-learn v1.5.2 on my local machine. Let me know if I can do something to move this forward. |
|
Skorch’s new version is coming soon: skorch-dev/skorch#1085. It should fix the CI! |
|
The scikit-learn team fixed the problem; let's check if the tests pass now! |
|
Hello @B-Analytics! Now that the tests are passing, can we review or do you still need some time to finish them? |
|
@tgnassou, yes please go ahead with the review. Thx! |
| on the source and target domain, the DIPLS and JDOT Regressor on the same task and | ||
| illustrate the learned (domain-invariant) features. | ||
|
|
||
| .. [36] Nikzad-Langerodi, R., Zellinger, W., Saminger-Platz, S., & Moser, B. A. (2020). |
| JCPOTLabelPropAdapter, | ||
| JCPOTLabelProp) | ||
|
|
||
| from ._dipls import ( |
There was a problem hiding this comment.
no need to put it in two lines
| ---------- | ||
| xs : ndarray of shape (n_source_samples, n_features) | ||
| Feature data from the source domain. | ||
|
|
There was a problem hiding this comment.
don't put space between lines of params
|
|
||
| References | ||
| ---------- | ||
| Ramin Nikzad-Langerodi et al., "Domain-Invariant Regression |
|
|
||
| Parameters | ||
| ---------- | ||
| xs : ndarray of shape (n_source_samples, n_features) |
There was a problem hiding this comment.
try to keep the convention of skada using Xs instead of xs
| # Preliminaries | ||
| self.n_, self.n_features_in_ = Xs.shape | ||
| self.ns_, _ = Xs.shape | ||
| self.x_ = Xs |
There was a problem hiding this comment.
I don't get why you use x and xs while there are the same data?
|
I made a little review but more to format the code writing. I'll read more in-depth soon. However, your PR lacks tests for your method to check if everything's working fine. Just get inspired by the already existing tests for shallow methods. |
|
Hi @B-Analytics, I try to improve a bit the code:
Let me know if you have any question, and you PR still need a test to check if everything is working weel:) |


Summary
I added the
DIPLSclass along with thedipalsfunction toskada/_dipls.pyand created an example inexamples/methods/plot_dipls.pyto showcase its usage. In the example, I apply di-PLS to a typical regression task in my domain (analytical chemistry) and tried to highlight the features that make it particularly useful for us (interpretability, flexibility). I also included a comparison with JDOT on the same task. The branch passed all tests (related to the new class and functions) and I updated the documentation accordingly.