├── data ├── Sensor_Sim_AB.csv ├── Sensor_Sim_AC.csv ├── Sensor_Sim_BC.csv ├── A.csv ├── C.csv └── B.csv ├── README.md ├── MyJDA.m ├── tca.py ├── tools.py ├── HJDA.ipynb └── HTCA.ipynb /data/Sensor_Sim_AB.csv: -------------------------------------------------------------------------------- 1 | 0.34 0.94 0.76 0.32 0.29 0.76 0.19 0.22 0.22 0.74 0.94 0.22 0.22 0.35 0.34 0.35 0.34 0.29 0.24 0.94 1 0.73 2 | 0.75 0.35 0.35 0.68 0.19 0.35 0.22 0.22 0.22 0.36 0.35 0.22 0.22 0.92 0.35 0.92 0.35 0.19 0.28 0.35 0.35 0.36 3 | 0.51 0.32 0.32 0.92 0.3 0.32 0.2 0.2 0.2 0.33 0.32 0.2 0.2 0.68 0.32 0.68 0.32 0.3 0.25 0.32 0.32 0.33 4 | 0.39 0.73 0.73 0.32 0.33 0.73 0.23 0.26 0.26 0.94 0.73 0.26 0.26 0.35 0.39 0.35 0.39 0.33 0.28 0.73 0.73 0.77 5 | 0.34 1 0.76 0.32 0.29 0.76 0.19 0.22 0.22 0.74 0.94 0.22 0.22 0.35 0.34 0.35 0.34 0.29 0.24 0.94 0.94 0.73 6 | 0.34 0.76 0.94 0.32 0.29 1 0.19 0.28 0.28 0.74 0.76 0.28 0.28 0.35 0.41 0.35 0.41 0.29 0.24 0.76 0.76 0.73 7 | 0.36 0.29 0.29 0.3 1 0.29 0.36 0.21 0.21 0.33 0.29 0.21 0.21 0.18 0.58 0.18 0.58 0.69 0.38 0.29 0.29 0.48 8 | 0.34 0.91 0.76 0.32 0.29 0.76 0.19 0.22 0.22 0.74 0.91 0.22 0.22 0.35 0.34 0.35 0.34 0.29 0.24 0.91 0.91 0.73 9 | 0.51 0.32 0.32 1 0.3 0.32 0.2 0.2 0.2 0.37 0.32 0.2 0.2 0.67 0.32 0.67 0.32 0.3 0.29 0.32 0.32 0.32 10 | 0.34 0.94 0.76 0.32 0.29 0.76 0.19 0.22 0.22 0.74 0.94 0.22 0.22 0.35 0.34 0.35 0.34 0.29 0.24 0.94 0.94 0.73 11 | 0.34 0.76 0.94 0.32 0.29 0.94 0.19 0.28 0.28 0.74 0.76 0.28 0.28 0.35 0.41 0.35 0.41 0.29 0.24 0.76 0.76 0.73 12 | 0.27 0.41 0.26 0.24 0.21 0.26 0.27 0.3 0.3 0.24 0.41 0.3 0.3 0.27 0.26 0.27 0.26 0.21 0.74 0.41 0.41 0.23 13 | 0.34 0.76 1 0.32 0.29 0.94 0.19 0.28 0.28 0.74 0.76 0.28 0.28 0.35 0.41 0.35 0.41 0.29 0.24 0.76 0.76 0.73 14 | 0.47 0.19 0.19 0.2 0.36 0.19 1 0.77 0.77 0.24 0.19 0.77 0.77 0.22 0.23 0.22 0.23 0.44 0.43 0.19 0.19 0.46 -------------------------------------------------------------------------------- /data/Sensor_Sim_AC.csv: -------------------------------------------------------------------------------- 1 | 0.74 0.35 0.22 0.32 0.22 0.74 0.76 0.32 0.32 0.35 0.73 0.29 0.19 0.93 0.22 0.34 0.93 0.32 0.32 0.35 0.74 0.76 1 2 | 0.36 0.92 0.22 0.68 0.22 0.36 0.35 0.18 0.68 0.92 0.36 0.19 0.22 0.35 0.22 0.35 0.35 0.68 0.68 0.92 0.36 0.35 0.35 3 | 0.33 0.68 0.2 0.92 0.2 0.33 0.32 0.3 0.92 0.68 0.33 0.3 0.2 0.32 0.2 0.32 0.32 0.92 0.92 0.68 0.33 0.32 0.32 4 | 0.82 0.35 0.26 0.32 0.26 0.94 0.73 0.36 0.32 0.35 1 0.33 0.23 0.73 0.26 0.39 0.73 0.32 0.32 0.35 0.94 0.73 0.73 5 | 0.73 0.35 0.19 0.32 0.19 0.73 0.76 0.28 0.32 0.35 0.73 0.29 0.19 1 0.19 0.31 0.95 0.32 0.32 0.35 0.73 0.76 0.93 6 | 0.74 0.35 0.28 0.32 0.28 0.74 1 0.38 0.32 0.35 0.73 0.29 0.19 0.76 0.28 0.41 0.76 0.32 0.32 0.35 0.74 0.94 0.76 7 | 0.33 0.18 0.21 0.3 0.21 0.33 0.29 0.77 0.3 0.18 0.33 1 0.36 0.29 0.21 0.58 0.29 0.3 0.3 0.18 0.33 0.29 0.29 8 | 0.74 0.35 0.22 0.32 0.22 0.74 0.76 0.32 0.32 0.35 0.73 0.29 0.19 0.9 0.22 0.34 0.9 0.32 0.32 0.35 0.74 0.76 0.91 9 | 0.37 0.67 0.2 1 0.2 0.37 0.32 0.29 1 0.67 0.32 0.3 0.2 0.32 0.2 0.32 0.32 1 1 0.67 0.37 0.32 0.32 10 | 0.73 0.35 0.19 0.32 0.19 0.73 0.76 0.28 0.32 0.35 0.73 0.29 0.19 0.95 0.19 0.31 1 0.32 0.32 0.35 0.73 0.76 0.93 11 | 0.74 0.35 0.28 0.32 0.28 0.74 0.94 0.38 0.32 0.35 0.73 0.29 0.19 0.76 0.28 0.41 0.76 0.32 0.32 0.35 0.74 1 0.76 12 | 0.24 0.27 0.3 0.24 0.3 0.24 0.26 0.24 0.24 0.27 0.23 0.21 0.27 0.4 0.3 0.26 0.4 0.24 0.24 0.27 0.24 0.26 0.41 13 | 0.74 0.35 0.28 0.32 0.28 0.74 0.94 0.38 0.32 0.35 0.73 0.29 0.19 0.76 0.28 0.41 0.76 0.32 0.32 0.35 0.74 0.94 0.76 14 | 0.24 0.22 0.77 0.2 0.77 0.24 0.19 0.21 0.2 0.22 0.23 0.36 1 0.19 0.77 0.23 0.19 0.2 0.2 0.22 0.24 0.19 0.19 -------------------------------------------------------------------------------- /data/Sensor_Sim_BC.csv: -------------------------------------------------------------------------------- 1 | 0.39 0.74 0.25 0.51 0.25 0.39 0.34 0.21 0.51 0.74 0.39 0.36 0.47 0.34 0.25 0.38 0.34 0.51 0.51 0.74 0.39 0.34 0.34 2 | 0.73 0.35 0.19 0.32 0.19 0.73 0.76 0.28 0.32 0.35 0.73 0.29 0.19 1 0.19 0.31 0.95 0.32 0.32 0.35 0.73 0.76 0.93 3 | 0.74 0.35 0.28 0.32 0.28 0.74 0.94 0.38 0.32 0.35 0.73 0.29 0.19 0.76 0.28 0.41 0.76 0.32 0.32 0.35 0.74 0.94 0.76 4 | 0.37 0.67 0.2 1 0.2 0.37 0.32 0.29 1 0.67 0.32 0.3 0.2 0.32 0.2 0.32 0.32 1 1 0.67 0.37 0.32 0.32 5 | 0.33 0.18 0.21 0.3 0.21 0.33 0.29 0.77 0.3 0.18 0.33 1 0.36 0.29 0.21 0.58 0.29 0.3 0.3 0.18 0.33 0.29 0.29 6 | 0.74 0.35 0.28 0.32 0.28 0.74 1 0.38 0.32 0.35 0.73 0.29 0.19 0.76 0.28 0.41 0.76 0.32 0.32 0.35 0.74 0.94 0.76 7 | 0.24 0.22 0.77 0.2 0.77 0.24 0.19 0.21 0.2 0.22 0.23 0.36 1 0.19 0.77 0.23 0.19 0.2 0.2 0.22 0.24 0.19 0.19 8 | 0.19 0.21 0.93 0.2 1 0.19 0.28 0.34 0.2 0.21 0.26 0.21 0.77 0.19 1 0.36 0.19 0.2 0.2 0.21 0.19 0.28 0.22 9 | 0.19 0.21 0.93 0.2 1 0.19 0.28 0.34 0.2 0.21 0.26 0.21 0.77 0.19 1 0.36 0.19 0.2 0.2 0.21 0.19 0.28 0.22 10 | 0.83 0.4 0.19 0.37 0.19 1 0.74 0.29 0.37 0.4 0.94 0.33 0.24 0.73 0.19 0.32 0.73 0.37 0.37 0.4 1 0.74 0.74 11 | 0.74 0.35 0.22 0.32 0.22 0.74 0.76 0.32 0.32 0.35 0.73 0.29 0.19 0.93 0.22 0.34 0.93 0.32 0.32 0.35 0.74 0.76 0.94 12 | 0.19 0.21 0.93 0.2 1 0.19 0.28 0.34 0.2 0.21 0.26 0.21 0.77 0.19 1 0.36 0.19 0.2 0.2 0.21 0.19 0.28 0.22 13 | 0.19 0.21 1 0.2 0.93 0.19 0.28 0.34 0.2 0.21 0.26 0.21 0.77 0.19 0.93 0.36 0.19 0.2 0.2 0.21 0.19 0.28 0.22 14 | 0.4 1 0.21 0.67 0.21 0.4 0.35 0.18 0.67 0.9 0.35 0.18 0.22 0.35 0.21 0.35 0.35 0.67 0.67 0.9 0.4 0.35 0.35 15 | 0.32 0.35 0.36 0.32 0.36 0.32 0.41 0.74 0.32 0.35 0.39 0.58 0.23 0.31 0.36 1 0.31 0.32 0.32 0.35 0.32 0.41 0.34 16 | 0.4 0.9 0.21 0.67 0.21 0.4 0.35 0.18 0.67 0.9 0.35 0.18 0.22 0.35 0.21 0.35 0.35 0.67 0.67 0.9 0.4 0.35 0.35 17 | 0.32 0.35 0.36 0.32 0.36 0.32 0.41 0.74 0.32 0.35 0.39 0.58 0.23 0.31 0.36 1 0.31 0.32 0.32 0.35 0.32 0.41 0.34 18 | 0.33 0.18 0.21 0.3 0.21 0.33 0.29 0.54 0.3 0.18 0.33 0.69 0.44 0.29 0.21 0.58 0.29 0.3 0.3 0.18 0.33 0.29 0.29 19 | 0.29 0.33 0.27 0.29 0.27 0.29 0.24 0.21 0.29 0.33 0.28 0.38 0.43 0.23 0.27 0.24 0.23 0.29 0.29 0.33 0.29 0.24 0.24 20 | 0.74 0.35 0.22 0.32 0.22 0.74 0.76 0.32 0.32 0.35 0.73 0.29 0.19 0.93 0.22 0.34 0.93 0.32 0.32 0.35 0.74 0.76 0.94 21 | 0.74 0.35 0.22 0.32 0.22 0.74 0.76 0.32 0.32 0.35 0.73 0.29 0.19 0.93 0.22 0.34 0.93 0.32 0.32 0.35 0.74 0.76 1 22 | 0.78 0.35 0.23 0.32 0.23 0.78 0.73 0.33 0.32 0.35 0.77 0.55 0.38 0.73 0.23 0.35 0.73 0.32 0.32 0.35 0.78 0.73 0.73 -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # HierarchicalTransferLearning 2 | Hierarchical Transfer Component Analysis and Hierarchical Joint Domain Adaption are implemented in this repository. The code is written in Python with Jupyter Notebook. The other functions used contains the *tca.py* and *MyJDA.m*. 3 | 4 | # Datasets 5 | The datasets used in this dissertation is available in the data folder. The data from House A, B, and C are provided in the form of '.csv'. And the similarity matrix used is also provided in the form of '.csv', and named as 'Sensor_sim_XX'. 6 | 7 | # HTCA and HJDA 8 | These two files are written by Mengyuan Su individually, in each file a function called *runhtca()* or *runhjda()* is provided respectively. 9 | 10 | The input contains: 11 | - x_src: the data from the source domain 12 | - y_src: the labels of the source domain 13 | - x_tar: the data from the target domain 14 | - y_tar: the true labels of the target domain (This is only used for calculating the accuracy and not being used during the HTCA or HJDA procedure.) 15 | - options: the options for each method. The demo of how to define the options is shown in the code. 16 | 17 | The output contains: 18 | - acc_can: the accuracy of candidates 19 | - acc_res: the accuracy of residuals 20 | - acc_stl: the overall accuracy 21 | 22 | To run HTCA, packages numpy, pandas, sklearn, and random need to be installed. And tca.py and tools.py should be imported. 23 | 24 | To tun HJDA, scipy is further required to save and read '.mat' data. And MATLAB engine for Python is required as well. 25 | 26 | # Tools 27 | *tools.py* is written by Mengyuan Su for calling the functions that are used both in HJDA and HTCA. 28 | 29 | It contains: 30 | - Model: this is a class for saving the information of basic classifiers. The model in sklearn packages, model name, and both source domain and target domain is required to initialize a new Model. It will fit the classifier with the source domain and predict on both source and target domain. 31 | - Models: this is also a class for comparing the performance of classifiers according to accuracy. It has several functions: *add()*, to add a new Model in the Models. *show_src()*, shows the classification accuracy of the multiple classifiers on source data while *show_tar()* shows the classification accuracy of the multiple classifiers on target data. All the classes that the prediction contains and corresponding counts are also shown together with the result. Moreover, *sort_src()* and *sort_tar()* will sort the classifiers according to their classification accuracy on the source and target data and show the result. 32 | - remove_files(): is a function for removing the '.mat' documents generated during the JDA procedure. As the data form from *numpy* in Python and the data form from MATLAB are different, the data should be changed to the form of '.mat' and then passed to the MATLAB engine. 33 | - getdata():is a function require the *x_src*, *y_src*, *x_tar*, *y_tar* as input. User need to define the argument of *balance=True* or *z_score=True* to pre-process the data. The *x_src*, *y_src*, *x_tar*, *y_tar* that have been balanced or standardized is returned. 34 | - voting(): is a function used during HTCA and HTJA to do the majority voting part. 35 | -------------------------------------------------------------------------------- /MyJDA.m: -------------------------------------------------------------------------------- 1 | function [out] = MyJDA(X_src,Y_src,X_tar,options) 2 | % This is the implementation of Joint Distribution Adaptation. 3 | % Reference: Mingsheng Long et al. Transfer feature learning with joint distribution adaptation. ICCV 2013. 4 | % Original Author: Jindong Wang 5 | % Modified by: Mengyuan Su 6 | 7 | 8 | % Inputs: 9 | %%% X_src : source feature matrix, ns * n_feature 10 | %%% Y_src : source label vector, ns * 1 11 | %%% X_tar : target feature matrix, nt * n_feature 12 | %%% Y_tar : target label vector, nt * 1 13 | %%% options : option struct 14 | %%%%% lambda : regularization parameter 15 | %%%%% dim : dimension after adaptation, dim <= n_feature 16 | %%%%% kernel_tpye : kernel name, choose from 'primal' | 'linear' | 'rbf' 17 | %%%%% gamma : bandwidth for rbf kernel, can be missed for other kernels 18 | %%%%% T : n_iterations, T >= 1. T <= 10 is suffice 19 | 20 | % Outputs: 21 | %%% acc : final accuracy using knn, float 22 | %%% acc_ite : list of all accuracies during iterations 23 | %%% A : final adaptation matrix, (ns + nt) * (ns + nt) 24 | 25 | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% 26 | 27 | %% Set options 28 | lambda = options.lambda; 29 | dim = options.dim; 30 | kernel_type = options.kernel_type; 31 | gamma = options.gamma; 32 | T = options.T; 33 | 34 | acc_ite = []; 35 | Y_tar_pseudo = []; 36 | %% Iteration 37 | for i = 1 : T 38 | [Z,A] = JDA_core(X_src,Y_src,X_tar,Y_tar_pseudo,options); 39 | %normalization for better classification performance 40 | Z = Z*diag(sparse(1./sqrt(sum(Z.^2)))); 41 | Zs = Z(:,1:size(X_src,1)); 42 | Zt = Z(:,size(X_src,1)+1:end); 43 | out = Z'; 44 | 45 | knn_model = fitcknn(abs(Zs'),Y_src,'NumNeighbors',1); 46 | Y_tar_pseudo = knn_model.predict(real(Zt')); 47 | end 48 | 49 | end 50 | 51 | function [Z,A] = JDA_core(X_src,Y_src,X_tar,Y_tar_pseudo,options) 52 | %% Set options 53 | lambda = options.lambda; %% lambda for the regularization 54 | dim = options.dim; %% dim is the dimension after adaptation, dim <= m 55 | kernel_type = options.kernel_type; %% kernel_type is the kernel name, primal|linear|rbf 56 | gamma = options.gamma; %% gamma is the bandwidth of rbf kernel 57 | 58 | %% Construct MMD matrix 59 | X = [X_src',X_tar']; 60 | X = X*diag(sparse(1./sqrt(sum(X.^2)))); 61 | [m,n] = size(X); 62 | ns = size(X_src,1); 63 | nt = size(X_tar,1); 64 | e = [1/ns*ones(ns,1);-1/nt*ones(nt,1)]; 65 | C = length(unique(Y_src)); 66 | 67 | %%% M0 68 | M = e * e' * C; %multiply C for better normalization 69 | 70 | %%% Mc 71 | N = 0; 72 | if ~isempty(Y_tar_pseudo) && length(Y_tar_pseudo)==nt 73 | for c = reshape(unique(Y_src),1,C) 74 | e = zeros(n,1); 75 | e(Y_src==c) = 1 / length(find(Y_src==c)); 76 | e(ns+find(Y_tar_pseudo==c)) = -1 / length(find(Y_tar_pseudo==c)); 77 | e(isinf(e)) = 0; 78 | N = N + e*e'; 79 | end 80 | end 81 | 82 | M = M + N; 83 | M = M / norm(M,'fro'); 84 | 85 | %% Centering matrix H 86 | H = eye(n) - 1/n * ones(n,n); 87 | 88 | %% Calculation 89 | if strcmp(kernel_type,'primal') 90 | [A,~] = eigs(X*M*X'+lambda*eye(m),X*H*X',dim,'SM'); 91 | Z = A'*X; 92 | else 93 | K = kernel_jda(kernel_type,X,[],gamma); 94 | [A,~] = eigs(K*M*K'+lambda*eye(n),K*H*K',dim,'SM'); 95 | Z = A'*K; 96 | end 97 | 98 | end 99 | 100 | % With Fast Computation of the RBF kernel matrix 101 | % To speed up the computation, we exploit a decomposition of the Euclidean distance (norm) 102 | % 103 | % Inputs: 104 | % ker: 'linear','rbf','sam' 105 | % X: data matrix (features * samples) 106 | % gamma: bandwidth of the RBF/SAM kernel 107 | % Output: 108 | % K: kernel matrix 109 | % 110 | % Gustavo Camps-Valls 111 | % 2006(c) 112 | % Jordi (jordi@uv.es), 2007 113 | % 2007-11: if/then -> switch, and fixed RBF kernel 114 | % Modified by Mingsheng Long 115 | % 2013(c) 116 | % Mingsheng Long (longmingsheng@gmail.com), 2013 117 | 118 | function K = kernel_jda(ker,X,X2,gamma) 119 | 120 | switch ker 121 | case 'linear' 122 | 123 | if isempty(X2) 124 | K = X'*X; 125 | else 126 | K = X'*X2; 127 | end 128 | 129 | case 'rbf' 130 | 131 | n1sq = sum(X.^2,1); 132 | n1 = size(X,2); 133 | 134 | if isempty(X2) 135 | D = (ones(n1,1)*n1sq)' + ones(n1,1)*n1sq -2*X'*X; 136 | else 137 | n2sq = sum(X2.^2,1); 138 | n2 = size(X2,2); 139 | D = (ones(n2,1)*n1sq)' + ones(n1,1)*n2sq -2*X'*X2; 140 | end 141 | K = exp(-gamma*D); 142 | 143 | case 'sam' 144 | 145 | if isempty(X2) 146 | D = X'*X; 147 | else 148 | D = X'*X2; 149 | end 150 | K = exp(-gamma*acos(D).^2); 151 | 152 | otherwise 153 | error(['Unsupported kernel ' ker]) 154 | end 155 | end -------------------------------------------------------------------------------- /tca.py: -------------------------------------------------------------------------------- 1 | 2 | # coding: utf-8 3 | 4 | # In[2]: 5 | 6 | 7 | # encoding=utf-8 8 | """ 9 | Created on 14:52 2017/4/30 10 | Original author: Jindong Wang 11 | Modified by: Mengyuan Su 12 | 13 | """ 14 | 15 | import numpy as np 16 | import scipy 17 | from scipy.sparse.linalg import eigs 18 | 19 | 20 | class TCA: 21 | dim = 5 22 | kerneltype = 'rbf' 23 | kernelparam = 1 24 | mu = 1 25 | 26 | def __init__(self, dim=5, kerneltype='rbf', kernelparam=1, mu=1): 27 | ''' 28 | Init function 29 | :param dim: dims after tca (dim <= d) 30 | :param kerneltype: 'rbf' | 'linear' | 'poly' (default is 'rbf') 31 | :param kernelparam: kernel param 32 | :param mu: param 33 | ''' 34 | self.dim = dim 35 | self.kernelparam = kernelparam 36 | self.kerneltype = kerneltype 37 | self.mu = mu 38 | 39 | def get_L(self, n_src, n_tar): 40 | ''' 41 | Get index matrix 42 | :param n_src: num of source domain 43 | :param n_tar: num of target domain 44 | :return: index matrix L 45 | ''' 46 | L_ss = (1. / (n_src * n_src)) * np.full((n_src, n_src), 1) 47 | L_st = (-1. / (n_src * n_tar)) * np.full((n_src, n_tar), 1) 48 | L_ts = (-1. / (n_tar * n_src)) * np.full((n_tar, n_src), 1) 49 | L_tt = (1. / (n_tar * n_tar)) * np.full((n_tar, n_tar), 1) 50 | L_up = np.hstack((L_ss, L_st)) 51 | L_down = np.hstack((L_ts, L_tt)) 52 | L = np.vstack((L_up, L_down)) 53 | return L 54 | 55 | def get_kernel(self, kerneltype, kernelparam, x1, x2=None): 56 | ''' 57 | Calculate kernel for TCA (inline func) 58 | :param kerneltype: 'rbf' | 'linear' | 'poly' 59 | :param kernelparam: param 60 | :param x1: x1 matrix (n1,d) 61 | :param x2: x2 matrix (n2,d) 62 | :return: Kernel K 63 | ''' 64 | n1, dim = x1.shape 65 | K = None 66 | if x2 is not None: 67 | n2 = x2.shape[0] 68 | if kerneltype == 'linear': 69 | if x2 is not None: 70 | K = np.dot(x2, x1.T) 71 | else: 72 | K = np.dot(x1, x1.T) 73 | elif kerneltype == 'poly': 74 | if x2 is not None: 75 | K = np.power(np.dot(x1, x2.T), kernelparam) 76 | else: 77 | K = np.power(np.dot(x1, x1.T), kernelparam) 78 | elif kerneltype == 'rbf': 79 | if x2 is not None: 80 | sum_x2 = np.sum(np.multiply(x2, x2), axis=1) 81 | sum_x2 = sum_x2.reshape((len(sum_x2), 1)) 82 | K = np.exp(-1 * ( 83 | np.tile(np.sum(np.multiply(x1, x1), axis=1).T, (n2, 1)) + np.tile(sum_x2, (1, n1)) - 2 * np.dot(x2, 84 | x1.T)) / ( 85 | dim * 2 * kernelparam)) 86 | else: 87 | P = np.sum(np.multiply(x1, x1), axis=1) 88 | P = P.reshape((len(P), 1)) 89 | K = np.exp( 90 | -1 * (np.tile(P.T, (n1, 1)) + np.tile(P, (1, n1)) - 2 * np.dot(x1, x1.T)) / (dim * 2 * kernelparam)) 91 | # more kernels can be added 92 | return K 93 | 94 | def fit_transform(self, x_src, x_tar, x_tar_o=None): 95 | ''' 96 | TCA main method. Wrapped from Sinno J. Pan and Qiang Yang's "Domain adaptation via transfer component ayalysis. IEEE TNN 2011" 97 | :param x_src: Source domain data feature matrix. Shape is (n_src,d) 98 | :param x_tar: Target domain data feature matrix. Shape is (n_tar,d) 99 | :param x_tar_o: Out-of-sample target data feature matrix. Shape is (n_tar_o,d) 100 | :return: tranformed x_src_tca,x_tar_tca,x_tar_o_tca 101 | ''' 102 | n_src = x_src.shape[0] 103 | n_tar = x_tar.shape[0] 104 | X = np.vstack((x_src, x_tar)) 105 | L = self.get_L(n_src, n_tar) 106 | L[np.isnan(L)] = 0 #nan->0 107 | K = self.get_kernel(self.kerneltype, self.kernelparam, X) 108 | K[np.isnan(K)] = 0 #nan->0 109 | if x_tar_o is not None: 110 | K_tar_o = self.get_kernel(self.kerneltype, self.kernelparam, X, x_tar_o) 111 | H = np.identity(n_src + n_tar) - 1. / (n_src + n_tar) * np.ones(shape=(n_src + n_tar, 1)) * np.ones( 112 | shape=(n_src + n_tar, 1)).T 113 | forPinv = self.mu * np.identity(n_src + n_tar) + np.dot(np.dot(K, L), K) 114 | forPinv[np.isnan(forPinv)] = 0 115 | Kc = np.dot(np.dot(np.dot(np.linalg.pinv(forPinv), K), H), K)#pinv 广义逆矩阵 pseudo-inverse of a matrix 116 | Kc[np.isnan(Kc)] = 0 117 | 118 | D, V = np.linalg.eig(Kc) 119 | #D, V = eigs(Kc) # 求特征值 D 特征值eigenvalues V 特征向量normalized (unit “length”) eigenvectors 120 | #原本是numpy.linalg.eig 改成了scipy.sparse.linalg.eigs 121 | eig_values = D.reshape(len(D), 1) 122 | eig_values_sorted = np.sort(eig_values[::-1], axis=0) 123 | index_sorted = np.argsort(-eig_values, axis=0) 124 | V = V[:, index_sorted] 125 | V = V.reshape((V.shape[0], V.shape[1])) 126 | x_src_tca = np.dot(K[:n_src, :], V) 127 | x_tar_tca = np.dot(K[n_src:, :], V) 128 | 129 | if x_tar_o is not None: 130 | x_tar_o_tca = np.dot(K_tar_o, V) 131 | else: 132 | x_tar_o_tca = None 133 | 134 | x_src_tca = np.asarray(x_src_tca[:, :self.dim], dtype=float) 135 | x_tar_tca = np.asarray(x_tar_tca[:, :self.dim], dtype=float) 136 | if x_tar_o is not None: 137 | x_tar_o_tca = x_tar_o_tca[:, :self.dim] 138 | return x_src_tca, x_tar_tca, x_tar_o_tca 139 | 140 | 141 | 142 | -------------------------------------------------------------------------------- /tools.py: -------------------------------------------------------------------------------- 1 | import numpy as np 2 | import sklearn 3 | from sklearn.metrics import accuracy_score 4 | from sklearn import preprocessing 5 | from imblearn.over_sampling import SMOTE 6 | import glob 7 | import os 8 | 9 | # delete the data generated suring the procedure 10 | def files(ext = '*.mat'): 11 | for i in glob.glob(os.path.join(ext)): 12 | yield i 13 | def remove_files(show = False): 14 | for i in files(): 15 | if show: 16 | print(i) 17 | os.remove(i) 18 | # models for comparing classifers 19 | class Model: 20 | def __init__(self,model,name,x_src,y_src,x_tar,y_tar): 21 | self.x_src = x_src 22 | self.y_src = y_src 23 | self.x_tar = x_tar 24 | self.y_tar = y_tar 25 | self.model = model.fit(x_src,y_src) 26 | self.name = name 27 | self.predict_label_src = model.predict(self.x_src) 28 | self.predict_label_tar = model.predict(self.x_tar) 29 | self.acc_src = sklearn.metrics.accuracy_score(self.y_src, self.predict_label_src) 30 | self.acc_tar = sklearn.metrics.accuracy_score(self.y_tar, self.predict_label_tar) 31 | # self.predict_label_src_proba = model.predict_proba(self.x_src) 32 | # self.predict_label_tar_proba = model.predict_proba(self.x_tar) 33 | 34 | class Models: 35 | def __init__(self,x_src,y_src,x_tar,y_tar): 36 | self.x_src = x_src 37 | self.y_src = y_src 38 | self.x_tar = x_tar 39 | self.y_tar = y_tar 40 | self.model = [] 41 | 42 | def add(self,model,name): 43 | if (model in self.model): 44 | print("This model already exist!") 45 | else: 46 | self.model.append(Model(model,name,self.x_src,self.y_src,self.x_tar,self.y_tar)) 47 | 48 | def show_src(self): 49 | print("Prediction on Source:\n", 50 | "%-8s"%("Model"), 51 | "%-18s"%("ACC"), 52 | "%-25s"%("Predicted class"), 53 | "%-25s"%("Numbers")) 54 | for i in range(len(self.model)): 55 | print("%-8s"%self.model[i].name, 56 | "%-10.5f"%self.model[i].acc_src, 57 | "%-25s"%np.unique(self.model[i].predict_label_src.reshape((-1,1)),return_counts=True)[0], 58 | "%-25s"%np.unique(self.model[i].predict_label_src.reshape((-1,1)),return_counts=True)[1]) 59 | print() 60 | 61 | def show_tar(self): 62 | print("Prediction on Target:\n", 63 | "%-8s"%("Model"), 64 | "%-18s"%("ACC"), 65 | "%-25s"%("Predicted class"), 66 | "%-25s"%("Numbers")) 67 | for i in range(len(self.model)): 68 | print("%-8s"%self.model[i].name, 69 | "%-10.5f"%self.model[i].acc_tar, 70 | "%-25s"%np.unique(self.model[i].predict_label_tar.reshape((-1,1)),return_counts=True)[0], 71 | "%-25s"%np.unique(self.model[i].predict_label_tar.reshape((-1,1)),return_counts=True)[1]) 72 | print() 73 | 74 | def sort_tar(self,show=True): 75 | self.model.sort(key = lambda x:x.acc_tar, reverse=True) 76 | if (show == True): 77 | print("Prediction on Target:\n", 78 | "%-8s"%("Model"), 79 | "%-18s"%("ACC"), 80 | "%-25s"%("Predicted class"), 81 | "%-25s"%("Numbers")) 82 | for i in range(len(self.model)): 83 | print("%-8s"%self.model[i].name, 84 | "%-10.5f"%self.model[i].acc_tar, 85 | "%-25s"%np.unique(self.model[i].predict_label_tar.reshape((-1,1)),return_counts=True)[0], 86 | "%-25s"%np.unique(self.model[i].predict_label_tar.reshape((-1,1)),return_counts=True)[1]) 87 | print() 88 | 89 | def sort_src(self,show=True): 90 | self.model.sort(key = lambda x:x.acc_src, reverse=True) 91 | if (show == True): 92 | print("Prediction on Source:\n", 93 | "%-8s"%("Model"), 94 | "%-18s"%("ACC"), 95 | "%-25s"%("Predicted class"), 96 | "%-25s"%("Numbers")) 97 | for i in range(len(self.model)): 98 | print("%-8s"%self.model[i].name, 99 | "%-10.5f"%self.model[i].acc_src, 100 | "%-25s"%np.unique(self.model[i].predict_label_src.reshape((-1,1)),return_counts=True)[0], 101 | "%-25s"%np.unique(self.model[i].predict_label_src.reshape((-1,1)),return_counts=True)[1]) 102 | print() 103 | 104 | # get the source and target data, balance the source data if 'balance' equal to True 105 | def getdata(x_src, y_src, x_tar, y_tar, balance=False, z_score=False, test_size=0): 106 | if (balance == True): 107 | sm = SMOTE(random_state=42) 108 | x_src, y_src = sm.fit_sample(x_src, y_src) 109 | y_src = y_src.reshape((-1,1)) 110 | if (test_size != 0): 111 | x_tar_train, x_tar_test, y_tar_train, y_tar_test = train_test_split(x_tar, y_tar, test_size=test_size) 112 | if (z_score == True): 113 | if (test_size != 0): 114 | scaler_src = preprocessing.StandardScaler().fit(x_src) 115 | scaler_tar = preprocessing.StandardScaler().fit(x_tar) 116 | x_src = scaler_src.transform(x_src) 117 | x_tar_train = scaler_tar.transform(x_tar_train) 118 | x_tar_test = scaler_tar.transform(x_tar_test) 119 | return x_src, y_src, x_tar_train, y_tar_train, x_tar_test, y_tar_test 120 | else: 121 | scaler_src = preprocessing.StandardScaler().fit(x_src) 122 | scaler_tar = preprocessing.StandardScaler().fit(x_tar) 123 | x_src = scaler_src.transform(x_src) 124 | x_tar = scaler_tar.transform(x_tar) 125 | return x_src, y_src, x_tar, y_tar 126 | else: 127 | if (test_size != 0): 128 | return x_src, y_src, x_tar_train, y_tar_train, x_tar_test, y_tar_test 129 | else: 130 | return x_src, y_src, x_tar, y_tar 131 | 132 | # voting 133 | def voting(shape,a,b,c): 134 | label = np.empty(shape) 135 | for i in range(shape): 136 | if a.predict_label_tar[i] == b.predict_label_tar[i]: 137 | label[i] = a.predict_label_tar[i] 138 | elif a.predict_label_tar[i] == c.predict_label_tar[i]: 139 | label[i] = a.predict_label_tar[i] 140 | elif b.predict_label_tar[i] == c.predict_label_tar[i]: 141 | label[i] = b.predict_label_tar[i] 142 | else: 143 | label[i] = -1 144 | label = label.reshape((-1,1)) 145 | return label -------------------------------------------------------------------------------- /data/A.csv: -------------------------------------------------------------------------------- 1 | 3,0,0,0,0,0,0,0,0,0,0,0,0,0,1 2 | 3,0,0,0,0,0,0,0,0,0,0,0,0,0,1 3 | 1,0,0,0.5,0,0,0,0,0,0.5,0,0,0,0,0 4 | 4,0.2,0,0,0,0.4,0.4,0,0,0,0,0,0,0,0 5 | 4,0,0,0,0,0,0,0,0,0,0,0,0,1,0 6 | 4,1,0,0,0,0,0,0,0,0,0,0,0,0,0 7 | 4,0.5,0,0,0,0,0,0,0,0,0,0,0,0.5,0 8 | 2,0,1,0,0,0,0,0,0,0,0,0,0,0,0 9 | 2,0,1,0,0,0,0,0,0,0,0,0,0,0,0 10 | 0,0,0,0,0,0,0,1,0,0,0,0,0,0,0 11 | 0,0,0,0,0,0,0,1,0,0,0,0,0,0,0 12 | 1,0,0,0.67,0,0,0,0,0,0.33,0,0,0,0,0 13 | 6,0,0,0,0.38,0.62,0,0,0,0,0,0,0,0,0 14 | 1,0,0,1,0,0,0,0,0,0,0,0,0,0,0 15 | 1,0,0,0.5,0,0,0,0,0,0.5,0,0,0,0,0 16 | 5,0,0,0,0,0.75,0,0,0,0,0,0,0,0.25,0 17 | 5,0,0,0,0,0.5,0,0,0,0,0,0,0,0.5,0 18 | 5,0,0,0,0,0,0,0,0,0,0,0,0,1,0 19 | 5,0,0,0,0,1,0,0,0,0,0,0,0,0,0 20 | 5,0,0,0,0,0,1,0,0,0,0,0,0,0,0 21 | 5,0,0,0,0.5,0,0,0,0,0,0,0.5,0,0,0 22 | 5,0,0,0,0,0,0,0,0,0,1,0,0,0,0 23 | 5,0,0,0,0,0,0,0,0,0,1,0,0,0,0 24 | 5,0,0,0,0,1,0,0,0,0,0,0,0,0,0 25 | 5,0,0,0,0,0.5,0.5,0,0,0,0,0,0,0,0 26 | 5,1,0,0,0,0,0,0,0,0,0,0,0,0,0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,0,0,0,0,0,0,0,0,1 491 | 3,0,0,0,0,0,0,0,0,0,0,0,0,0,1 492 | 1,0,0,0.5,0,0,0,0,0,0.5,0,0,0,0,0 493 | 1,0,0,1,0,0,0,0,0,0,0,0,0,0,0 494 | 2,0,1,0,0,0,0,0,0,0,0,0,0,0,0 495 | 2,0,1,0,0,0,0,0,0,0,0,0,0,0,0 496 | 0,0,0,0,0,0,0,1,0,0,0,0,0,0,0 497 | 0,0,0,0,0,0,0,1,0,0,0,0,0,0,0 498 | 1,0,0,0.67,0,0,0,0,0,0.33,0,0,0,0,0 499 | 3,0,0,0,0,0,0,0,0,0,0,0,0,0,1 500 | 3,0,0,0,0,0,0,0,0,0,0,0,0,0,1 501 | 3,0,0,0,0,0,0,0,0,0,0,0,0,0,1 502 | 3,0,0,0,0,0,0,0,0,0,0,0,0,0,1 503 | 1,0,1,0,0,0,0,0,0,0,0,0,0,0,0 504 | 0,0,0,0,0,0,0,1,0,0,0,0,0,0,0 505 | 0,0,0,0,0,0,0,1,0,0,0,0,0,0,0 506 | -------------------------------------------------------------------------------- /HJDA.ipynb: -------------------------------------------------------------------------------- 1 | { 2 | "cells": [ 3 | { 4 | "cell_type": "code", 5 | "execution_count": 1, 6 | "metadata": {}, 7 | "outputs": [], 8 | "source": [ 9 | "import numpy as np\n", 10 | "import pandas as pd\n", 11 | "import tools\n", 12 | "import tca\n", 13 | "import sklearn\n", 14 | "import random\n", 15 | "from numpy.random import seed\n", 16 | "from sklearn.metrics import accuracy_score\n", 17 | "import warnings\n", 18 | "\n", 19 | "warnings.filterwarnings('ignore')\n", 20 | "\n", 21 | "# A = pd.read_csv(\"/cs/home/ms383/Dissertation/data/A.csv\", header=None) \n", 22 | "# B = pd.read_csv(\"/cs/home/ms383/Dissertation/data/B.csv\", header=None) \n", 23 | "# C = pd.read_csv(\"/cs/home/ms383/Dissertation/data/C.csv\", header=None) \n", 24 | "# AB_sim = pd.read_csv(\"/cs/home/ms383/Dissertation/data/Sensor_Sim_AB.csv\", header=None, sep = '\\t')\n", 25 | "# BC_sim = pd.read_csv(\"/cs/home/ms383/Dissertation/data/Sensor_Sim_BC.csv\", header=None, sep = '\\t')\n", 26 | "# AC_sim = pd.read_csv(\"/cs/home/ms383/Dissertation/data/Sensor_Sim_AC.csv\", header=None, sep = '\\t')\n", 27 | "\n", 28 | "A = pd.read_csv(\"D:/workspace/jupyter/Dissertation/data/A.csv\", header=None) \n", 29 | "B = pd.read_csv(\"D:/workspace/jupyter/Dissertation/data/B.csv\", header=None) \n", 30 | "C = pd.read_csv(\"D:/workspace/jupyter/Dissertation/data/C.csv\", header=None) \n", 31 | "AB_sim = pd.read_csv(\"D:/workspace/jupyter/Dissertation/data/Sensor_Sim_AB.csv\", header=None, sep = '\\t')\n", 32 | "BC_sim = pd.read_csv(\"D:/workspace/jupyter/Dissertation/data/Sensor_Sim_BC.csv\", header=None, sep = '\\t')\n", 33 | "AC_sim = pd.read_csv(\"D:/workspace/jupyter/Dissertation/data/Sensor_Sim_AC.csv\", header=None, sep = '\\t')\n", 34 | "\n", 35 | "x_a = np.array(A.values[:, 1:A.shape[1]])\n", 36 | "y_a = np.array(np.transpose([A.values[:, 0]]))\n", 37 | "x_b = np.array(B.values[:, 1:B.shape[1]])\n", 38 | "y_b = np.array(np.transpose([B.values[:, 0]]))\n", 39 | "x_c = np.array(C.values[:, 1:C.shape[1]])\n", 40 | "y_c = np.array(np.transpose([C.values[:, 0]]))\n", 41 | "\n", 42 | "Ab = np.dot(x_a,AB_sim)\n", 43 | "Ac = np.dot(x_a,AC_sim)\n", 44 | "Ba = np.dot(x_b,AB_sim.T)\n", 45 | "Bc = np.dot(x_b,BC_sim)\n", 46 | "Ca = np.dot(x_c,AC_sim.T)\n", 47 | "Cb = np.dot(x_c,BC_sim.T)" 48 | ] 49 | }, 50 | { 51 | "cell_type": "code", 52 | "execution_count": null, 53 | "metadata": {}, 54 | "outputs": [], 55 | "source": [ 56 | "import scipy.io as sio\n", 57 | "import matlab.engine\n", 58 | "eng = matlab.engine.start_matlab()" 59 | ] 60 | }, 61 | { 62 | "cell_type": "code", 63 | "execution_count": 16, 64 | "metadata": {}, 65 | "outputs": [], 66 | "source": [ 67 | "options = eng.struct('lambda',{1.0},\n", 68 | " 'dim',{20},\n", 69 | " 'kernel_type',{'rbf'},\n", 70 | " 'gamma',{1.0},\n", 71 | " 'T',{10})" 72 | ] 73 | }, 74 | { 75 | "cell_type": "code", 76 | "execution_count": 17, 77 | "metadata": {}, 78 | "outputs": [], 79 | "source": [ 80 | "def runhjda(x_src,y_src,x_tar,y_tar):\n", 81 | " ################################################################# prepare\n", 82 | " label_set = np.unique(y_src).astype(int)\n", 83 | "\n", 84 | " #classifiers\n", 85 | " ##KNN\n", 86 | " from sklearn.neighbors import KNeighborsClassifier\n", 87 | " knn = KNeighborsClassifier(5)\n", 88 | " ##RF\n", 89 | " from sklearn.ensemble import RandomForestClassifier\n", 90 | " rf = RandomForestClassifier()\n", 91 | " ##LogisticRegression\n", 92 | " from sklearn.linear_model import LogisticRegression\n", 93 | " lr = LogisticRegression()\n", 94 | " ##SVC\n", 95 | " from sklearn.svm import SVC\n", 96 | " svc = SVC()\n", 97 | " \n", 98 | "\n", 99 | " ############################################################### voting \n", 100 | " # generate model\n", 101 | " models = tools.Models(x_src,y_src,x_tar,y_tar)\n", 102 | " models.add(rf,'RF')\n", 103 | " models.add(lr,'LR')\n", 104 | " models.add(svc,'SVC')\n", 105 | " models.sort_src(show=False)\n", 106 | " label_voting = tools.voting(x_tar.shape[0],\n", 107 | " models.model[0],\n", 108 | " models.model[1],\n", 109 | " models.model[2])\n", 110 | " #get residual and candidate\n", 111 | " x_tar_residual = []\n", 112 | " y_tar_residual = []\n", 113 | " x_tar_candidate = []\n", 114 | " y_tar_candidate = []\n", 115 | " label_candidate = []\n", 116 | " #residual\n", 117 | " r_index = [i for i in range(x_tar.shape[0]) if (label_voting[i] == -1)]\n", 118 | " x_tar_residual = x_tar[r_index,:]\n", 119 | " y_tar_residual = y_tar[r_index,:]\n", 120 | " label_residual = label_voting[r_index]\n", 121 | " #candidate\n", 122 | " c_index = [i for i in range(x_tar.shape[0]) if (label_voting[i] != -1)]\n", 123 | " x_tar_candidate = x_tar[c_index,:]\n", 124 | " y_tar_candidate = y_tar[c_index,:]\n", 125 | " label_candidate = label_voting[c_index]\n", 126 | "\n", 127 | " ############################################################in-class transfer\n", 128 | " x_tar_candidate_new = []\n", 129 | " y_tar_candidate_new = []\n", 130 | " x_src_new = []\n", 131 | " y_src_new = []\n", 132 | " x_tar_candidate_old = []\n", 133 | " y_tar_candidate_old = []\n", 134 | "\n", 135 | " for i, element in enumerate(label_set):\n", 136 | " class_index = label_set[i]\n", 137 | " #source data in that class i \n", 138 | " src_index_i = [i for i in range(x_src.shape[0]) if (y_src[i,0] == class_index)]\n", 139 | " x_src_i = x_src[src_index_i,:]\n", 140 | " y_src_i = y_src[src_index_i,:]\n", 141 | " #candidate data in that class i\n", 142 | " tar_index_i = [i for i in range(x_tar_candidate.shape[0]) if (label_candidate[i] == class_index)]\n", 143 | " x_tar_candidate_i = x_tar_candidate[tar_index_i,:]\n", 144 | " y_tar_candidate_i = y_tar_candidate[tar_index_i,:]\n", 145 | " if (x_tar_candidate_i != []):\n", 146 | " for j in range(x_tar_candidate_i.shape[0]):\n", 147 | " x_tar_candidate_old.append(x_tar_candidate_i[j])\n", 148 | " y_tar_candidate_old.append(y_tar_candidate_i[j])\n", 149 | " sio.savemat('x_src_i.mat',{\"o\":x_src_i})\n", 150 | " sio.savemat('y_src_i.mat',{\"o\":y_src_i})\n", 151 | " sio.savemat('x_tar_candidate_i.mat',{\"o\":x_tar_candidate_i})\n", 152 | "\n", 153 | " ##########################JDA\n", 154 | " \n", 155 | " if (x_tar_candidate_i.shape[0] == 0):\n", 156 | " x_tar_candidate_new_i = x_tar_candidate_i\n", 157 | " # x_tar_candidate_i_fake = np.array(random.sample(list(x_src_i),15)) # sample from src to generate fake candidate\n", 158 | " # x_tar_candidate_i_fake = np.array(random.sample(list(x_tar),50)) #sample from target\n", 159 | " x_tar_candidate_i_fake = np.array(random.sample(list(x_tar),80))\n", 160 | " sio.savemat('x_tar_candidate_i_fake.mat',{\"o\":x_tar_candidate_i_fake})\n", 161 | " out = np.array(eng.MyJDA(eng.load('x_src_i.mat')['o'],\n", 162 | " eng.load('y_src_i.mat')['o'],\n", 163 | " eng.load('x_tar_candidate_i_fake.mat')['o'],\n", 164 | " options))\n", 165 | " x_src_new_i = out[0:x_src_i.shape[0],:]\n", 166 | " else:\n", 167 | " out = np.array(eng.MyJDA(eng.load('x_src_i.mat')['o'],\n", 168 | " eng.load('y_src_i.mat')['o'],\n", 169 | " eng.load('x_tar_candidate_i.mat')['o'],\n", 170 | " options))\n", 171 | " x_src_new_i = out[0:x_src_i.shape[0],:]\n", 172 | " x_tar_candidate_new_i = out[x_src_i.shape[0]:,:]\n", 173 | " #merge\n", 174 | " for j in range(x_src_new_i.shape[0]):\n", 175 | " x_src_new.append(x_src_new_i[j])\n", 176 | " y_src_new.append(y_src_i[j])\n", 177 | " if (x_tar_candidate_new_i.shape[0] != 0):\n", 178 | " for j in range(x_tar_candidate_new_i.shape[0]):\n", 179 | " x_tar_candidate_new.append(x_tar_candidate_new_i[j])\n", 180 | " y_tar_candidate_new.append(y_tar_candidate_i[j])\n", 181 | "\n", 182 | " #change the list to array\n", 183 | " x_tar_candidate_old = np.array(x_tar_candidate_old)\n", 184 | " y_tar_candidate_old = np.array(y_tar_candidate_old)\n", 185 | " x_src_new = np.array(x_src_new).reshape(x_src.shape[0],options['dim'])\n", 186 | " y_src_new = np.array(y_src_new)\n", 187 | " x_tar_candidate_new = np.array(x_tar_candidate_new).reshape(x_tar_candidate.shape[0],options['dim'])\n", 188 | " y_tar_candidate_new = np.array(y_tar_candidate_new)\n", 189 | "\n", 190 | " ########################################################## second annotation\n", 191 | " #train model on new candidate \n", 192 | " knn_1 = KNeighborsClassifier(5)\n", 193 | " knn_1.fit(x_src_new, y_src_new)\n", 194 | " predicted_label_candidate = np.array(knn_1.predict(x_tar_candidate_new)).reshape((-1,1))\n", 195 | " acc_candidate = accuracy_score(y_tar_candidate_new, predicted_label_candidate)\n", 196 | "\n", 197 | " #train model on old candidate and predict on residual\n", 198 | " knn_2 = KNeighborsClassifier(5)\n", 199 | " knn_2.fit(x_tar_candidate_old, predicted_label_candidate)\n", 200 | " predicted_label_residual = knn_2.predict(x_tar_residual).reshape((-1,1))\n", 201 | " acc_residual = accuracy_score(y_tar_residual, predicted_label_residual)\n", 202 | "\n", 203 | " #calculate final accuracy\n", 204 | " acc_stl = accuracy_score(np.vstack((y_tar_candidate_new, y_tar_residual)), np.vstack((predicted_label_candidate, predicted_label_residual)))\n", 205 | "\n", 206 | " tools.remove_files()#for JDA\n", 207 | " return acc_candidate,acc_residual,acc_stl" 208 | ] 209 | }, 210 | { 211 | "cell_type": "markdown", 212 | "metadata": {}, 213 | "source": [ 214 | "# run for one time, balanced" 215 | ] 216 | }, 217 | { 218 | "cell_type": "code", 219 | "execution_count": 15, 220 | "metadata": {}, 221 | "outputs": [ 222 | { 223 | "name": "stdout", 224 | "output_type": "stream", 225 | "text": [ 226 | "A-B 0.602740 0.724057 0.706237 \n", 227 | "B-A 0.231003 0.278409 0.247525 \n", 228 | "B-C 0.630108 0.000000 0.618143 \n", 229 | "C-B 0.554286 0.770186 0.694165 \n", 230 | "A-C 0.746753 0.000000 0.727848 \n", 231 | "C-A 0.530474 0.774194 0.560396 \n" 232 | ] 233 | } 234 | ], 235 | "source": [ 236 | "x_src, y_src, x_tar, y_tar = tools.getdata(Ab,y_a ,x_b ,y_b , balance=True)\n", 237 | "a,b,c = runhjda(x_src, y_src, x_tar, y_tar, options)\n", 238 | "print(\"%-8s\"%(\"A-B\"),\n", 239 | " \"%-10.6f\"%(a),\n", 240 | " \"%-10.6f\"%(b),\n", 241 | " \"%-10.6f\"%(c))\n", 242 | "\n", 243 | "x_src, y_src, x_tar, y_tar = tools.getdata(Ba, y_b ,x_a ,y_a , balance=True)\n", 244 | "a,b,c = runhjda(x_src, y_src, x_tar, y_tar, options)\n", 245 | "print(\"%-8s\"%(\"B-A\"),\n", 246 | " \"%-10.6f\"%(a),\n", 247 | " \"%-10.6f\"%(b),\n", 248 | " \"%-10.6f\"%(c))\n", 249 | "\n", 250 | "x_src, y_src, x_tar, y_tar = tools.getdata(Bc, y_b ,x_c ,y_c , balance=True)\n", 251 | "a,b,c = runhjda(x_src, y_src, x_tar, y_tar, options)\n", 252 | "print(\"%-8s\"%(\"B-C\"),\n", 253 | " \"%-10.6f\"%(a),\n", 254 | " \"%-10.6f\"%(b),\n", 255 | " \"%-10.6f\"%(c))\n", 256 | "\n", 257 | "x_src, y_src, x_tar, y_tar = tools.getdata(Cb, y_c ,x_b ,y_b , balance=True)\n", 258 | "a,b,c = runhjda(x_src, y_src, x_tar, y_tar, options)\n", 259 | "print(\"%-8s\"%(\"C-B\"),\n", 260 | " \"%-10.6f\"%(a),\n", 261 | " \"%-10.6f\"%(b),\n", 262 | " \"%-10.6f\"%(c))\n", 263 | "\n", 264 | "x_src, y_src, x_tar, y_tar = tools.getdata(Ac, y_a ,x_c ,y_c , balance=True)\n", 265 | "a,b,c = runhjda(x_src, y_src, x_tar, y_tar, options)\n", 266 | "print(\"%-8s\"%(\"A-C\"),\n", 267 | " \"%-10.6f\"%(a),\n", 268 | " \"%-10.6f\"%(b),\n", 269 | " \"%-10.6f\"%(c))\n", 270 | "\n", 271 | "x_src, y_src, x_tar, y_tar = tools.getdata(Ca, y_c ,x_a ,y_a , balance=True)\n", 272 | "a,b,c = runhjda(x_src, y_src, x_tar, y_tar, options)\n", 273 | "print(\"%-8s\"%(\"C-A\"),\n", 274 | " \"%-10.6f\"%(a),\n", 275 | " \"%-10.6f\"%(b),\n", 276 | " \"%-10.6f\"%(c))\n" 277 | ] 278 | }, 279 | { 280 | "cell_type": "markdown", 281 | "metadata": {}, 282 | "source": [ 283 | "A-B 0.602740 0.724057 0.706237 \n", 284 | "B-A 0.231003 0.278409 0.247525 \n", 285 | "B-C 0.630108 0.000000 0.618143 \n", 286 | "C-B 0.554286 0.770186 0.694165 \n", 287 | "A-C 0.746753 0.000000 0.727848 \n", 288 | "C-A 0.530474 0.774194 0.560396 " 289 | ] 290 | }, 291 | { 292 | "cell_type": "markdown", 293 | "metadata": {}, 294 | "source": [ 295 | "# mean of 10 times, balanced" 296 | ] 297 | }, 298 | { 299 | "cell_type": "code", 300 | "execution_count": 19, 301 | "metadata": {}, 302 | "outputs": [ 303 | { 304 | "name": "stdout", 305 | "output_type": "stream", 306 | "text": [ 307 | "A-B 0.611314 0.699049 0.671227 \n", 308 | "B-A 0.254381 0.195062 0.252673 \n", 309 | "B-C 0.634310 0.000000 0.622996 \n", 310 | "C-B 0.370102 0.347832 0.421328 \n", 311 | "A-C 0.812125 0.074228 0.711920 \n", 312 | "C-A 0.527812 0.151373 0.463960 \n" 313 | ] 314 | } 315 | ], 316 | "source": [ 317 | "seed(123)\n", 318 | "x_src, y_src, x_tar, y_tar = tools.getdata(Ab,y_a ,x_b ,y_b , balance=True)\n", 319 | "df = pd.DataFrame(columns=['acc_can','acc_res','acc_stl'])\n", 320 | "T = 20\n", 321 | "for i in range(T):\n", 322 | " a,b,c = runhjda(x_src, y_src, x_tar, y_tar)\n", 323 | " df = df.append(pd.DataFrame({'acc_can':a,'acc_res':b,'acc_stl':c}, \n", 324 | " index=[i]))\n", 325 | "a,b,c = df.mean()\n", 326 | "print(\"%-8s\"%(\"A-B\"),\n", 327 | " \"%-10.6f\"%(a),\n", 328 | " \"%-10.6f\"%(b),\n", 329 | " \"%-10.6f\"%(c))\n", 330 | "\n", 331 | "x_src, y_src, x_tar, y_tar = tools.getdata(Ba, y_b ,x_a ,y_a , balance=True)\n", 332 | "df = pd.DataFrame(columns=['acc_can','acc_res','acc_stl'])\n", 333 | "for i in range(T):\n", 334 | " a,b,c = runhjda(x_src, y_src, x_tar, y_tar)\n", 335 | " df = df.append(pd.DataFrame({'acc_can':a,'acc_res':b,'acc_stl':c}, \n", 336 | " index=[i]))\n", 337 | "a,b,c = df.mean()\n", 338 | "print(\"%-8s\"%(\"B-A\"),\n", 339 | " \"%-10.6f\"%(a),\n", 340 | " \"%-10.6f\"%(b),\n", 341 | " \"%-10.6f\"%(c))\n", 342 | "\n", 343 | "x_src, y_src, x_tar, y_tar = tools.getdata(Bc, y_b ,x_c ,y_c , balance=True)\n", 344 | "df = pd.DataFrame(columns=['acc_can','acc_res','acc_stl'])\n", 345 | "for i in range(T):\n", 346 | " a,b,c = runhjda(x_src, y_src, x_tar, y_tar)\n", 347 | " df = df.append(pd.DataFrame({'acc_can':a,'acc_res':b,'acc_stl':c}, \n", 348 | " index=[i]))\n", 349 | "a,b,c = df.mean()\n", 350 | "print(\"%-8s\"%(\"B-C\"),\n", 351 | " \"%-10.6f\"%(a),\n", 352 | " \"%-10.6f\"%(b),\n", 353 | " \"%-10.6f\"%(c))\n", 354 | "\n", 355 | "x_src, y_src, x_tar, y_tar = tools.getdata(Cb, y_c ,x_b ,y_b , balance=True)\n", 356 | "df = pd.DataFrame(columns=['acc_can','acc_res','acc_stl'])\n", 357 | "for i in range(T):\n", 358 | " a,b,c = runhjda(x_src, y_src, x_tar, y_tar)\n", 359 | " df = df.append(pd.DataFrame({'acc_can':a,'acc_res':b,'acc_stl':c}, \n", 360 | " index=[i]))\n", 361 | "a,b,c = df.mean()\n", 362 | "print(\"%-8s\"%(\"C-B\"),\n", 363 | " \"%-10.6f\"%(a),\n", 364 | " \"%-10.6f\"%(b),\n", 365 | " \"%-10.6f\"%(c))\n", 366 | "\n", 367 | "x_src, y_src, x_tar, y_tar = tools.getdata(Ac, y_a ,x_c ,y_c , balance=True)\n", 368 | "df = pd.DataFrame(columns=['acc_can','acc_res','acc_stl'])\n", 369 | "for i in range(T):\n", 370 | " a,b,c = runhjda(x_src, y_src, x_tar, y_tar)\n", 371 | " df = df.append(pd.DataFrame({'acc_can':a,'acc_res':b,'acc_stl':c}, \n", 372 | " index=[i]))\n", 373 | "a,b,c = df.mean()\n", 374 | "print(\"%-8s\"%(\"A-C\"),\n", 375 | " \"%-10.6f\"%(a),\n", 376 | " \"%-10.6f\"%(b),\n", 377 | " \"%-10.6f\"%(c))\n", 378 | "\n", 379 | "x_src, y_src, x_tar, y_tar = tools.getdata(Ca, y_c ,x_a ,y_a , balance=True)\n", 380 | "df = pd.DataFrame(columns=['acc_can','acc_res','acc_stl'])\n", 381 | "for i in range(T):\n", 382 | " a,b,c = runhjda(x_src, y_src, x_tar, y_tar)\n", 383 | " df = df.append(pd.DataFrame({'acc_can':a,'acc_res':b,'acc_stl':c}, \n", 384 | " index=[i]))\n", 385 | "a,b,c = df.mean()\n", 386 | "print(\"%-8s\"%(\"C-A\"),\n", 387 | " \"%-10.6f\"%(a),\n", 388 | " \"%-10.6f\"%(b),\n", 389 | " \"%-10.6f\"%(c))\n" 390 | ] 391 | }, 392 | { 393 | "cell_type": "markdown", 394 | "metadata": {}, 395 | "source": [ 396 | "A-B 0.611314 0.699049 0.671227 \n", 397 | "B-A 0.254381 0.195062 0.252673 \n", 398 | "B-C 0.634310 0.000000 0.622996 \n", 399 | "C-B 0.370102 0.347832 0.421328 \n", 400 | "A-C 0.812125 0.074228 0.711920 \n", 401 | "C-A 0.527812 0.151373 0.463960 " 402 | ] 403 | } 404 | ], 405 | "metadata": { 406 | "kernelspec": { 407 | "display_name": "Python 3", 408 | "language": "python", 409 | "name": "python3" 410 | }, 411 | "language_info": { 412 | "codemirror_mode": { 413 | "name": "ipython", 414 | "version": 3 415 | }, 416 | "file_extension": ".py", 417 | "mimetype": "text/x-python", 418 | "name": "python", 419 | "nbconvert_exporter": "python", 420 | "pygments_lexer": "ipython3", 421 | "version": "3.6.5" 422 | } 423 | }, 424 | "nbformat": 4, 425 | "nbformat_minor": 2 426 | } 427 | -------------------------------------------------------------------------------- /HTCA.ipynb: -------------------------------------------------------------------------------- 1 | { 2 | "cells": [ 3 | { 4 | "cell_type": "code", 5 | "execution_count": 1, 6 | "metadata": {}, 7 | "outputs": [], 8 | "source": [ 9 | "import numpy as np\n", 10 | "import pandas as pd\n", 11 | "import tools\n", 12 | "import tca\n", 13 | "import sklearn\n", 14 | "import random\n", 15 | "from numpy.random import seed\n", 16 | "from sklearn.metrics import accuracy_score\n", 17 | "import warnings\n", 18 | "\n", 19 | "warnings.filterwarnings('ignore')\n", 20 | "\n", 21 | "# A = pd.read_csv(\"/cs/home/ms383/Dissertation/data/A.csv\", header=None) \n", 22 | "# B = pd.read_csv(\"/cs/home/ms383/Dissertation/data/B.csv\", header=None) \n", 23 | "# C = pd.read_csv(\"/cs/home/ms383/Dissertation/data/C.csv\", header=None) \n", 24 | "# AB_sim = pd.read_csv(\"/cs/home/ms383/Dissertation/data/Sensor_Sim_AB.csv\", header=None, sep = '\\t')\n", 25 | "# BC_sim = pd.read_csv(\"/cs/home/ms383/Dissertation/data/Sensor_Sim_BC.csv\", header=None, sep = '\\t')\n", 26 | "# AC_sim = pd.read_csv(\"/cs/home/ms383/Dissertation/data/Sensor_Sim_AC.csv\", header=None, sep = '\\t')\n", 27 | "\n", 28 | "A = pd.read_csv(\"D:/workspace/jupyter/Dissertation/data/A.csv\", header=None) \n", 29 | "B = pd.read_csv(\"D:/workspace/jupyter/Dissertation/data/B.csv\", header=None) \n", 30 | "C = pd.read_csv(\"D:/workspace/jupyter/Dissertation/data/C.csv\", header=None) \n", 31 | "AB_sim = pd.read_csv(\"D:/workspace/jupyter/Dissertation/data/Sensor_Sim_AB.csv\", header=None, sep = '\\t')\n", 32 | "BC_sim = pd.read_csv(\"D:/workspace/jupyter/Dissertation/data/Sensor_Sim_BC.csv\", header=None, sep = '\\t')\n", 33 | "AC_sim = pd.read_csv(\"D:/workspace/jupyter/Dissertation/data/Sensor_Sim_AC.csv\", header=None, sep = '\\t')\n", 34 | "\n", 35 | "# A = pd.read_csv(\"/Users/fred/Desktop/Dissertation/Dissertation/data/A.csv\", header=None) \n", 36 | "# B = pd.read_csv(\"/Users/fred/Desktop/Dissertation/Dissertation/data/B.csv\", header=None) \n", 37 | "# C = pd.read_csv(\"/Users/fred/Desktop/Dissertation/Dissertation/data/C.csv\", header=None) \n", 38 | "# AB_sim = pd.read_csv(\"/Users/fred/Desktop/Dissertation/Dissertation/data/Sensor_Sim_AB.csv\", header=None, sep = '\\t')\n", 39 | "# BC_sim = pd.read_csv(\"/Users/fred/Desktop/Dissertation/Dissertation/data/Sensor_Sim_BC.csv\", header=None, sep = '\\t')\n", 40 | "# AC_sim = pd.read_csv(\"/Users/fred/Desktop/Dissertation/Dissertation/data/Sensor_Sim_AC.csv\", header=None, sep = '\\t')\n", 41 | "\n", 42 | "x_a = np.array(A.values[:, 1:A.shape[1]])\n", 43 | "y_a = np.array(np.transpose([A.values[:, 0]]))\n", 44 | "x_b = np.array(B.values[:, 1:B.shape[1]])\n", 45 | "y_b = np.array(np.transpose([B.values[:, 0]]))\n", 46 | "x_c = np.array(C.values[:, 1:C.shape[1]])\n", 47 | "y_c = np.array(np.transpose([C.values[:, 0]]))\n", 48 | "\n", 49 | "Ab = np.dot(x_a,AB_sim)\n", 50 | "Ac = np.dot(x_a,AC_sim)\n", 51 | "Ba = np.dot(x_b,AB_sim.T)\n", 52 | "Bc = np.dot(x_b,BC_sim)\n", 53 | "Ca = np.dot(x_c,AC_sim.T)\n", 54 | "Cb = np.dot(x_c,BC_sim.T)" 55 | ] 56 | }, 57 | { 58 | "cell_type": "code", 59 | "execution_count": 3, 60 | "metadata": {}, 61 | "outputs": [], 62 | "source": [ 63 | "options = {'dim':20,\n", 64 | " 'kerneltype':'rbf',\n", 65 | " 'kernelparam':1.0,\n", 66 | " 'mu':1.0}" 67 | ] 68 | }, 69 | { 70 | "cell_type": "code", 71 | "execution_count": 104, 72 | "metadata": {}, 73 | "outputs": [], 74 | "source": [ 75 | "def runhtca(x_src,y_src,x_tar,y_tar):\n", 76 | " ################################################################# prepare\n", 77 | " tf='TCA'\n", 78 | " label_set = np.unique(y_src).astype(int)\n", 79 | "\n", 80 | " #classifiers\n", 81 | " ##RF\n", 82 | " from sklearn.ensemble import RandomForestClassifier\n", 83 | " rf = RandomForestClassifier()\n", 84 | " ##KNN\n", 85 | " from sklearn.neighbors import KNeighborsClassifier\n", 86 | " knn = KNeighborsClassifier(5)\n", 87 | " ##Bernoulli Naive bayes\n", 88 | " from sklearn.naive_bayes import BernoulliNB\n", 89 | " bnb = sklearn.naive_bayes.BernoulliNB()\n", 90 | " ##Gaussian Naive Bayes\n", 91 | " from sklearn.naive_bayes import GaussianNB\n", 92 | " gnb = GaussianNB()\n", 93 | " ##Decision tree\n", 94 | " from sklearn.tree import DecisionTreeClassifier\n", 95 | " dt = sklearn.tree.DecisionTreeClassifier()\n", 96 | " ##LogisticRegression\n", 97 | " from sklearn.linear_model import LogisticRegression\n", 98 | " lr = LogisticRegression()\n", 99 | " ##SVC\n", 100 | " from sklearn.svm import SVC\n", 101 | " svc = SVC(C=100)\n", 102 | " ##ExtraTreeClassifier\n", 103 | " from sklearn.tree import ExtraTreeClassifier\n", 104 | " etc = ExtraTreeClassifier()\n", 105 | " ##NN\n", 106 | " from sklearn.neural_network import MLPClassifier\n", 107 | " nn = MLPClassifier()\n", 108 | "\n", 109 | "\n", 110 | " ############################################################### voting \n", 111 | " # generate model\n", 112 | " models = tools.Models(x_src,y_src,x_tar,y_tar)\n", 113 | " models.add(rf,'RF')\n", 114 | " models.add(lr,'LR')\n", 115 | " models.add(svc,'SVC')\n", 116 | "\n", 117 | " models.sort_src(show=False)\n", 118 | " label_voting = voting(x_tar.shape[0],\n", 119 | " models.model[0],\n", 120 | " models.model[1],\n", 121 | " models.model[2])\n", 122 | "\n", 123 | " #get residual and candidate\n", 124 | " x_tar_residual = []\n", 125 | " y_tar_residual = []\n", 126 | " x_tar_candidate = []\n", 127 | " y_tar_candidate = []\n", 128 | " label_candidate = []\n", 129 | " #residual\n", 130 | " r_index = [i for i in range(x_tar.shape[0]) if (label_voting[i] == -1)]\n", 131 | " x_tar_residual = x_tar[r_index,:]\n", 132 | " y_tar_residual = y_tar[r_index,:]\n", 133 | " label_residual = label_voting[r_index]\n", 134 | " #candidate\n", 135 | " c_index = [i for i in range(x_tar.shape[0]) if (label_voting[i] != -1)]\n", 136 | " x_tar_candidate = x_tar[c_index,:]\n", 137 | " y_tar_candidate = y_tar[c_index,:]\n", 138 | " label_candidate = label_voting[c_index]\n", 139 | " \n", 140 | " r = y_tar_candidate.shape[0]/y_tar.shape[0]\n", 141 | "\n", 142 | " ############################################################in-class transfer\n", 143 | " x_tar_candidate_new = []\n", 144 | " y_tar_candidate_new = []\n", 145 | " x_src_new = []\n", 146 | " y_src_new = []\n", 147 | " x_tar_candidate_old = []\n", 148 | " y_tar_candidate_old = []\n", 149 | "\n", 150 | " for i, element in enumerate(label_set):\n", 151 | " class_index = label_set[i]\n", 152 | " #source data in that class i \n", 153 | " src_index_i = [i for i in range(x_src.shape[0]) if (y_src[i,0] == class_index)]\n", 154 | " x_src_i = x_src[src_index_i,:]\n", 155 | " y_src_i = y_src[src_index_i,:]\n", 156 | " #candidate data in that class i\n", 157 | " tar_index_i = [i for i in range(x_tar_candidate.shape[0]) if (label_candidate[i] == class_index)]\n", 158 | " x_tar_candidate_i = x_tar_candidate[tar_index_i,:]\n", 159 | " y_tar_candidate_i = y_tar_candidate[tar_index_i,:]\n", 160 | " if (x_tar_candidate_i != []):\n", 161 | " for j in range(x_tar_candidate_i.shape[0]):\n", 162 | " x_tar_candidate_old.append(x_tar_candidate_i[j])\n", 163 | " y_tar_candidate_old.append(y_tar_candidate_i[j])\n", 164 | " ##################TCA\n", 165 | " my_tca = tca.TCA(dim=options['dim'],kerneltype=options['kerneltype'], kernelparam=options['kernelparam'], mu=options['mu'])\n", 166 | " if (x_tar_candidate_i.shape[0] == 0):\n", 167 | " x_tar_candidate_new_i = x_tar_candidate_i\n", 168 | " # x_tar_candidate_i_fake = np.array(random.sample(list(x_src_i),15)) # sample from src to generate fake candidate\n", 169 | " x_tar_candidate_i_fake = np.array(random.sample(list(x_tar),50)) #sample from target\n", 170 | " x_src_new_i, x_tar_candidate_new_i_fake, x_tar_o = my_tca.fit_transform(x_src_i, x_tar_candidate_i_fake)\n", 171 | " else:\n", 172 | " x_tar_candidate_i_fake = np.array(random.sample(list(x_tar),80)) # resample to make the class with less candidate more robust\n", 173 | " x_src_new_i, x_tar_candidate_new_i, x_tar_o = my_tca.fit_transform(x_src_i, x_tar_candidate_i)\n", 174 | " #merge\n", 175 | " for j in range(x_src_new_i.shape[0]):\n", 176 | " x_src_new.append(np.array(x_src_new_i[j]).reshape((1,options['dim'])))\n", 177 | " y_src_new.append(y_src_i[j])\n", 178 | " if (x_tar_candidate_new_i.shape[0] != 0):\n", 179 | " for j in range(x_tar_candidate_new_i.shape[0]):\n", 180 | " x_tar_candidate_new.append(np.array(x_tar_candidate_new_i[j]).reshape((1,options['dim'])))\n", 181 | " y_tar_candidate_new.append(y_tar_candidate_i[j])\n", 182 | "\n", 183 | " #change the list to array\n", 184 | " x_tar_candidate_old = np.array(x_tar_candidate_old)\n", 185 | " y_tar_candidate_old = np.array(y_tar_candidate_old)\n", 186 | " x_src_new = np.array(x_src_new).reshape(x_src.shape[0],options['dim'])\n", 187 | " y_src_new = np.array(y_src_new)\n", 188 | " x_tar_candidate_new = np.array(x_tar_candidate_new).reshape(x_tar_candidate.shape[0],options['dim'])\n", 189 | " y_tar_candidate_new = np.array(y_tar_candidate_new)\n", 190 | "\n", 191 | " ########################################################## second annotation\n", 192 | " #train model on new candidate \n", 193 | " knn_1 = KNeighborsClassifier(5)\n", 194 | " knn_1.fit(x_src_new, y_src_new)\n", 195 | " predicted_label_candidate = np.array(knn_1.predict(x_tar_candidate_new)).reshape((-1,1))\n", 196 | " acc_candidate = accuracy_score(y_tar_candidate_new, predicted_label_candidate)\n", 197 | "\n", 198 | " #train model on old candidate and predict on residual\n", 199 | " knn_2 = KNeighborsClassifier(5)\n", 200 | " knn_2.fit(x_tar_candidate_old, predicted_label_candidate)\n", 201 | " predicted_label_residual = knn_2.predict(x_tar_residual).reshape((-1,1))\n", 202 | " acc_residual = accuracy_score(y_tar_residual, predicted_label_residual)\n", 203 | "\n", 204 | " #get prediction\n", 205 | " y_predict = np.vstack((predicted_label_candidate, predicted_label_residual))\n", 206 | " #calculate final accuracy\n", 207 | " acc_stl = accuracy_score(np.vstack((y_tar_candidate_new, y_tar_residual)), np.vstack((predicted_label_candidate, predicted_label_residual)))\n", 208 | "\n", 209 | " tools.remove_files()#for JDA\n", 210 | " return acc_candidate,acc_residual,acc_stl" 211 | ] 212 | }, 213 | { 214 | "cell_type": "code", 215 | "execution_count": 83, 216 | "metadata": {}, 217 | "outputs": [ 218 | { 219 | "name": "stdout", 220 | "output_type": "stream", 221 | "text": [ 222 | "(505, 22) (505, 1) (497, 22) (497, 1)\n" 223 | ] 224 | } 225 | ], 226 | "source": [ 227 | "x_src, y_src, x_tar, y_tar = tools.getdata(Ab,y_a ,x_b ,y_b , balance=False, z_score=False)\n", 228 | "print(x_src.shape,y_src.shape,x_tar.shape,y_tar.shape)" 229 | ] 230 | }, 231 | { 232 | "cell_type": "code", 233 | "execution_count": 88, 234 | "metadata": {}, 235 | "outputs": [ 236 | { 237 | "name": "stdout", 238 | "output_type": "stream", 239 | "text": [ 240 | "A-B 0.818841 0.674699 0.794769 \n", 241 | "B-A 0.334311 0.359756 0.342574 \n", 242 | "B-C 0.634146 0.130435 0.609705 \n", 243 | "C-B 0.186992 0.600000 0.191147 \n", 244 | "A-C 0.804819 0.067797 0.713080 \n", 245 | "C-A 0.544757 0.166667 0.459406 \n" 246 | ] 247 | } 248 | ], 249 | "source": [ 250 | "x_src, y_src, x_tar, y_tar = tools.getdata(Ab,y_a ,x_b ,y_b , balance=True)\n", 251 | "a,b,c = runhtca(x_src, y_src, x_tar, y_tar)\n", 252 | "print(\"%-8s\"%(\"A-B\"),\n", 253 | " \"%-10.6f\"%(a),\n", 254 | " \"%-10.6f\"%(b),\n", 255 | " \"%-10.6f\"%(c))\n", 256 | "\n", 257 | "x_src, y_src, x_tar, y_tar = tools.getdata(Ba, y_b ,x_a ,y_a , balance=True)\n", 258 | "a,b,c = runhtca(x_src, y_src, x_tar, y_tar)\n", 259 | "print(\"%-8s\"%(\"B-A\"),\n", 260 | " \"%-10.6f\"%(a),\n", 261 | " \"%-10.6f\"%(b),\n", 262 | " \"%-10.6f\"%(c))\n", 263 | "\n", 264 | "x_src, y_src, x_tar, y_tar = tools.getdata(Bc, y_b ,x_c ,y_c , balance=True)\n", 265 | "a,b,c = runhtca(x_src, y_src, x_tar, y_tar)\n", 266 | "print(\"%-8s\"%(\"B-C\"),\n", 267 | " \"%-10.6f\"%(a),\n", 268 | " \"%-10.6f\"%(b),\n", 269 | " \"%-10.6f\"%(c))\n", 270 | "\n", 271 | "x_src, y_src, x_tar, y_tar = tools.getdata(Cb, y_c ,x_b ,y_b , balance=True)\n", 272 | "a,b,c = runhtca(x_src, y_src, x_tar, y_tar)\n", 273 | "print(\"%-8s\"%(\"C-B\"),\n", 274 | " \"%-10.6f\"%(a),\n", 275 | " \"%-10.6f\"%(b),\n", 276 | " \"%-10.6f\"%(c))\n", 277 | "\n", 278 | "x_src, y_src, x_tar, y_tar = tools.getdata(Ac, y_a ,x_c ,y_c , balance=True)\n", 279 | "a,b,c = runhtca(x_src, y_src, x_tar, y_tar)\n", 280 | "print(\"%-8s\"%(\"A-C\"),\n", 281 | " \"%-10.6f\"%(a),\n", 282 | " \"%-10.6f\"%(b),\n", 283 | " \"%-10.6f\"%(c))\n", 284 | "\n", 285 | "x_src, y_src, x_tar, y_tar = tools.getdata(Ca, y_c ,x_a ,y_a , balance=True)\n", 286 | "a,b,c = runhtca(x_src, y_src, x_tar, y_tar)\n", 287 | "print(\"%-8s\"%(\"C-A\"),\n", 288 | " \"%-10.6f\"%(a),\n", 289 | " \"%-10.6f\"%(b),\n", 290 | " \"%-10.6f\"%(c))\n" 291 | ] 292 | }, 293 | { 294 | "cell_type": "markdown", 295 | "metadata": {}, 296 | "source": [ 297 | "A-B 0.818841 0.674699 0.794769 \n", 298 | "B-A 0.334311 0.359756 0.342574 \n", 299 | "B-C 0.634146 0.130435 0.609705 \n", 300 | "C-B 0.186992 0.600000 0.191147 \n", 301 | "A-C 0.804819 0.067797 0.713080 \n", 302 | "C-A 0.544757 0.166667 0.459406 \n" 303 | ] 304 | }, 305 | { 306 | "cell_type": "markdown", 307 | "metadata": {}, 308 | "source": [ 309 | "# HTCA mean of 10 times" 310 | ] 311 | }, 312 | { 313 | "cell_type": "markdown", 314 | "metadata": {}, 315 | "source": [ 316 | "## balanced unstandarized" 317 | ] 318 | }, 319 | { 320 | "cell_type": "code", 321 | "execution_count": 79, 322 | "metadata": {}, 323 | "outputs": [ 324 | { 325 | "name": "stdout", 326 | "output_type": "stream", 327 | "text": [ 328 | "A-B 0.692922 0.674583 0.751509 \n", 329 | "B-A 0.369874 0.310182 0.363663 \n", 330 | "B-C 0.633927 0.125892 0.612025 \n", 331 | "C-B 0.356224 0.152061 0.260463 \n", 332 | "A-C 0.724072 0.050684 0.610970 \n", 333 | "C-A 0.563469 0.204470 0.519802 \n" 334 | ] 335 | } 336 | ], 337 | "source": [ 338 | "seed(123)\n", 339 | "x_src, y_src, x_tar, y_tar = tools.getdata(Ab,y_a ,x_b ,y_b , balance=True)\n", 340 | "df = pd.DataFrame(columns=['acc_can','acc_res','acc_stl'])\n", 341 | "T = 20\n", 342 | "for i in range(T):\n", 343 | " a,b,c = runhtca(x_src, y_src, x_tar, y_tar)\n", 344 | " df = df.append(pd.DataFrame({'acc_can':a,'acc_res':b,'acc_stl':c}, \n", 345 | " index=[i]))\n", 346 | "a,b,c = df.mean()\n", 347 | "print(\"%-8s\"%(\"A-B\"),\n", 348 | " \"%-10.6f\"%(a),\n", 349 | " \"%-10.6f\"%(b),\n", 350 | " \"%-10.6f\"%(c))\n", 351 | "\n", 352 | "x_src, y_src, x_tar, y_tar = tools.getdata(Ba, y_b ,x_a ,y_a , balance=True)\n", 353 | "df = pd.DataFrame(columns=['acc_can','acc_res','acc_stl'])\n", 354 | "for i in range(T):\n", 355 | " a,b,c = runhtca(x_src, y_src, x_tar, y_tar)\n", 356 | " df = df.append(pd.DataFrame({'acc_can':a,'acc_res':b,'acc_stl':c}, \n", 357 | " index=[i]))\n", 358 | "a,b,c = df.mean()\n", 359 | "print(\"%-8s\"%(\"B-A\"),\n", 360 | " \"%-10.6f\"%(a),\n", 361 | " \"%-10.6f\"%(b),\n", 362 | " \"%-10.6f\"%(c))\n", 363 | "\n", 364 | "x_src, y_src, x_tar, y_tar = tools.getdata(Bc, y_b ,x_c ,y_c , balance=True)\n", 365 | "df = pd.DataFrame(columns=['acc_can','acc_res','acc_stl'])\n", 366 | "for i in range(T):\n", 367 | " a,b,c = runhtca(x_src, y_src, x_tar, y_tar)\n", 368 | " df = df.append(pd.DataFrame({'acc_can':a,'acc_res':b,'acc_stl':c}, \n", 369 | " index=[i]))\n", 370 | "a,b,c = df.mean()\n", 371 | "print(\"%-8s\"%(\"B-C\"),\n", 372 | " \"%-10.6f\"%(a),\n", 373 | " \"%-10.6f\"%(b),\n", 374 | " \"%-10.6f\"%(c))\n", 375 | "\n", 376 | "x_src, y_src, x_tar, y_tar = tools.getdata(Cb, y_c ,x_b ,y_b , balance=True)\n", 377 | "df = pd.DataFrame(columns=['acc_can','acc_res','acc_stl'])\n", 378 | "for i in range(T):\n", 379 | " a,b,c = runhtca(x_src, y_src, x_tar, y_tar)\n", 380 | " df = df.append(pd.DataFrame({'acc_can':a,'acc_res':b,'acc_stl':c}, \n", 381 | " index=[i]))\n", 382 | "a,b,c = df.mean()\n", 383 | "print(\"%-8s\"%(\"C-B\"),\n", 384 | " \"%-10.6f\"%(a),\n", 385 | " \"%-10.6f\"%(b),\n", 386 | " \"%-10.6f\"%(c))\n", 387 | "\n", 388 | "x_src, y_src, x_tar, y_tar = tools.getdata(Ac, y_a ,x_c ,y_c , balance=True)\n", 389 | "df = pd.DataFrame(columns=['acc_can','acc_res','acc_stl'])\n", 390 | "for i in range(T):\n", 391 | " a,b,c = runhtca(x_src, y_src, x_tar, y_tar)\n", 392 | " df = df.append(pd.DataFrame({'acc_can':a,'acc_res':b,'acc_stl':c}, \n", 393 | " index=[i]))\n", 394 | "a,b,c = df.mean()\n", 395 | "print(\"%-8s\"%(\"A-C\"),\n", 396 | " \"%-10.6f\"%(a),\n", 397 | " \"%-10.6f\"%(b),\n", 398 | " \"%-10.6f\"%(c))\n", 399 | "\n", 400 | "x_src, y_src, x_tar, y_tar = tools.getdata(Ca, y_c ,x_a ,y_a , balance=True)\n", 401 | "df = pd.DataFrame(columns=['acc_can','acc_res','acc_stl'])\n", 402 | "for i in range(T):\n", 403 | " a,b,c = runhtca(x_src, y_src, x_tar, y_tar)\n", 404 | " df = df.append(pd.DataFrame({'acc_can':a,'acc_res':b,'acc_stl':c}, \n", 405 | " index=[i]))\n", 406 | "a,b,c = df.mean()\n", 407 | "print(\"%-8s\"%(\"C-A\"),\n", 408 | " \"%-10.6f\"%(a),\n", 409 | " \"%-10.6f\"%(b),\n", 410 | " \"%-10.6f\"%(c))\n" 411 | ] 412 | }, 413 | { 414 | "cell_type": "markdown", 415 | "metadata": {}, 416 | "source": [ 417 | "A-B 0.658881 0.758998 0.758350 \n", 418 | "B-A 0.356341 0.295877 0.348911 \n", 419 | "B-C 0.632276 0.122052 0.613080 \n", 420 | "C-B 0.417704 0.263826 0.380684 \n", 421 | "A-C 0.714880 0.071606 0.615401 \n", 422 | "C-A 0.576425 0.354958 0.543366" 423 | ] 424 | } 425 | ], 426 | "metadata": { 427 | "kernelspec": { 428 | "display_name": "Python 3", 429 | "language": "python", 430 | "name": "python3" 431 | }, 432 | "language_info": { 433 | "codemirror_mode": { 434 | "name": "ipython", 435 | "version": 3 436 | }, 437 | "file_extension": ".py", 438 | "mimetype": "text/x-python", 439 | "name": "python", 440 | "nbconvert_exporter": "python", 441 | "pygments_lexer": "ipython3", 442 | "version": "3.6.5" 443 | } 444 | }, 445 | "nbformat": 4, 446 | "nbformat_minor": 2 447 | } 448 | -------------------------------------------------------------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0,0,0,0,0,0 470 | 3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0 471 | 3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0 472 | 3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0 473 | 3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0 474 | 3,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0 475 | -------------------------------------------------------------------------------- /data/B.csv: -------------------------------------------------------------------------------- 1 | 0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 2 | 0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0 3 | 0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0 4 | 0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0 5 | 0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0 6 | 0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0 7 | 0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0 8 | 0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0 9 | 0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0 10 | 0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0 11 | 0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0 12 | 0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0 13 | 0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0 14 | 0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 15 | 5,0,0,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0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1 481 | 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1 482 | 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1 483 | 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1 484 | 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1 485 | 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1 486 | 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1 487 | 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1 488 | 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1 489 | 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1 490 | 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1 491 | 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1 492 | 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1 493 | 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1 494 | 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1 495 | 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1 496 | 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1 497 | 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1 498 | --------------------------------------------------------------------------------