Add DistributionFeatureMatching in QuaPy #20
Replies: 3 comments
-
Hi Bastien! Thanks for contacting us. Sure, your contributions to QuaPy are more than welcome. Congrats on the well-deserved award at ECML-PKDD! |
Beta Was this translation helpful? Give feedback.
-
Hi @BastienDussap , Hi @AlexMoreo , our team has integrated the kernel mean embedding and the random Fourier features into the qunfold Python package. Since our package de-couples the minimization of a loss from the representation of the data, we only had to implement the kernel and RFF representations you propose in your paper, following the implementations you already had published. The cool thing about having these methods in qunfold is that they can now be easily re-composed with other loss functions and pre-processors. All quantifiers in qunfold can readily be used in QuaPy. We are also planning to provide general support for the generalized label shift scenario that your paper discusses. |
Beta Was this translation helpful? Give feedback.
-
Amazing!
Thanks for sharing it! We should start integrating stuff into quapy
(which seems very easy thanks to your wrapper), and taking advantage of
the cross-fertilization with qunfold.
Cheers,
Alex
El 2024-01-10 14:44, Mirko Bunse escribió:
… Hi @BastienDussap [1] , Hi @AlexMoreo [2] ,
our team has integrated the kernel mean embedding and the random
Fourier features into the qunfold [3] Python package.
Since our package de-couples the minimization of a loss from the
representation of the data, we only had to implement the kernel and
RFF representations you propose in your paper, following the
implementations you already had published. The cool thing about having
these methods in qunfold is that they can now be easily re-composed
with other loss functions and pre-processors. All quantifiers in
qunfold can readily be used in QuaPy.
We are also planning to provide general support for the generalized
label shift scenario that your paper discusses.
--
Reply to this email directly, view it on GitHub [4], or unsubscribe
[5].
You are receiving this because you were mentioned.Message ID:
***@***.***>
Links:
------
[1] https://github.com/BastienDussap
[2] https://github.com/AlexMoreo
[3] https://github.com/mirkobunse/qunfold
[4]
#20 (comment)
[5]
https://github.com/notifications/unsubscribe-auth/AELURNBQ7MGMEYMXQDQHZPLYN2LMFAVCNFSM6AAAAAA5GI3MPGVHI2DSMVQWIX3LMV43SRDJONRXK43TNFXW4Q3PNVWWK3TUHM4DAOBQGIZTG
--
Alejandro Moreo
Istituto di Scienza e Tecnologie dell'Informazione (ISTI)
Area della Ricerca CNR di Pisa - via G. Moruzzi 1, 56124 Pisa Italy
|
Beta Was this translation helpful? Give feedback.
-
Hi everyone,
As I have discussed with some of you at ECML/PKDD, I would like to add DistributionFeatureMatching (from Label Shift Quantification with Robustness Guarantees via Distribution Feature Matching: https://arxiv.org/pdf/2306.04376.pdf).
The general method uses an embedding$\Phi$ that takes a distribution and returns the mean $\Phi(\mathbb{P}) = \mathbb{E}_{\mathbb{P}}[\Phi(X)]$ .
$\underset{\alpha \in \Delta^c}{\arg \min}\ \left| \sum \alpha_i \Phi(\hat{\mathbb{P}}_i) - \Phi(\hat{\mathbb{Q}}) \right|^2$ $\Phi(\hat{\mathbb{P}}_i)$ is the embedding of the class $i$ in the source (training set) and $\Phi(\hat{\mathbb{Q}})$ is the embedding of the target (testing set).
Using this we solve:
where
Here is what I want to implement:
Note: to solve the minimisation problem, we must rely on a QP solver, in my case I used cvxopt(https://cvxopt.org/)
I've already coded (and partially tested) these methods and made them compatible with Quapy.LabelledCollection.
What do you think about this ?
How should we proceed to add these methods, do I create a new branch DFM with these methods ? (I'm not familiar with project management using git)
Sincerely
Bastien.
Beta Was this translation helpful? Give feedback.
All reactions