Returns self.
if Xs is not None and Xt is not None and ys is not None:
super(SinkhornLpl1Transport, self).fit(Xs, ys, Xt, yt)
self.coupling_ = sinkhorn_lpl1_mm(
a=self.mu_s, labels_a=ys, b=self.mu_t, M=self.cost_,
reg=self.reg_e, eta=self.reg_cl, numItermax=self.max_iter,
numInnerItermax=self.max_inner_iter, stopInnerThr=self.tol,
verbose=self.verbose)
return self
else:
print("POT-Warning")print("Please provide both Xs, Xt, ys arguments to fit method")
class SinkhornL1l2Transport(BaseTransport):
Domain Adapatation OT method based on sinkhorn algorithm +
After Change
// check the necessary inputs parameters are here
if check_params(Xs=Xs, Xt=Xt, ys=ys):
super(SinkhornLpl1Transport, self).fit(Xs, ys, Xt, yt)