File tree Expand file tree Collapse file tree 1 file changed +8
-3
lines changed Expand file tree Collapse file tree 1 file changed +8
-3
lines changed Original file line number Diff line number Diff line change 3232Xs , ys = ot .datasets .get_data_classif ('3gauss' , n_samples_source )
3333Xt , yt = ot .datasets .get_data_classif ('3gauss2' , n_samples_target )
3434
35- # Cost matrix
36- M = ot .dist (Xs , Xt , metric = 'sqeuclidean' )
37-
3835
3936##############################################################################
4037# Transport source samples onto target samples
5552# of class A onto a target sample of class B != A is set to infinite, or a
5653# very large value
5754
55+ # note that in the present case we consider that all the target samples are
56+ # labeled. For daily applications, some target sample might not have labels,
57+ # in this case the element of yt corresponding to these samples should be
58+ # filled with -1.
59+
60+ # Warning: we recall that -1 cannot be used as a class label
61+
5862
5963##############################################################################
6064# Fig 1 : plots source and target samples + matrix of pairwise distance
9296# the optimal coupling in the semi-supervised DA case will exhibit " shape
9397# similar" to the cost matrix, (block diagonal matrix)
9498
99+
95100##############################################################################
96101# Fig 2 : plots optimal couplings for the different methods
97102##############################################################################
You can’t perform that action at this time.
0 commit comments