function [W,y_pred] = PLST(train_data,y_train,test_data,y_test,k,lambda,thre)
N_inst = size(y_train,1);
Dim = size(train_data,2)
y_train = y_train'; 
Q = train_data'*train_data + lambda*eye(Dim);

y_mean = mean(y_train,2);
y_o = y_train - repmat(y_mean,1,N_inst);
[u, s, v] = svds(y_o,k);
%projector u, and projection sv';
y_output = s*v';
ATb = train_data'*y_output';
% decording by solving a least square regression problem \lambda ||\w||^2 +
% ||Dw-y_output||^2
W = Q\ATb;

%do prediction
r_pred = test_data*W;
y_pred = repmat(y_mean',size(test_data,1),1) + r_pred*u';
y_pred(y_pred>thre) = 1;
y_pred(y_pred<=thre) = 0;
