Closed antoinedemathelin closed 7 months ago
All modified and coverable lines are covered by tests :white_check_mark:
Project coverage is 90.07%. Comparing base (
9e7905d
) to head (ac08382
).
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
Hi everyone,
I added a qp_solve
function to factorize the qp solver. I need to create specific test for it, I think.
@rflamary I added the smooth_weights
parameter as we discussed.
Hi @rflamary, I added the tests for the QP solver, similar to the cvxopt example https://cvxopt.org/examples/tutorial/qp.html The example now shows the decision boundary for smooth weight True or False
Hi everyone, I open this PR to propose an implementation of the KMM method from the paper https://proceedings.neurips.cc/paper_files/paper/2006/file/a2186aa7c086b46ad4e8bf81e2a3a19b-Paper.pdf as suggested in issue #82.
KMM has the particularity to directly learn the source weights corresponding to the source data Xs given in
fit
. In theadapt
method, I follow the same idea as for OT. The source data matrix are stored in an attributeX_source_
, then, in the adapt method, we compare the given X[src_idx] with Xsource (cf. OT1), if both are equal, we return the weights learned in fit. If not, we return the weight of the closest neighbor in Xsource, as done for OT mapping, cf. OT2 (note that we use the kernel function to find the closest neighbor).