r"""Transports target samples :math:`\mathbf{X_t}` onto source samples :math:`\mathbf{X_s}` Parameters ---------- Xs : array-like, shape (n_source_samples, n_features) The training input samples. ys : array-like, shape (n_source_samples,) The
(self, Xs=None, ys=None, Xt=None, yt=None, batch_size=128)
| 1007 | return transp_Xs |
| 1008 | |
| 1009 | def inverse_transform(self, Xs=None, ys=None, Xt=None, yt=None, batch_size=128): |
| 1010 | r"""Transports target samples :math:`\mathbf{X_t}` onto source samples :math:`\mathbf{X_s}` |
| 1011 | |
| 1012 | Parameters |
| 1013 | ---------- |
| 1014 | Xs : array-like, shape (n_source_samples, n_features) |
| 1015 | The training input samples. |
| 1016 | ys : array-like, shape (n_source_samples,) |
| 1017 | The class labels |
| 1018 | Xt : array-like, shape (n_target_samples, n_features) |
| 1019 | The training input samples. |
| 1020 | yt : array-like, shape (n_target_samples,) |
| 1021 | The class labels. If some target samples are unlabelled, fill the |
| 1022 | :math:`\mathbf{y_t}`'s elements with -1. |
| 1023 | |
| 1024 | Warning: Note that, due to this convention -1 cannot be used as a |
| 1025 | class label |
| 1026 | batch_size : int, optional (default=128) |
| 1027 | The batch size for out of sample inverse transform |
| 1028 | |
| 1029 | Returns |
| 1030 | ------- |
| 1031 | transp_Xt : array-like, shape (n_source_samples, n_features) |
| 1032 | The transported target samples. |
| 1033 | """ |
| 1034 | nx = self.nx |
| 1035 | |
| 1036 | # check the necessary inputs parameters are here |
| 1037 | if check_params(Xt=Xt): |
| 1038 | transp_Xt = nx.dot(Xt, self.A1_) + self.B1_ |
| 1039 | |
| 1040 | return transp_Xt |
| 1041 | |
| 1042 | |
| 1043 | class LinearGWTransport(LinearTransport): |